Get quota
get
/rest/ofscCapacity/v2/quota
The function allows to read the quota information for set of days on different quota levels - Capacity Areas, Capacity Categories, Time slots or Intervals. The quota values can be retreived from various levels accordingly to the quota type configuration of each particular Capacity Area.
Request
Query Parameters
-
aggregateResults: boolean
If this parameter is true then the quota values for all requested capacity areas are aggregated and returned as a single structure. If false, then the quota values for each area are returned separately. Note that the result can be aggregated only if all requested Capacity Areas have same quota configuration type (e.g., time-slot based or based on intervals). If aggregation is requested for mixed types in one request, the error will be returned. The default value is false.
-
areas: array[string]
Collection Format:
csv
The list of labels of the capacity areas. It is also possible to use resource external id(s) of a grouping resource item(s), under which the capacity areas are configured, for such the function will scan and collect all the nested Capacity Areas for processing. The default value is the root item of the resource tree, so that all existing capacity areas will be processed. -
categories: array[string]
Collection Format:
csv
The list of labels of the capacity categories. If the parameter is not specified then all categories configured for the areas will be processed. -
categoryLevel: boolean
This parameter indicates if the qouta information from the Capacity Category level should be returned. It can be used for areas configured with time-slot based quota and with quota by intervals. The default value is false.
-
dates(required): array[string]
Collection Format:
csv
The list of dates in the YYYY-MM-DD format, for which the quota information is retrieved. -
intervalLevel: boolean
This parameter indicates if the qouta information from the Intervals level should be returned. It can be used for areas configured with quota by intervals. The default value is false.
-
returnStatuses: boolean
This parameter indicates if the information about the quota statuses at various levels should be returned. The default value is false.
-
timeSlotLevel: boolean
This parameter indicates if the qouta information from the Time Slots level should be returned. It can be used for areas configured with time-slot based quota. The default value is false.
Response
Supported Media Types
- application/json
- application/schema+json
200 Response
This section describes the 200 status response for this operation.
Root Schema : v2-quota-result
Type:
Show Source
object
-
items:
array items
Array of objects with quota information for each requested date.
Nested Schema : items
Type:
array
Array of objects with quota information for each requested date.
Show Source
Nested Schema : v2-quota
Type:
Show Source
object
-
areas:
array areas
Array of objects containing the quota information for each requested capacity area or the aggregated result.
-
date:
string(date)
Title:
Date
Date in the YYYY-MM-DD formatExample:2016-07-22
Nested Schema : areas
Type:
array
Array of objects containing the quota information for each requested capacity area or the aggregated result.
Show Source
Nested Schema : v2-quota-area
Type:
Show Source
object
-
bookedActivities:
integer
The number of booked activities.
-
categories:
array categories
-
closeTime:
string
Time when quota is to be closed automatically in the time zone of the selected capacity bucket in the 'YYYY-MM-DD HH:MM:SS' format. This parameter is returned if the request parameter returnStatuses is trueExample:
2023-12-15 12:00:00
-
intervals:
array intervals
-
label:
string
Minimum Length:
1
Maximum Length:40
The label of the Capacity Area. This field is not returned for the aggregated result.Example:quota_bucket
-
maxAvailable:
integer
The total working time of the resources.
-
maxAvailableByPlans:
integer
The total working time of based on plans.
-
minQuota:
integer
The minimal quota value in minutes. This field is not returned for the aggregated result.
-
otherActivities:
integer
The total travel time and duration of activities that are not part of capacity management.
-
quota:
integer
The quota value in minutes. For the quota based on intervals it contains null if the value is not defined.
-
quotaIsAutoClosed:
boolean
Indicates if the booking has been closed at this level automatically by schedule. This parameter is returned if the request parameter returnStatuses is true
-
quotaIsClosed:
boolean
Indicates if the booking has been closed at this level. This parameter is returned if the request parameter returnStatuses is true
-
quotaIsReopened:
boolean
Indicates if the booking has been manually reopened after closure. This parameter is returned if the request parameter returnStatuses is true
-
quotaPercent:
number
The quota value in percent. For the quota based on intervals it contains null if the value is not defined. This field is not returned for the aggregated result.
-
timeSlots:
array timeSlots
-
used:
integer
The amount of consumed capacity in minutes.
-
usedQuotaPercent:
number
The percent of the daily quota that is used by booked activities. This field is not returned for the aggregated result.
Nested Schema : categories
Type:
Show Source
array
-
Array of:
object v2-quota-area-categories
Array of objects containing the quota information for each Capacity Category. This list is returned for Capacity Areas with quota by intervals configuration if the request parameter categoryLevel is true.
Nested Schema : intervals
Type:
Show Source
array
-
Array of:
object v2-quota-area-intervals
Array of objects containing the daily statuses of intervals. At this level an interval may be closed for all Capacity Categories of the area. Quota cannot be specified at this level. This array is returned if the request parameters returnStatuses and intervalLevel are true and cannot be returned in aggregated mode.
Nested Schema : timeSlots
Type:
Show Source
array
-
Array of:
object v2-quota-area-time-slots
Array of objects containing the quota information for each time slot. This list is returned for Capacity Areas with time slot based configuration if the request parameter timeSlotLevel is true.
Nested Schema : v2-quota-area-categories
Type:
object
Array of objects containing the quota information for each Capacity Category. This list is returned for Capacity Areas with quota by intervals configuration if the request parameter categoryLevel is true.
Show Source
-
bookedActivities:
integer
The number of booked activities.Example:
1
-
closeTime:
string
Time when quota is to be closed automatically in the time zone of the selected capacity bucket in the 'YYYY-MM-DD HH:MM:SS' format. This parameter is returned if the request parameter returnStatuses is trueExample:
2023-12-01 12:00:00
-
intervals:
array intervals
-
label:
string
The label of the Capacity Category.Example:
INSTALL
-
maxAvailable:
integer
The total working time of the resources for the category.Example:
1200
-
maxAvailableByPlans:
integer
The total working time for the category based on plans.Example:
1200
-
minQuota:
integer
The minimal quota value in minutes. This field is not returned for the aggregated result.Example:
60
-
quota:
integer
The quota value in minutes. It contains null if the value is not defined.Example:
400
-
quotaIsAutoClosed:
boolean
Indicates if the booking has been closed at this level automatically by schedule. This parameter is returned if the request parameter returnStatuses is trueExample:
false
-
quotaIsClosed:
boolean
Indicates if the booking has been closed at this level. This parameter is returned if the request parameter returnStatuses is trueExample:
false
-
quotaIsReopened:
boolean
Indicates if the booking has been manually reopened after closure. This parameter is returned if the request parameter returnStatuses is trueExample:
false
-
quotaPercentCategory:
number
The quota value defined as a percent of the Max Available value of the Capacity Category. It contains null if the value is not defined.Example:
10
-
quotaPercentDay:
number
The quota value defined as a percent of the daily quota value of the capacity category. It contains null if the value is not defined.Example:
12
-
stopBookingAt:
integer
The percent of the used quota at which the booking of activities stops. It is returned as zero if it has zero value; if the value is not defined then this field is not returned.Example:
30
-
used:
integer
The amount of consumed capacity in minutes.Example:
40
-
usedQuotaPercent:
number
The quota percentage of the capacity category currently used for booked activities.Example:
10
-
workZones:
array workZones
Nested Schema : intervals
Type:
Show Source
array
-
Array of:
object v2-quota-category-intervals
Array of objects containing the quota information for intervals within the Capacity Category. This list is returned if the request parameter intervalLevel is true.
Nested Schema : workZones
Type:
Show Source
array
-
Array of:
object v2-quota-work-zones
Quota status defined for workzones. Only workzones with closed statuses are returned in this list. This list is returned if the request parameter returnStatuses is true
Nested Schema : v2-quota-category-intervals
Type:
object
Array of objects containing the quota information for intervals within the Capacity Category. This list is returned if the request parameter intervalLevel is true.
Show Source
-
closeTime:
string
Time when quota is to be closed automatically in the time zone of the selected capacity bucket in the 'YYYY-MM-DD HH:MM:SS' format. This parameter is returned if the request parameter returnStatuses is trueExample:
2023-12-01 00:00:01
-
quota:
integer
The quota value in minutes. It contains null if the value is not defined.Example:
240
-
quotaIsAutoClosed:
boolean
Indicates if the booking has been closed at this level automatically by schedule. This parameter is returned if the request parameter returnStatuses is true
-
quotaIsClosed:
boolean
Indicates if the booking has been closed at this level. This parameter is returned if the request parameter returnStatuses is true
-
quotaIsReopened:
boolean
Indicates if the booking has been manually reopened after closure. This parameter is returned if the request parameter returnStatuses is true
-
timeFrom:
string
The start time of the time interval in HH:MM format.Example:
12:30
-
timeTo:
string
The end time of the time interval in HH:MM format.Example:
16:00
-
used:
integer
The amount of consumed capacity in minutes.Example:
60
-
workZones:
array workZones
Nested Schema : workZones
Type:
Show Source
array
-
Array of:
object v2-quota-work-zones
Quota status defined for workzones. Only workzones with closed statuses are returned in this list. This list is returned if the request parameter returnStatuses is true
Nested Schema : v2-quota-work-zones
Type:
object
Quota status defined for workzones. Only workzones with closed statuses are returned in this list. This list is returned if the request parameter returnStatuses is true
Show Source
-
closeTime:
boolean
Time when quota is to be closed automatically in the time zone of the selected capacity bucket in the 'YYYY-MM-DD HH:MM:SS' format.Example:
2023-12-01 23:59:59
-
label:
string
The label of a work zoneExample:
WZ1
-
quotaIsAutoClosed:
boolean
Indicates if the booking has been closed at this level automatically by scheduleExample:
false
-
quotaIsClosed:
boolean
Indicates if the booking has been closed at this levelExample:
false
-
quotaIsReopened:
boolean
Indicates if the booking has been manually reopened after closure.Example:
false
Nested Schema : v2-quota-area-intervals
Type:
object
Array of objects containing the daily statuses of intervals. At this level an interval may be closed for all Capacity Categories of the area. Quota cannot be specified at this level. This array is returned if the request parameters returnStatuses and intervalLevel are true and cannot be returned in aggregated mode.
Show Source
-
closeTime:
string
Time when quota is to be closed automatically in the time zone of the selected capacity bucket in the 'YYYY-MM-DD HH:MM:SS' format.Example:
2023-12-01 00:00:01
-
quotaIsAutoClosed:
boolean
Indicates if the booking has been closed at this level automatically by schedule.
-
quotaIsClosed:
boolean
Indicates if the booking has been closed at this level.
-
quotaIsReopened:
boolean
Indicates if the booking has been manually reopened after closure.
-
timeFrom:
string
The start time of the time interval in HH:MM format.Example:
12:30
-
timeTo:
string
The end time of the time interval in HH:MM format.Example:
16:00
Nested Schema : v2-quota-area-time-slots
Type:
object
Array of objects containing the quota information for each time slot. This list is returned for Capacity Areas with time slot based configuration if the request parameter timeSlotLevel is true.
Show Source
-
bookedActivities:
integer
The number of booked activities.Example:
2
-
categories:
array categories
-
closeTime:
string
Time when quota is to be closed automatically in the time zone of the selected capacity bucket in the 'YYYY-MM-DD HH:MM:SS' format. This parameter is returned if the request parameter returnStatuses is trueExample:
2023-12-15 12:00:00
-
label:
string
Label of the time slotExample:
9AM-12PM
-
maxAvailable:
integer
The total working time of the resources.Example:
480
-
minQuota:
integer
The minimal quota value in minutes. It is returned as zero If it has zero value; if the value is not defined then this field is not returned. This field is not returned for the aggregated result.Example:
120
-
otherActivities:
integer
The total travel time and duration of activities that are not part of capacity management.Example:
120
-
quota:
integer
The quota value in minutes. It is returned as zero if it has zero value; if the value is not defined then this field is not returned.Example:
320
-
quotaIsAutoClosed:
boolean
Indicates if the booking has been closed at this level automatically by schedule. This parameter is returned if the request parameter returnStatuses is trueExample:
false
-
quotaIsClosed:
boolean
Indicates if the booking has been closed at this level. This parameter is returned if the request parameter returnStatuses is trueExample:
false
-
quotaIsReopened:
boolean
Indicates if the booking has been manually reopened after closure. This parameter is returned if the request parameter returnStatuses is trueExample:
false
-
quotaPercent:
number
The quota value in percent. It is returned as zero if it has zero value; if the value is not defined then this field is not returned. This field is not returned for the aggregated result.Example:
20
-
stopBookingAt:
integer
The percent of the used quota at which the booking of activities stops. It is returned as zero if it has zero value; if the value is not defined then this field is not returned.Example:
90
-
used:
integer
The amount of consumed capacity in minutes.Example:
60
-
usedQuotaPercent:
number
The percent of the time slot quota that is used by booked activities. This field is not returned for the aggregated result.Example:
5
Nested Schema : categories
Type:
Show Source
array
-
Array of:
object v2-quota-time-slot-categories
Array of objects containing the quota information for each Capacity Category. This list is returned if the request parameter categoryLevel is true.
Nested Schema : v2-quota-time-slot-categories
Type:
object
Array of objects containing the quota information for each Capacity Category. This list is returned if the request parameter categoryLevel is true.
Show Source
-
bookedActivities:
integer
The number of booked activities.Example:
0
-
closeTime:
string
Time when quota is to be closed automatically in the time zone of the selected capacity bucket in the 'YYYY-MM-DD HH:MM:SS' format. This parameter is returned if the request parameter returnStatuses is trueExample:
2023-12-01 12:00:00
-
estimatedQuotaPercent:
number
Estimated quota value (as percent) calculated on the basis of the 'weight' coefficient and the configuration of available resources for the day.Example:
12
-
label:
string
The label of the Capacity Category.Example:
INSTALL
-
maxAvailable:
integer
The total working time of the resources for the category.Example:
720
-
quota:
integer
The quota value in minutes. It is returned as zero if it has zero value; if the value is not defined then this field is not returned.Example:
500
-
quotaIsAutoClosed:
boolean
Indicates if the booking has been closed at this level automatically by schedule. This parameter is returned if the request parameter returnStatuses is trueExample:
false
-
quotaIsClosed:
boolean
Indicates if the booking has been closed at this level. This parameter is returned if the request parameter returnStatuses is trueExample:
false
-
quotaIsReopened:
boolean
Indicates if the booking has been manually reopened after closure. This parameter is returned if the request parameter returnStatuses is trueExample:
false
-
quotaPercent:
number
The quota value in percent. It is returned as zero if it has zero value; if the value is not defined then this field is not returned. This field is not returned for the aggregated result.Example:
120
-
stopBookingAt:
integer
The percent of the used quota at which the booking of activities stops. It is returned as zero if it has zero value; if the value is not defined then this field is not returned.Example:
75
-
used:
integer
The amount of consumed capacity in minutes.Example:
60
-
usedQuotaPercent:
number
The quota percentage of the capacity category currently used for booked activities.Example:
12.5
-
weight:
number
Weight of the Capacity Category calculated based on historical dataExample:
1.74
-
workZones:
array workZones
Nested Schema : workZones
Type:
Show Source
array
-
Array of:
object v2-quota-work-zones
Quota status defined for workzones. Only workzones with closed statuses are returned in this list. This list is returned if the request parameter returnStatuses is true
Default Response
This section describes the default error response for this operation.
Root Schema : Error
Type:
Show Source
object
-
detail:
string
The detailed description of this error.
-
status:
string
The HTTP status code of this error.
-
title(required):
string
The brief description of this error.
-
type(required):
string
The URL of the web page containing more details about this error.