- In the API Publisher, go to the Doc tab of
FindTweetsAPI to see its API definition.
API definition contains the JSON representation of the API. You can easily modify existing content, add/remove elements, change paths and parameters etc. using the JSON editor.
- API Manager 1.5.0 onwards has integrated JSONMate as the editor for modifying the API Definition.
- For the Swagger specification of API declaration, see https://github.com/wordnik/swagger-core/wiki/API-Declaration.
By default, all the POST and PUT operations have the Payload parameter, which you can use to send any payload when invoking the API. The GET, DELETE operations have Query parameters, which you can use to send URL-appended parameters. You can also add named parameters.
For example, to modify the path of the API created above with a parameter, edit the path and add the relevant parameter.
To add new elements, click Add New Value and provide the value. To delete elements, delete the value of Key. For example, if you delete Key value description, that element will be deleted. The screenshot below shows path modified with a parameter.
The following screenshot shows parameter definition added for param and the default Payload parameter removed:
Also be sure to modify descriptions, notes, summary on each of the operations.
Now save Once the required modifications are done, save and Publish the API.
Log in to the API Store and click on GET operation to expand it. There you can enter the parameters and
try it out.
Next, see API Versioning.