Tools, FAQ, Tutorials:
Add API Operation Request Body Examples
How to add request body examples to my Azure API operation to make it more user friendly?
✍: FYIcenter.com
If you have created the "First API" API and "Add new user" operation
as described in previous tutorials,
you can follow this tutorial to add request body examples.
1. Go to the publisher dashboard of the API Management Service.
2. Open the "First API" and open the operation "Add new user".
3. Click "Edit" icon in the "Frontend" section. You see a list of settings and tabs.
4. Click "Request" tab. You see configurations for the request of the operation.
5. Fill in each field with the following:
Description: Provide the new user information in the body.
Add representation
text/xml
<user>
<name>Joe</name>
<age>25</age>
</user>
6. Click the "Save" button. The API operation is updated.
7. Click "Add representation" to add more examples, like:
application/json
{
"user": {
"name": "Joe",
"age": "25"
}
}
The picture below shows you steps on how to add request body examples on an API operation:
⇒ Test API Operation Request Body Examples
⇐ Making API More User Friendly
2018-03-28, ∼5273🔥, 0💬
Popular Posts:
What is the "__init__()" class method? The "__init__()" class method is a special method that will b...
How To Move Uploaded Files To Permanent Directory in PHP? PHP stores uploaded files in a temporary d...
How To Read the Entire File into a Single String in PHP? If you have a file, and you want to read th...
How to read Atom validation errors at w3.org? If your Atom feed has errors, the Atom validator at w3...
How to create Hello-3.1.epub with WinRAR? I have all required files to create Hello-3.1.epub. To cre...