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": "Calling debtors",
"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 output. |
|
|
Maximum number of resources in the list. |
|
|
Sorting order of resources in the list. |
|
|
Transformation of composite fields to flat form. |
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": "Calling debtors",
"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": "Cleaning daily",
"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"
}
}
]
Getting service task data
Request
| Name | Type | Description |
|---|---|---|
|
|
List of fields to output. |
|
|
Transformation of composite fields to flat form. |
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": "Calling debtors",
"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"
}
}
Modifying 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": "Calling debtors",
"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 a service script identifier
Searches for a resource by the specified key and returns the identifier(s) for building the endpoint.
Key fields for search: id