You can use ClickHelp to create API documentation for your projects. The tool comes with a number of ready-to-use elements which can be used to compose API documentation topics from typical "building blocks" quickly. All those elements are defined as Quick Parts in your ClickHelp portal, so you can customize them or add your own elements to extend the list easily (see Insert | Quick Parts in the topic editor ribbon).
Below, you will find a list of all the API Quick Parts that exist in your portal by default:
HTTP Request
There are four popular HTTP request types available by default: GET, POST, PUT, and DELETE. You can delete unnecessary ones or add more.
|
GET Request Sample |
| /api/v1/samples/{id}/tokens?myParam={param} HTTP/1.1 | |
|
POST Request Sample |
| /api/v1/samples/{id}/tokens?myParam={param} HTTP/1.1 | |
|
PUT Request Sample |
| /api/v1/samples/{id}/tokens?myParam={param} HTTP/1.1 | |
|
DELETE Request Sample |
| /api/v1/samples/{id}/tokens?myParam={param} HTTP/1.1 | |
Request Sample
Request sample is a Code Sample element with predefined content:
Code |
curl -X GET ^ --basic ^ --user administrator:t62dVG0YkqdTHO4G4K7z2jQ8 ^ --cacert comodo.ca-bundle ^ https://mycompany.com/api/v1/sample/123/tokens?param=1 |
Member Table
A member table is a table which can be used to describe class members or HTTP request fields. For example, here is how an HTTP request can be described:
|
requiredParam Required |
string |
Description of the required parameter. |
|
optionalParam Optional |
int |
An optional parameter will be described here. |
Those "optional" and "required" marks can be re-styled or removed, if necessary.
Response Sample
Response sample is a JSON Code Sample element with predefined content.
JSON |
|
Response Codes
This element can be used to describe HTTP response codes of your REST API:
200: OK
The request has succeeded, the response body contains the requested information.
403: Forbidden
Returned if the user has no permission to perform the action.
404: Not Found
Returned if an item with the specified name does not exist.