When working with the Clarify API, you often don't work with it directly. You probably work with it through an SDK (Software Development Kit) in a programming language such as Python or Go. This documentation is for the Clarify API, which is the underlying service that these tools talk to. Knowledge of this layer is important for deveoping such tools, or for understanding how calls are validated or rate limted in this layer. We will include examples from the different SDKs in the doc so that you can more easily understand how the API calls relate to to the SDK that you are using.
The Transport Layer
In princiapal, there could be multiple transport layers for an RPC API, but for now, we only support HTTP. The transport layers has three main roles:
- Allow communication between the integration code and the server. We do this by allowing a JSON RPC response to be embedded in a HTTP POST request body.
- Authenticate the client to verify that the integration is who it says it is. We do this by checking the content of the
- Version selection in order to match the integration with the API version it was written for. We do this by checking the conteint of the
You can read more about each of this secitons in the sections that follows.
The API Layer
The Clarify API uses HTTP as the transport layer for JSON RPC 2.0. More specifically, it relies on POST requests against
https://api.clarify.io/v1/rpc. For a request to be valid, it must include the headers defined in this sections, as well as a valid RPC Request in the body.
For the response, clients should also decide on how they want to handle status codes returned by the transport layer. Only when the status code is 200, will there be an RPC Response available in the response body.