Get Time Profiles list
Returns Time Profiles list
Query Parameters
- limit integer required
Possible values: [
10
,20
,30
,50
]Default value:
10
Number of items. Value by default is 10
- page_number integer required
Possible values:
>= 1
Default value:
1
Page number
- order_by string
sorting expression:
[field name 1], [field name 2]... <order (asc or desc)>
- filter string
Filtering expression:
[field name] [compare operator] [value] <logical operator>...
field name see the list of available fields in filter.available_fields[].field_name
value see the list of available values in filter.available_fields[].options object
, may be missingcompare operator see the list of available operators in filter.available_fields[].compare_operators array
Compare operators Description Example eq Equal name eq 'Sherlock Holmes' gt Greater than building gt 10 lt Less than building lt 10 nq Not equal name nq 'Sherlock Holmes' ge Greater than or equal floor ge 5 le Less than or equal floor le 5 Logical operators and logical AND floor le 10 and floor gt 3 or logical OR floor le 3 or floor gt 10 not logical NOT not floor le 3 group operations () group by priority (name eq 'Sherlock Holmes' or building eq 221) and floor gt 10
- 200
- 400
- 401
OK
- application/json
- Schema
- Example (from schema)
- Example
- Equal ` Work week`
- Since Monday, October 29, 2018 1:21:11 P M (1540819271 timestamp)
- Until Monday, October 29, 2018 1:21:13 P M (1540819273 timestamp)
Schema
- list_items object[]
list of time profiles
list_options object
Available options for sorting, filtering and pagination of lists
pagination object
Available pagination options for tables
total_items integerThe total number of items found and reflected across all pages
items_limit integerPossible values: [
10
,25
,50
]Limiting the display of the amount of data for one page
total_pages integerPossible values:
>= 1
The number of pages that hold the requested data
current_page integerPossible values:
>= 1
Current page number
filter object
Available fields
field name compare operators type values name eq, nq string date_from eq, nq, lt, gt, ge, le timestamp date_to eq, nq, lt, gt, ge, le timestamp available_filtering booleanis filtering available
is_filtered booleanis filter applied
available_fields object[]
list of available fields to filter by
field_name stringcompare_operators string[]Possible values: [
eq
,gt
,lt
,nq
,ge
,le
]data_type stringPossible values: [
string
,integer
,timestamp
]options object
anyOf- MOD1
- MOD2
- MOD3
- MOD4
available_values object[]Possible values:
>= 1
This model provide filter available values
available_range integer[]Possible values:
>= 2
,<= 2
This model provide filter integer range
available_values_localized string[]the field is used only for UI localization and is not a filter value.
has_date booleanDefault value:
false
true - has date, false - doesn't
has_time booleanDefault value:
false
true - has time, false - doesn't
has_milliseconds booleanDefault value:
false
true - has milliseconds, false - doesn't
sort object
sort options that can be applied to time profiles
is_sorted booleanDirection of sorting
order stringPossible values: [
asc
,desc
]sorting order, asc - ascending, desc - descending
available_fields string[]Possible values: [
name
,date_from
,date_to
]Available for sorting fields names
{
"list_items": [
{
"time_profile_uid": 1,
"link_id": "1",
"name": "Worker 1",
"time_options": {
"is_all_day": true,
"date_from": 1540819272,
"date_to": 1540819272
},
"repeat_options": {
"repeat_enable": true,
"repeat_format": {
"repeat_type": "day",
"repeat_end": {
"format": "date",
"date": 1540819272
},
"repeat_custom": {
"repeat_point_type": "week",
"repeat_looper": 5,
"repeat_options": [
"MON",
"TUE",
"WED",
"THU",
"FRI"
]
}
}
},
"identifiers": {
"count": 4,
"uid_items": [
11,
13,
23,
42
]
}
},
{
"time_profile_uid": 2,
"link_id": "2",
"name": "Worker 2",
"time_options": {
"is_all_day": true,
"date_from": 1540819272,
"date_to": 1540819272
},
"repeat_options": {
"repeat_enable": true,
"repeat_format": {
"repeat_type": "day",
"repeat_end": {
"format": "date",
"date": 1540819272
},
"repeat_custom": {
"repeat_point_type": "week",
"repeat_looper": 5,
"repeat_options": [
"MON",
"TUE",
"WED",
"THU",
"FRI"
]
}
}
},
"identifiers": {
"count": 4,
"uid_items": [
11,
13,
23,
42
]
}
},
{
"time_profile_uid": 3,
"link_id": "3",
"name": "Worker 3",
"time_options": {
"is_all_day": true,
"date_from": 1540819272,
"date_to": 1540819272
},
"repeat_options": {
"repeat_enable": true,
"repeat_format": {
"repeat_type": "day",
"repeat_end": {
"format": "date",
"date": 1540819272
},
"repeat_custom": {
"repeat_point_type": "week",
"repeat_looper": 5,
"repeat_options": [
"MON",
"TUE",
"WED",
"THU",
"FRI"
]
}
}
},
"identifiers": {
"count": 4,
"uid_items": [
11,
13,
23,
42
]
}
}
],
"list_options": {
"pagination": {
"total_items": 18,
"items_limit": 10,
"total_pages": 2,
"current_page": 1
},
"filter": {
"available_filtering": true,
"is_filtered": true,
"available_fields": [
{
"field_name": "category",
"compare_operators": [
"eq"
],
"data_type": "string",
"options": {
"available_values": [
"string",
0
]
}
}
]
},
"sort": {
"is_sorted": true,
"order": "asc",
"available_fields": [
"name"
]
}
}
}
{
"list_items": [
{
"time_profile_uid": 1,
"link_id": "1",
"name": "Worker 1",
"time_options": {
"is_all_day": true,
"date_from": 1540819272,
"date_to": 1540819272
},
"repeat_options": {
"repeat_enable": true,
"repeat_format": {
"repeat_type": "day",
"repeat_end": {
"format": "date",
"date": 1540819272
},
"repeat_custom": {
"repeat_point_type": "week",
"repeat_looper": 5,
"repeat_options": [
"MON",
"TUE",
"WED",
"THU",
"FRI"
]
}
}
},
"identifiers": {
"count": 4,
"uid_items": [
11,
13,
23,
42
]
}
},
{
"time_profile_uid": 2,
"link_id": "2",
"name": "Worker 2",
"time_options": {
"is_all_day": true,
"date_from": 1540819272,
"date_to": 1540819272
},
"repeat_options": {
"repeat_enable": true,
"repeat_format": {
"repeat_type": "day",
"repeat_end": {
"format": "date",
"date": 1540819272
},
"repeat_custom": {
"repeat_point_type": "week",
"repeat_looper": 5,
"repeat_options": [
"MON",
"TUE",
"WED",
"THU",
"FRI"
]
}
}
},
"identifiers": {
"count": 4,
"uid_items": [
11,
13,
23,
42
]
}
},
{
"time_profile_uid": 3,
"link_id": "3",
"name": "Worker 3",
"time_options": {
"is_all_day": true,
"date_from": 1540819272,
"date_to": 1540819272
},
"repeat_options": {
"repeat_enable": true,
"repeat_format": {
"repeat_type": "day",
"repeat_end": {
"format": "date",
"date": 1540819272
},
"repeat_custom": {
"repeat_point_type": "week",
"repeat_looper": 5,
"repeat_options": [
"MON",
"TUE",
"WED",
"THU",
"FRI"
]
}
}
},
"identifiers": {
"count": 4,
"uid_items": [
11,
13,
23,
42
]
}
}
],
"list_option": {
"pagination": {
"total_items": 18,
"items_limit": 10,
"total_pages": 2,
"current_page": 1
},
"filter": {
"available_filtering": true,
"is_filtered": true,
"available_fields": [
{
"field_name": "name",
"compare_operators": [
"eq"
],
"data_type": "string",
"options": {}
}
]
},
"sort": {
"is_sorted": true,
"order": "asc",
"available_fields": [
"name",
"date_from",
"date_to"
]
}
}
}
{
"list_items": [
{
"time_profile_uid": 1,
"name": "Work week",
"time_options": {
"is_all_day": true,
"date_from": 1540819272,
"date_to": 1540819272
},
"repeat_options": {
"repeat_enable": true,
"repeat_format": {
"repeat_type": "day",
"repeat_end": {
"format": "date",
"date": 1540819272
},
"repeat_custom": {
"repeat_point_type": "week",
"repeat_looper": 5,
"repeat_options": [
"MON",
"TUE",
"WED",
"THU",
"FRI"
]
}
}
},
"identifiers": {
"count": 4,
"uid_items": [
11,
13,
23,
42
]
}
}
],
"list_option": {
"pagination": {
"total_items": 18,
"items_limit": 10,
"total_pages": 2,
"current_page": 1
},
"filter": {
"available_filtering": true,
"is_filtered": true,
"available_fields": [
{
"field_name": "name",
"compare_operators": [
"eq"
],
"data_type": "string",
"options": {}
}
]
},
"sort": {
"is_sorted": true,
"order": "asc",
"available_fields": [
"name",
"date_from",
"date_to"
]
}
}
}
{
"list_option": {
"pagination": {
"total_pages": 1,
"items_limit": 10,
"total_items": 1,
"current_page": 1
},
"filter": {
"is_filtered": true,
"available_filtering": true,
"filter_format": "number",
"filter_type": "more",
"available_fields": [
"date_to",
"date_from",
"name"
],
"filter_field": "date_from",
"filter_value": 1540819271
},
"sort": {
"is_sorted": true,
"order": "asc",
"available_fields": [
"name",
"date_from",
"date_to"
]
}
},
"list_items": [
{
"repeat_options": {
"repeat_enable": true,
"repeat_format": {
"repeat_end": {
"date": 1540819272,
"format": "date"
},
"repeat_type": "day"
}
},
"identifiers": {
"count": 1,
"uid_items": [
1
]
},
"time_profile_uid": 1,
"time_options": {
"is_all_day": true,
"date_to": 1540819272,
"date_from": 1540819272
},
"name": "Work week"
}
]
}
{
"list_option": {
"pagination": {
"total_pages": 1,
"items_limit": 10,
"total_items": 1,
"current_page": 1
},
"filter": {
"available_filtering": true,
"is_filtered": true,
"available_fields": [
{
"field_name": "name",
"compare_operators": [
"eq"
],
"data_type": "string",
"options": {}
}
]
},
"sort": {
"is_sorted": true,
"order": "asc",
"available_fields": [
"name",
"date_from",
"date_to"
]
}
},
"list_items": [
{
"repeat_options": {
"repeat_enable": true,
"repeat_format": {
"repeat_end": {
"date": 1540819272,
"format": "date"
},
"repeat_type": "day"
}
},
"identifiers": {
"count": 1,
"uid_items": [
1
]
},
"time_profile_uid": 1,
"time_options": {
"is_all_day": true,
"date_to": 1540819272,
"date_from": 1540819272
},
"name": "Work week"
}
]
}
- Wrong pagination options
- Wrong page number
- Wrong sort field
- Wrong sort type
- Wrong filter options
- Requested page doesn't exist
- application/json
- Schema
- Example (from schema)
- Wrong pagination limit
- Wrong page number
- Wrong sort type
- Wrong filter options
- Requested page doesn't exist
Schema
- error string
error type/info
{
"error": true
}
{
"error": "Wrong limit"
}
{
"error": "Wrong page_number"
}
{
"error": "Wrong type"
}
{
"error": "Wrong filter"
}
{
"error": "requested page doesn't exist;"
}
Log In
- application/json
- Schema
- Example (from schema)
- Example
Schema
- error string
error message
{
"error": "Log In"
}
{
"error": "Log In"
}