Jump to: navigation, search

Query Task by ID

ApiRef2.png GET /services/${service_id}/tasks/${task_id}
Available since: 8.0.100.00

Description

Queries a task by its ID for the given service.

Operation

ID CV.WS.SRV.16
Method GET
URL /services/${service_id}/tasks/${task_id}
Name   Type   Mandatory Description
URI Parameters
${service_id} integer yes The service ID.
${task_id} integer yes The task ID.
extensions string no Names (separated by commas) of the task extensions to return with the matching task resources. You can specify as many extension names as needed as long as you previously created the corresponding schema with Create Task Extension Schema. By default, no extension is returned.

Response

The Context Management Service API answers with HTTP codes for every request. The following table shows the correct response for a successful request. See HTTPResponseCodesandErrors for further details on the possible codes that this operation can return.

Response
HTTP code 200
HTTP message OK
Field Name   Type   Mandatory Description
Body: Task<ref>This response includes the Task representation associated with the task ID.</ref>
state_id integer no The 32-bit integer ID for the state service associated with the task.
task_id integer yes The 32-bit integer ID of the task, assigned by the UCS when the task is started.
task_type long or string yes The unique ID associated with the type of service<ref name="business">Refer to Configuration Options for more details on Business Attribute mapping.</ref>. For instance, this ID can be the DB ID of a value in the Service Type Business Attribute.
service_id integer yes if not specified in top-level resources<ref name="toplevel">Only top-level representations include this field. For instance, if your application retrieves a service which includes nested states and tasks, only the top-level service representations contains this ID.</ref> The service's unique ID if the task is not part of a top-level state or service resource which includes a service ID.
started Task Start Event yes Related start event.
This start event does not contain the "est_duration" field, if this field is already specified at the task level.
completed Task End Event no The related end event if this task is completed.
This end event does not include the "disposition" and "disposition_desc" fields if they are already specified at the task level.
customer_id string no The customer's unique ID<ref name="toplevel"/>.
est_duration integer no The estimated time for completing the item, in seconds.
duration integer no The total duration in milliseconds.
Only relevant for completed tasks.
disposition long or string no ID of the Business Disposition ID<ref name="business"/>.
Only relevant for completed tasks.
disposition_desc string no The reason for assigning the business disposition with the service element. Limited to 256 characters.
<extension name>
Supported since 8.0.2
Extension (single-valued)
or Extension[] (multi-valued)
no Task extension if specified in parameter of the operation.

<references />

Example

Operation

 GET /services/942/tasks/12?extensions=Survey,Proposal

Result

{
 "interaction_id":42,
 "est_duration":460,
 "state_id":24,
 "task_type":55,
 "Survey": 
  {
   "url":"http://ourServer/storage/userAnswers",
   "question1":7,
   "question2":true,
   "question3":"will be better with cable tv and on-demand video"
  },
  "Proposal": [
   {
    "car type":"cabriolet",
    "price":25 000,
    "seats":2,
    "comments":"200 cv, hardtop"
   },
   {
    "car type":"S.U.V.",
    "price":70 000,
    "seats":8,
    "comments":"4wd, leather seats"
   }
   ]
}
This page was last edited on November 23, 2017, at 16:00.
Comments or questions about this documentation? Contact us for support!