For API beginners, reading documentation can be a handful. This document will teach you how to read the Civis API documentation.
If you know which section you'd like to query the API against, you can click on it from the list at the top of the API documentation page. Next you can expand any endpoint to access the specific documentation for that endpoint.
When interacting with the Civis API, there are three parts to each API call:
- HTTP Verb
- Endpoint
- Parameters
If you aren't sure what any of those terms mean, you can read about RESTful APIs.
HTTP Verb
You can find the HTTP verb in the section header. It's the verb that's in all caps to the right of the endpoint description. For example, the first endpoint in the Imports section is GET /imports, where the HTTP verb is "GET".
Endpoint
Just like the HTTP verb, the endpoint is contained in the section header. Using the previous example, "/imports" is the endpoint.
Parameters
Input parameters are displayed when you expand an endpoint section header. Each parameter has a type and description to help educate you on what it's used for.
Response
The response parameters are contained below the input parameters. This section shows the information that will be returned if a successful API call is made. For instance, if you submit an API call to make a new Database Import, the response will contain the ID of the import. This information can be useful when writing more complex code that uses multiple API calls to complete your work.
Comments
0 comments
Please sign in to leave a comment.