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

  1. limit (int) - Maximum count of returned operations:

    • The default is 25

    • Overall max. is 1000

  2. created_at_gt (float) - Min. timestamp filter (time of creation)

  3. created_at_lt (float) - Max. timestamp filter (time of creation)

Attributes of The Technical Common Part of The Response

  1. 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.41583

  2. next (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.41583

  3. count (int) - Number of results in data array (max 1000 items)

  4. data (list) - List of operation objects

Attributes of The Operation Object

  1. id (string) - Unique identifier for the operation

  2. error (dict) - Dict of unique errors during fulfillment operation

  3. 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

  4. intent (string) - Name/title of the intent

  5. common_error_reason (string) - Summary of all errors (both provider and non-provider)

  6. own_keys (boolean) - If the operation was made with its own keys

  7. created_at_ts (float) - Time at which the operation was created. Measured in seconds since the Unix epoch.

  8. finished_at_ts (float) - Time at which the operation finished. Measured in seconds since the Unix epoch.

  9. meta (dict) - Meta information about the operation. This information can vary depending on the intent.

  10. 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

  11. meta.size (int) - Operation size in bytes

  12. meta.own_keys (boolean) - If the operation was made with its own keys.

  13. meta.from (string) - Translation language from. Only for translate intent.

  14. meta.to (string) - Translation language to. Only for translate intent.

  15. meta.format (string|null) - Format of the operation's data.

  16. 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.

  17. 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.

  18. meta.providers (list) - Providers used in the operation.

  19. meta.intento_user_agent (list) - Intento apps which processed operation.