Standard
To ensure seamless integration and interoperability, it is recommended that all Exchange Oracles that want their jobs listed in HUMAN App adhere to certain endpoint standards.
The interaction between the annotation tool and the Exchange Oracle is unique for each annotation tool, and therefore, it is not outlined in this document.
Registration (OPTIONAL
)
OPTIONAL
)POST
/register
Used for registering a user in Exchange Oracle. If an additional registration process is needed, Exchange Oracle operator must store two additional parameters in KVStore:
registration_needed: true
registration_instructions: URL
Headers
Name | Value |
---|---|
Authorization* | Bearer token (JWT) generated by Reputation Oracle containing |
Response
Webhook
POST
/webhook
Used for receiving notifications about various events within the Protocol
Headers
Name | Type | Description |
---|---|---|
human-signature* | String | Signature used for origin authentication. |
Request Body
Name | Type | Description |
---|---|---|
escrow_address* | String | The address of the escrow involved in the event. |
chain_id* | Number | The identifier of the chain where the escrow exists. |
event_type* | Enum | The type of event, which can be one of the following:
|
event_data | Object | It gives information about the event, like refusal reason for an invalid submission. |
escrow_created
escrow_canceled
submission_rejected
Get jobs list
GET
/job
Allows retrieving a list of jobs available to be solved
Query Parameters
Name | Type | Description |
---|---|---|
chain_id | Number | Chain ID from which the user wants to get the list of jobs. If empty return all chains. |
page_size | Number | Specifies the number of items to include in each page. Max 10. Default 5. |
page | Number | Indicates the page number. Default 0. |
sort | String | Specifies the order in which the items are returned based on |
job_type | String | Job type |
fields | String[] | List (comma separated values) of the fields that should be returned for every available job. Available fields:
|
escrow_address | String | Escrow address. Should be used in case requester wants to return only details about the specific escrow. |
created_after | String | Filter to retrieve jobs created after the specified date. |
updated_after | String | Filter to retrieve jobs updated after the specified date. |
sort_field | String | Field used for sorting returned results. Default value: Available fields:
|
status | Number | Job status:
If no status is provided, return all. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer token (JWT) generated by Reputation Oracle containing |
Assign job
POST
/assignment
Request to get a job assigned to a specific user
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer token (JWT) generated by Reputation Oracle containing |
Request Body
Name | Type | Description |
---|---|---|
escrow_address* | String | Escrow address |
chain_id* | Number | Chain id |
Get jobs assigned
GET
/assignment
Allows retrieving a list of jobs assigned to a specific worker
Query Parameters
Name | Type | Description |
---|---|---|
status | Enum | Status of the assignment. Values:
|
page | Number | Indicates the page number. Default 0. |
sort | String | Specifies the order in which the items are returned based on |
page_size | Number | Specifies the number of items to include in each page. Max value: 10. Default: 5 |
escrow_address | String | Escrow address |
chain_id | Number | Chain id |
assignment_id | String | Assignment id. Should be used in case requester wants to return only details about the specific assignment. |
sort_field | String | Field used for sorting returned results. Default value: Available fields:
|
job_type | String | Job type |
created_after | String | Filter to retrieve assignments created after the specified date. |
updated_after | String | Filter to retrieve assignments updated after the specified date. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer token (JWT) generated by Reputation Oracle containing |
Resign job
POST
/assignment/resign
This endpoint should be called when a user who has been assigned a job decides they no longer want to solve it.
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer token (JWT) generated by Reputation Oracle containing |
Request Body
Name | Type | Description |
---|---|---|
assignment_id* | String | Assignment id |
Get assignment stats
GET
/stats/assignment
Request to get assignment stats for the worker that sends the request.
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | Bearer token (JWT) generated by Reputation Oracle containing |
Oracle stats
GET
/stats
Oracle statistics
This is an open endpoint, but rate limiter should be applied
Last updated