Skip to content
Philipp Wolfer edited this page Dec 13, 2013 · 1 revision

GET /project/{projectId}/job/{jobId}/callbacks

Request: GET /project/{projectId}/job/{jobId}/callbacks

Returns a collection of callbacks registered for a job. See Using callbacks to monitor translation progress for more details about callbacks.

Query parameters

Parameter Description
per_page An integer value defining how many entries should be returned. Only values between 1 and 100 (both inclusive) are allowed. If not given, this defaults to 100.
page Return search results starting at a given page. Used for paging through more than one page of results.

Request headers

Header Description
Authorization oAuth 2 authentication header
Accept application/json or application/xml

Response status codes

HTTP status Description
200 Ok Successful request.
400 Bad Request There was a problem processing the input data.
404 Not Found The job or project with the given ID does not exist.

Example

Load the jobs for the project with the ID 21cb2c5c-cfa4-46d3-9f3a-5e2390120b27:

GET /v1/project/221085d3-bd0b-4718-8b42-a514d31e7ea8/job/21cb2c5c-cfa4-46d3-9f3a-5e2390120b27/callbacks HTTP/1.1
Host: api.textking.com
Accept: application/json
Authorization: Bearer youraccesstoken

Response:

HTTP/1.1 200 Ok
Content-Type: application/json; charset=utf-8

{
   "page": 1,
   "per_page": 100,
   "total": 2,
   "items":
   [
       {
           "id": "4b1cad66-4ee0-4abe-b761-480f3337c10d",
           "url": "http://example.com/callback",
           "trigger_state": "canceled",
           "extra_data": "customer_id=123",
           "links":
           [
               {
                   "rel": "self",
                   "href": "https://api.textking.com/v1/project/221085d3-bd0b-4718-8b42-a514d31e7ea8/job/21cb2c5c-cfa4-46d3-9f3a-5e2390120b27/callback/4b1cad66-4ee0-4abe-b761-480f3337c10d"
               },
               {
                   "rel": "urn:textking:job",
                   "href": "https://api.textking.com/v1/project/221085d3-bd0b-4718-8b42-a514d31e7ea8/job/21cb2c5c-cfa4-46d3-9f3a-5e2390120b27"
               }
           ]
       },
       {
           "id": "2cfb487a-32c5-4fd5-acf0-836db950f765",
           "url": "http://example.com/callback",
           "trigger_state": "completed",
           "extra_data": null,
           "links":
           [
               {
                   "rel": "self",
                   "href": "https://api.textking.com/v1/project/221085d3-bd0b-4718-8b42-a514d31e7ea8/job/21cb2c5c-cfa4-46d3-9f3a-5e2390120b27/callback/2cfb487a-32c5-4fd5-acf0-836db950f765"
               },
               {
                   "rel": "urn:textking:job",
                   "href": "https://api.textking.com/v1/project/221085d3-bd0b-4718-8b42-a514d31e7ea8/job/21cb2c5c-cfa4-46d3-9f3a-5e2390120b27"
               }
           ]
       }
   ],
   "links":
   [
       {
           "rel": "self",
           "href": "https://api.textking.com/v1/project/221085d3-bd0b-4718-8b42-a514d31e7ea8/job/21cb2c5c-cfa4-46d3-9f3a-5e2390120b27/callbacks?page=1&per_page=100"
       }
   ]
}