Out of Office Periods API
Bu içerik henüz dilinizde mevcut değil.
- List out of office periods
- Get a single out of office period
- Create an out of office period
- Update an out of office period
- Fields
List out of office periods
Заголовок раздела «List out of office periods»List all out of office periods for an account:
GET /out_of_office_periodsResponse
Заголовок раздела «Response»Status: 200 OK[ { "id": 3, "sourceID": null, "person": { "id": 196, "name": "Ellen Brown" }, "start_at": "2019-11-18T06:00:00Z", "end_at": "2019-11-18T15:45:15Z", "created_at": "2019-11-18T08:10:52-06:00", "updated_at": "2019-11-18T09:45:16-06:00" }, "..."]The response contains these fields by default. Filtering and pagination are available to reduce/limit the collection of out of office periods.
Predefined Filters
Заголовок раздела «Predefined Filters»The following predefined filters are available:
/out_of_office_periods/open: List all out of office periods for which the end time is in the future/out_of_office_periods/completed: List all out of office periods for which the end time is in the past
Collection Fields
Заголовок раздела «Collection Fields»By default the following fields will appear in collections of out of office periods:
id
sourceID
person
start_at
end_at
created_at
updated_at
Obtain a different set of fields using the ?fields= parameter .
Filtering
Заголовок раздела «Filtering»Filtering is available for the following fields :
id
source
sourceID
person
start_at
end_at
created_at
updated_at
Sorting
Заголовок раздела «Sorting»By default a collection of out of office periods is sorted
ascending
by
start_at
.
The following fields are accepted by the ?sort= parameter :
id
sourceID
person_id
start_at
end_at
created_at
updated_at
Get a single out of office period
Заголовок раздела «Get a single out of office period»GET /out_of_office_periods/:idResponse
Заголовок раздела «Response»Status: 200 OK{ "approval_delegate": null, "created_at": "2019-11-18T08:10:52-06:00", "end_at": "2019-11-18T15:45:15Z", "id": 3, "person": { "id": 196, "name": "Ellen Brown" }, "reason": "Time Off - Vacation", "source": "R-Service", "sourceID": null, "start_at": "2019-11-18T06:00:00Z", "time_allocation": { "id": 2, "group": "Time Off", "name": "Vacation", "account": { "id": "dc", "name": "Widget Data Center" }, "localized_name": "Vacation" }, "updated_at": "2019-11-18T09:45:16-06:00"}The response contains these fields .
Create an out of office period
Заголовок раздела «Create an out of office period»POST /out_of_office_periodsWhen creating a new out of office period these fields are available.
Response
Заголовок раздела «Response»Status: 201 Created{ "created_at": "...", "...": "..."}The response contains all fields of the created out of office period and is similar to the response in Get a single out of office period
Update an out of office period
Заголовок раздела «Update an out of office period»PATCH /out_of_office_periods/:idWhen updating an out of office period these fields are available.
Response
Заголовок раздела «Response»Status: 200 OK{ "created_at": "...", "...": "..."}The response contains all fields of the updated out of office period and is similar to the response in Get a single out of office period
approval_delegate
Optional reference to Person — The person who is selected as the approval delegate for the out of office period.
created_at
Readonly datetime — The date and time at which the out of office period was created.
end_at
Required datetime
id
Readonly integer — The unique ID of the out of office period.
person
Required reference to Person — The person who is out of office.
reason
Optional string (max 80) — The Reason field is used to enter the reason of the out of office period. Required when the description category of the time allocation is required.
source
Optional string (max 30) - See source
sourceID
Optional string (max 128) - See source
start_at
Required datetime
time_allocation
Optional reference to Time Allocation — The time allocation field is used to generate time entries for the out of office period. Only the time allocations without service and customer that are linked to the person’s organization can be selected. This field is required if at least one time allocation exists that meets those conditions.
effort_class
Optional reference to Effort Class — The Effort class field is used to generate time entries for the out of office period. This field is applicable if the timesheet settings linked to the person’s organization has one or more effort classes.
updated_at
Readonly
datetime
— The date and time of the last update of the out of office period. If the out of office period has no updates it contains the
created_at
value.