Operations API Quick Guide
This is a brief introduction to Intento Operations API.
The full REST API documentation is available at the link: https://github.com/intento/intento-api
List of operations
To obtain the list of operations, send a GET request to Intento Operations API at https://api.inten.to/operations/ as in the following example:
curl -XGET -H 'apikey: <YOUR_API_KEY>' https://api.inten.to/operations/'
Please replace <YOUR_API_KEY> with your Production Key that is available at https://console.inten.to/dashboard.
The response contains an array of the last operations along with technical information:
{
"prev": "created_at__lt=1591127696.83516",
"next": null,
"count": 1,
"data": [
{
"id": "32d106c9-9999-4f78-b62b-6828bf9a69b0",
"status": "success",
"intent": "translate",
"finished_at_ts": 1591128622.38182,
"created_at_ts": 1591128622.04507,
"meta": {
"providers": [
{
"id": "ai.text.translate.google.translate_api.v3",
"vendor": "Google Cloud",
"logo": "https://inten.to/static/img/api/ggl_translate.png",
"description": "Advanced Translation API",
"auth": null
}
],
"from": null,
"to": "en",
"format": null,
"glossary": null,
"smart_routing": "smart_routing_name",
"category": "default",
"own_keys": false,
"size": 381,
"intento_user_agent": [
"Intento.SyncWrapper/1.0.0"
],
"userdata": {}
}
}
]
}
Parameters
limit (int) - Maximum count of returned operations:
The default is 25
Overall max. is 1000
created_at_gt (float) - Min. timestamp filter (time of creation)
created_at_lt (float) - Max. timestamp filter (time of creation)
Attributes of The Technical Common Part of The Response
prev (string) - The timestamp of the previous page of operations.
For example, if prev returns: created_at__lt=1576239312.41583, then the previous page of operations will be available at: /operations/?created_at__lt=1576239312.41583next (string) - The timestamp of the next page of operations.
For example, if next returns: created_at__gt=1576239312.41583, then the next page of operations will be available at: /operations/?created_at__gt=1576239312.41583count (int) - Number of results in data array (max 1000 items)
data (list) - List of operation objects
Attributes of The Operation Object
id (string) - Unique identifier for the operation
error (dict) - Dict of unique errors during fulfillment operation
status (string) - Status of the operation. Possible values:
in_progress - Operation is running
success - Operation finished successfully without errors
partial_success - Operation finished but with errors
failed - Operation finished, but there is no result due to errors
intent (string) - Name/title of the intent
common_error_reason (string) - Summary of all errors (both provider and non-provider)
own_keys (boolean) - If the operation was made with its own keys
created_at_ts (float) - Time at which the operation was created. Measured in seconds since the Unix epoch.
finished_at_ts (float) - Time at which the operation finished. Measured in seconds since the Unix epoch.
meta (dict) - Meta information about the operation. This information can vary depending on the intent.
meta.smart_routing (string|null) - If the operation used smart routing. Possible values:
null - No smart routing was used
default - Intento default smart routing scheme was used
id - If you used your smart routing scheme
meta.size (int) - Operation size in bytes
meta.own_keys (boolean) - If the operation was made with its own keys.
meta.from (string) - Translation language from. Only for translate intent.
meta.to (string) - Translation language to. Only for translate intent.
meta.format (string|null) - Format of the operation's data.
meta.glossary (string|null) - If the operation used glossary. Possible values:
null value - No glossary
id - If glossary was provided in the operation.
Only for translate intent.
meta.category (string) - If the operation used category. Possible values:
default - No category in the operation
id - If a category was provided in the operation
Only for translate intent.
meta.providers (list) - Providers used in the operation.
meta.intento_user_agent (list) - Intento apps which processed operation.