Work schedule days (workdays)
Requests
| HTTP verb | Endpoint | Description |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Creating a new schedule day
Request
Field description: workday entity
POST /rest/v1/domain/workdays HTTP/1.1
Content-Type: application/json; charset=utf-8
workday entity
Response
Field description: workday entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "23f7d261-016c-bd79-505d-50e54938780c",
"date": "2018-10-10",
"isannual": 0,
"isworkday": 2,
"asdow": 0,
"periods": [
{
"timestart": 360,
"timestop": 900
}
],
"opts": {
"title": "",
"comment": ""
},
"ext": {
"ct": "2019-08-23T07:55:39.99Z",
"lwt": "2019-08-23T07:55:39.99Z"
}
}
Getting the list of schedule days
Request
| Name | Type | Description |
|---|---|---|
|
|
Filter by field values. |
|
|
List of fields to output. Available fields for output: id, date, isannual, isworkday, asdow, opts.title, 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/domain/workdays?filter={"isannual":"true"}&offset=0&limit=3 HTTP/1.1
Response
Field description: workday entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"id": "f66c2eed-016c-bd78-3bc7-50e54938780c",
"date": "0000-05-01",
"isannual": 1,
"isworkday": 0,
"asdow": 0,
"periods": [],
"opts": {
"title": "Peace, labor, May"
},
"ext": {
"ct": "2019-08-23T07:54:29.19Z",
"lwt": "2019-08-23T07:54:29.19Z"
}
},
{
"id": "d290f0cb-016c-bd77-c82d-50e54938780c",
"date": "2019-09-01",
"isannual": 0,
"isworkday": 1,
"asdow": 5,
"periods": [],
"opts": {
"title": "Worker for Friday"
},
"ext": {
"ct": "2019-08-23T07:53:59.59Z",
"lwt": "2019-08-23T07:53:59.59Z"
}
},
{
"id": "23f7d261-016c-bd79-505d-50e54938780c",
"date": "2018-10-10",
"isannual": 1,
"isworkday": 2,
"asdow": 0,
"periods": [
{
"timestart": 540,
"timestop": 1080
}
],
"opts": {
"title": ""
},
"ext": {
"ct": "2019-08-23T07:55:39.99Z",
"lwt": "2019-08-23T07:55:39.99Z"
}
}
]
Getting schedule day data
Request
| Name | Type | Description |
|---|---|---|
|
|
List of fields to output. |
|
|
Transformation of composite fields to flat form. |
GET /rest/v1/domain/workdays/23f7d261-016c-bd79-505d-50e54938780c HTTP/1.1
Response
Field description: workday entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "23f7d261-016c-bd79-505d-50e54938780c",
"date": "2018-10-10",
"isannual": 0,
"isworkday": 2,
"asdow": 0,
"periods": [
{
"timestart": 360,
"timestop": 900
}
],
"opts": {
"title": "",
"comment": ""
},
"ext": {
"ct": "2019-08-23T07:55:39.99Z",
"lwt": "2019-08-23T07:55:39.99Z"
}
}
Modifying schedule day data
Fields prohibited for modification: id
Request
Field description: workday entity
PATCH /rest/v1/domain/workdays/23f7d261-016c-bd79-505d-50e54938780c HTTP/1.1
Content-Type: application/json; charset=utf-8
workday entity
Response
Field description: workday entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "23f7d261-016c-bd79-505d-50e54938780c",
"date": "2018-10-10",
"isannual": 1,
"isworkday": 2,
"asdow": 0,
"periods": [
{
"timestart": 540,
"timestop": 1080
}
],
"opts": {
"title": "",
"comment": ""
},
"ext": {
"ct": "2019-08-23T07:55:39.99Z",
"lwt": "2019-09-11T10:19:59.02Z"
}
}