The HTTP API is protected by an API key, passed in as an Authorization header. A number of other parameters are also permitted for each request.
Authorization: Bearer HTTP
header. To authenticate and gain access to Ditto Server, use a static API
key.
Accessible from the portal, the API key is a straightforward implementation for
authenticating your data product’s digital identity with Ditto Server for
authorization.
The API key is a broad, long-lived HTTP API key that, once generated, remains
valid for a maximum of one year.
_id
field; however, Ditto is actively developing a solution for setting queries by mutable fields.FindByID
method, instead of using _id
, pass the document ID as id
.Authorization: Bearer
HTTP header of each of your requests, as demonstrated in the following POST
request (make sure to replace the {canonical-root-url}
parameter with your canonical root URL. See see here for how to get your canonocal root URL):
{"message": "Request Timeout"}
JSON object is returned.error
field name, its associated field value may be any of the following:
Value | Description |
---|---|
error.code | The HTTP Status Code for |
error.message | A short description of the error |
error.data | An optional object which contains further elaboration about the error. |
POST
or DELETE
request — to the HTTP API represents a distinct transaction; and each transaction may consist of a single operation or multiple operations.
If a request to insert an event successfully executes on Ditto Server, the server includes a transaction ID in its response. You can then include that ID in subsequent GET
requests to ensure you’re accessing only the most up-to-date and accurate information for that particular event. For more information, see Transaction IDs, as follows.
GET
request. By including the transaction ID, you ensure that you’re working with the most up-to-date and accurate information by instructing Ditto to wait until the events related to that transaction have been fully applied across the entire Big Peer before accessing it.
GET
request to find
a specific event, instruct Ditto to wait until the associated transaction has been fully applied across the entire mesh network before accessing it. This ensures that you’re working with the most up-to-date and accurate information.
To specify a transaction by its associated ID, in your GET
request to the find
URL endpoint, include the optional X-DITTO-TXN-ID
header set to the value of the transaction ID. For example, a returned transaction ID of 14
:
{canonical-root-url}
parameter with your canonical root URL. See see here for how to get your canonocal root URL):