To add API Documentation for RESTful web services:
- On the Develop tab, click Services > Web Service > Provider (API).
- Click Action to the Restful web service.
Click Add Documentation.
The Add API Documentation window appears for the chosen RESTful web service. By default, the values in the API Details section are filled automatically based on the chosen web service. You can change the values as per your requirements.
API Details Description Name Name of the API Documentation. By default, it shows the provider's value as the name. Description Description about the API Documentation. Contact Email Valid email address to send queries. Title Title of your API documentation. It must contain alphanumeric and few special characters (_ - . : , @ $ ? \\ and space) and must start with an Alphabet/Underscore/Number) Method Details Description Summary Purpose of the method. Notes Description about the method. API Parameters Define API parameters by clicking Add Row. Method Presentation Status code of the request, response, and fault. You can also provide the description of the status code. - Click Save.
Viewing Endpoint URL and API Documentation
After you have created RESTful Web Service for the Provider Activity, you can also view the Endpoint URL and API documentation. To view Endpoint URL and API Doc:
- Go to Develop > Services > Web Service > Provider (API) .
- Click Endpoint in the WSDL/Documentation column corresponding to the web service to view the Endpoint URL.
- Endpoint URL will appear in a new tab of your browser.
- Click Close Window to exit.
Click API Doc to view the API documentation.
API document will open in a new window.
Changing Logo/Image in API Documentation
Property "abpm.webservice.rest.apidoc.imagepath" has been added to the server configure properties for which default url is "images/api_doc_header.png". To change the logo, change the image name from url. The dimension of the image should be between 50x50 and 50x650. Supported image types are PNG, GPG, GIF, and BMP."
- Click API method to view API documentation details.
Click Try it out to view the response.
You can also view the API documentation of all web service providers populated on one screen by clicking API Doc from the Web Service Provider manage screen.