Service tasks (svctasks)
Requests
HTTP verb | Endpoint | Description |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Creating a new service task
Request
Field Description: svctask entity
POST /rest/v1/service/svctasks HTTP/1.1
Content-Type: application/json; charset=utf-8
svctask entity
Response
Field Description: svctask entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "380daae6-016c-cdd4-606e-50e54938780c",
"name": "Debtor calls",
"isenabled": 0,
"svcscriptcode": "dialByCallList",
"sitemode": "all",
"sites": "",
"isregular": 1,
"overlap": 1,
"intervalsec": 3600,
"dtstart": "2019-02-20T08:00:00Z",
"dtstop": "2020-02-20T08:00:00Z",
"schedule": "work",
"periods": [],
"opts": {
"title": "",
"comment": ""
},
"ext": {
"ct": "2019-08-26T12:09:03.34Z",
"lwt": "2019-08-26T12:09:03.34Z"
}
}
Getting the list of service tasks
Request
Name | Type | Description |
---|---|---|
|
|
Filter by field values. |
|
|
List of fields to output. Available fields for output: id, name, isenabled, svcscriptcode, sitemode, isregular, overlap, intervalsec, dtstart, dtstop, schedule, ext.lwt, ext.ct. |
|
|
Offset in the list of resources to be issued. |
|
|
The maximum number of resources in the list. |
|
|
The sort order of the resources in the list. |
|
|
Conversion to flat form of composite fields. |
GET /rest/v1/service/svctasks?offset=0&limit=2 HTTP/1.1
Response
Field Description: svctask entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"id": "380daae6-016c-cdd4-606e-50e54938780c",
"name": "Debtor calls",
"isenabled": 0,
"svcscriptcode": "dialByCallList",
"sitemode": "all",
"isregular": 1,
"overlap": 1,
"intervalsec": 3600,
"dtstart": "2019-02-20T08:00:00Z",
"dtstop": "2020-02-20T08:00:00Z",
"schedule": "work",
"ext": {
"ct": "2019-08-26T12:09:03.34Z",
"lwt": "2019-08-26T12:09:03.34Z"
}
},
{
"id": "86228b15-016c-cdef-ccce-50e54938780c",
"name": "Daily cleaning",
"isenabled": 1,
"svcscriptcode": "cleardata",
"sitemode": "all",
"isregular": 1,
"overlap": 1,
"intervalsec": 86400,
"dtstart": "2019-02-20T08:00:00Z",
"dtstop": "2020-02-20T08:00:00Z",
"schedule": "work",
"ext": {
"ct": "2019-08-26T12:39:00.55Z",
"lwt": "2019-08-26T12:39:00.55Z"
}
}
]
Receiving service task data
Request
Name | Type | Description |
---|---|---|
|
|
A list of fields to output. |
|
|
Conversion to flat form of composite fields. |
GET /rest/v1/service/svctasks/380daae6-016c-cdd4-606e-50e54938780c HTTP/1.1
Response
Field Description: svctask entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "380daae6-016c-cdd4-606e-50e54938780c",
"name": "Debtor calls",
"isenabled": 0,
"svcscriptcode": "dialByCallList",
"sitemode": "all",
"sites": "",
"isregular": 1,
"overlap": 1,
"intervalsec": 3600,
"dtstart": "2019-02-20T08:00:00Z",
"dtstop": "2020-02-20T08:00:00Z",
"schedule": "work",
"periods": [],
"opts": {
"title": "",
"comment": ""
},
"ext": {
"ct": "2019-08-26T12:09:03.34Z",
"lwt": "2019-08-26T12:09:03.34Z"
}
}
Changing service task data
Fields prohibited for modification: id
Request
Field Description: svctask entity
PATCH /rest/v1/service/svctasks/380daae6-016c-cdd4-606e-50e54938780c HTTP/1.1
Content-Type: application/json; charset=utf-8
svctask entity
Response
Field Description: svctask entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "380daae6-016c-cdd4-606e-50e54938780c",
"name": "Debtor calls",
"isenabled": 1,
"svcscriptcode": "dialByCallList",
"sitemode": "firstsite",
"sites": "SITE1, SITE2",
"isregular": 1,
"overlap": 1,
"intervalsec": 3600,
"dtstart": "2019-02-20T08:00:00Z",
"dtstop": "2020-02-20T08:00:00Z",
"schedule": "all",
"periods": [],
"opts": {
"title": "",
"comment": ""
},
"ext": {
"ct": "2019-08-26T12:09:03.34Z",
"lwt": "2019-09-10T12:38:40.11Z"
}
}
Deleting a service task
Searching for the service scenario identifier
Searches the resource for the specified key, returns the identifier(s) to build the endpoint.
Key fields to search for: id
Request
LOOKUP /rest/v1/service/svctasks HTTP/1.1
Content-Type: application/json; charset=utf-8
"380daae6-016c-cdd4-606e-50e54938780c"
Response
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
[
"380daae6-016c-cdd4-606e-50e54938780c"
]
HTTP/1.1 404 Not Found
Content-Type: application/json; charset=utf-8
{
"error_code": 1404,
"error_message": "Lookup failed"
}