Getting started

This page describes the authorization method is used to access the API, requests & responses.

Authorization

Unique API key is generated for each access user. The API key should be sent in the header of every request you made to any endpoint:

X-API-Key: NTHgbr78pEDt0MyJWRs9G_qE2H6WmcVX

API keys are supposed to be a secret that only the client and server know. So it's very important to keep you API key in secret and make all requests revealing API key on the backend.

How to get API Key?

You can start using API for FREE right now. Request your API Key @ https://api.de-facto.pro

Requests

GET

Additional parameters always sent in as path (URL) parameter. Example of GET request with additional parameter:

GET https://api.de-facto.pro/entries/73987c90c1f90b646d2d594506ee45d235561398ddeefd1bfdd52d00ff01097c

POST

You can send POST parameters in any convenient way:

  • asform-data or application/x-www-form-urlencoded

  • asapplication/json

If you send POST parameters as JSON, don't forget to specify it in the header of request:

X-Api-Key: YOUR-API-KEY Content-Type: application/json

Responses

Responses to all requests are always sent as JSON.

Success responses

Success responses contain result object, which contains the result of your request:

{
"result": {
"chain_id": "5d2e9da0d746e72506f5ddcfe1522c429787cba79a152c9cf0cb313897d596cf",
"entry_hash": "1d8fb12a84cdc6bcc8b40f76aa883206726a935f2e0d6d35cad9b3ae4058b7f7",
"content": "Queue test content",
"external_ids": [
"Queue test",
"Test #5"
],
"status": "queue"
}
}

Error responses

Error responses contain "result": false , error code and error message:

{
"result": false,
"code": 400,
"error": "{\"chain_id\":[\"Chain Id is invalid.\"]}"
}