Get quota

get

/rest/ofscCapacity/v1/quota

This operation retrieves a collection of quota groups. Each quota group contains a list of quotas with a ratio value.

Note: This operation does not support timeslot-based quota and can be only used for interval-based quota.

Request

Query Parameters
  • Contains one of the following values: true or false. If true and if multiple capacity areas are selected, then the quota values for each area are aggregated and returned as a single structure. If false, then the quota values for each area are returned separately. The default value is false.
  • Collection Format: csv
    The labels of the capacity areas or the capacity area groups.
  • Collection Format: csv
    The labels of the capacity categories in the capacity category filter. If there are no capacity categories in the filter, then all capacity categories available for the specified area(s) are returned.
  • Collection Format: csv
    The dates for which the quota groups are retrieved. The date is specified in the YYYY-MM-DD format.
  • Collection Format: csv
    The list of fields that are returned in the response.
    • Supported fields: area.name, area.quotaPercent, area.minQuota, area.quota, area.maxAvailable, area.otherActivities, area.used, area.usedQuotaPercent, area.count, area.status, area.category.quotaPercentDay, area.category.quotaPercentCategory, area.category.minQuota, area.category.quota, area.category.maxAvailable, area.category.stopBookingAt, area.category.used, area.category.usedQuotaPercent, area.category.count, area.category.plan, area.category.status, area.category.interval
    • Default values: date, area.label, area.quota, area.category.label, area.category.quota

    Note: The date, area.label, and area.category.label values are returned regardless of the 'fields' parameter.

Back to Top

Response

Supported Media Types

200 Response

This section describes the 200 status response for this operation.
Body ()
Root Schema : quotaList
Type: object
The collection of quota groups.
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : Quota Manage
Type: object
Title: Quota Manage
Show Source
Nested Schema : Areas
Type: array
Title: Areas
The array of objects containing the data (that is, quota groups) of a single capacity area or the aggregated result from multiple capacity areas.
Show Source
Nested Schema : items
Type: object
Show Source
  • categories
    The array of objects containing the data (that is, quota groups) for the capacity categories.
  • The number of booked activities.
  • Minimum Length: 1
    Maximum Length: 40
    The label of the capacity area.
  • The total working time of technicians in a particular capacity area and in a particular day.
  • The minimum value of the quota.
    • If the value of the parameter is zero, then zero is returned in the response.
    • If no value is specified for the parameter, then the quota parameter is not returned.
  • The name of the capacity area. The parameter is not returned, if the 'aggregateResults' option is enabled.
  • The total travel time and duration of all activities that are not a part of capacity management.
  • The quota value in minutes.
    • If the value of the parameter is zero, then zero is returned in the response.
    • If no value is specified for the parameter, then the quota parameter is not returned.
  • The quota value in percentage.
    • If the value of the parameter is zero, then zero is returned in the response.
    • If no value is specified for the parameter, then the quota parameter is not returned.
  • The bitmask parameter that defines the status of the quota cell. The following flags are available:
    • (1 << 0) - QUOTA_STATUS_AUTO_ADJUSTMENT_OF_QUOTA_IS_BLOCKED: Defines whether the 'Locked' option is set for the cell in the Quota View.
    • (1 << 1) - QUOTA_STATUS_QUOTA_IS_READWRITE: Defines whether the value of the 'quota' field can be modified.
    • (1 << 2) - QUOTA_STATUS_MIN_QUOTA_IS_READWRITE: Defines whether the value of the 'minQuota' field can be modified.
    • (1 << 3) - QUOTA_STATUS_QUOTA_PERCENT_IS_READWRITE: Defines whether the value of the 'quotaPercent' field can be modified.

    When the operation calculates the values of the flags that define the 'read-write' access, the following points are considered:

    • The configuration of the capacity area.
    • The restrictions of the modified data in the past (including working hours since midnight).

    Also, the parameter is not returned when its value is equal to 0. It is a regular mode for past days and the 'aggregate' mode when all fields are read-only.

  • The amount of existing capacity consumed in minutes.
  • The percent of the daily quota that is used by the booked activities.
Nested Schema : categories
Type: array
The array of objects containing the data (that is, quota groups) for the capacity categories.
Show Source
Nested Schema : items
Type: object
Show Source
  • The number of booked activities.
  • intervals
    The array of quota limits within the booking intervals.
  • Minimum Length: 1
    Maximum Length: 40
    The label of the capacity category.
  • The maximum available capacity in the time slot and the capacity category.
  • The minimum quota value in minutes.
    • If the value of the parameter is zero, then zero is returned in the response.
    • If no value is specified for the parameter, then the quota parameter is not returned.
  • The planned workload obtained from the Forecasting module.
  • The quota value in minutes.
    • If the value of the parameter is zero, then zero is returned in the response.
    • If no value is specified for the parameter, then the quota parameter is not returned.
  • The quota value defined as a percent of the Max Available value of the capacity category.
    • If the value of the parameter is zero, then zero is returned in the response.
    • If no value is specified for the parameter, then the quota parameter is not returned.
  • The quota value defined as a percent of the daily quota value of the capacity category.
    • If the value of the parameter is zero, then zero is returned in the response.
    • If no value is specified for the parameter, then the quota parameter is not returned.
  • The bitmask parameter that defines the status of the quota cell. The following flags are available:
    • (1 << 0): QUOTA_STATUS_AUTO_ADJUSTMENT_OF_QUOTA_IS_BLOCKED: Defines whether the "Locked" option is set for the cell in the Quota view.
    • (1 << 1): QUOTA_STATUS_QUOTA_IS_READWRITE: Defines whether the value of the 'quota' field can be modified.
    • (1 << 2) - QUOTA_STATUS_MIN_QUOTA_IS_READWRITE: Defines whether the value of the 'minQuota' field can be modified.
    • (1 << 4) - QUOTA_STATUS_QUOTA_PERCENT_DAY_IS_READWRITE: Defines whether the value of the 'quotaPercent Day' field can be modified.
    • (1 << 5) - QUOTA_STATUS_QUOTA_PERCENT_CATEGORY_IS_READWRITE: Defines whether the value of the 'quotaPercentCategory' field can be modified.
    • (1 << 6) - QUOTA_STATUS_STOP_BOOKING_AT_IS_READWRITE: Defines whether the value of the 'stopBookingAt' field can be modified. Also, this field is not returned when its value is equal to 0.
    • It is a regular mode for past days and the 'aggregate' mode when all fields are read-only.

  • The percent at which the booking of activities stops for the timeslot-based quota.
    • If the value of the parameter is zero, then zero is returned in the response.
    • If no value is specified for the parameter, then the quota parameter is not returned.
  • The amount of existing capacity consumed in minutes.
  • The quota percentage of the capacity category currently used for booked activities.
Nested Schema : intervals
Type: array
The array of quota limits within the booking intervals.
Show Source
Nested Schema : items
Type: object
Show Source
  • The quota value in minutes.
    • If the value of the parameter is zero, then zero is returned in the response.
    • If no value is specified for the parameter, then the quota parameter is not returned.
  • The status of the quota value.

    It has the following modes:

    • Regular: Populates quota values from the past days.
    • Aggregate: Aggregates the quota values for an interval, if the quota values are read-only values.

  • The start time of the time interval in HH:MM format.
    Example: 12:30
  • The end time of the time interval in HH:MM format.
    Example: 14:00
  • The amount of existing capacity consumed in minutes.

Default Response

This section describes the default error response for this operation.
Body ()
Root Schema : Error
Type: object
Error response
Show Source
Back to Top

Examples

cURL Command Example

The following example shows how to get information regarding quota limits per booking intervals by submitting a GET request on the REST resource using cURL:

curl -u 'clientId@instance:clientSecret' \
 -X GET \
 --url 'https://<instance_name>.etadirect.com/rest/ofscCapacity/v1/quota?areas=test&dates=2016-08-23,2016-08-24&fields=area.category.interval'

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 200 OK
Server: nginx
Date: Wed, 23 Aug 2017 13:22:04 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Access-Control-Allow-Credentials: true
Strict-Transport-Security: max-age=31536000; includeSubDomains;

Example of Response Body

The following example shows the contents of the response body in JSON format.

HTTP/1.1 200
{
    "items": [{
        "date": "2017-08-23",
 
        "areas": [{
            "label": "ASIA",
            "name": "Asia",
            "quotaPercent": 0.025368,
            "quota": 50,
            "maxAvailable": 197100,
            "status": 2,
            "usedQuotaPercent": 0,
 
            "categories": [{
                "label": "IN",
                "maxAvailable": 197100,
                "status": 66,
 
                "intervals": [{
                    "timeFrom": "08:00",
                    "timeTo": "12:00",
                    "quota": 5000,
                    "status": 2
                }, {
                    "timeFrom": "13:00",
                    "timeTo": "18:00",
                    "quota": 3000,
                    "status": 2
                }]
            }, {
                "label": "TC",
                "maxAvailable": 197100,
                "status": 66,
 
                "intervals": [{
                    "timeFrom": "08:00",
                    "timeTo": "12:00",
                    "quota": 5000,
                    "status": 2
                }, {
                    "timeFrom": "13:00",
                    "timeTo": "18:00",
                    "quota": 3000,
                    "status": 2
                }]
            }, {
                "label": "UP",
                "maxAvailable": 196560,
                "status": 66,
 
                "intervals": [{
                    "timeFrom": "08:00",
                    "timeTo": "12:00",
                    "quota": 5000,
                    "status": 2
                }, {
                    "timeFrom": "13:00",
                    "timeTo": "18:00",
                    "quota": 3000,
                    "status": 2
                }]
            }, {
                "label": "DI",
                "quota": 30,
                "quotaPercentDay": 60,
                "quotaPercentCategory": 0.015221,
                "maxAvailable": 197100,
                "status": 66,
                "usedQuotaPercent": 0,
 
                "intervals": [{
                    "timeFrom": "08:00",
                    "timeTo": "12:00",
                    "quota": 5000,
                    "status": 2
                }, {
                    "timeFrom": "13:00",
                    "timeTo": "18:00",
                    "quota": 3000,
                    "status": 2
                }]
            }, {
                "label": "DW",
                "maxAvailable": 197100,
                "status": 66,
 
                "intervals": [{
                    "timeFrom": "08:00",
                    "timeTo": "12:00",
                    "quota": 500,
                    "status": 2
                }, {
                    "timeFrom": "13:00",
                    "timeTo": "18:00",
                    "quota": 300,
                    "status": 2
                }]
            }, {
                "label": "SR",
                "maxAvailable": 197100,
                "status": 66,
 
                "intervals": [{
                    "timeFrom": "08:00",
                    "timeTo": "12:00",
                    "quota": 2000,
                    "status": 2
                }, {
                    "timeFrom": "13:00",
                    "timeTo": "18:00",
                    "quota": 2000,
                    "status": 2
                }]
            }, {
                "label": "NP",
                "maxAvailable": 196020,
                "status": 66,
 
                "intervals": [{
                    "timeFrom": "08:00",
                    "timeTo": "12:00",
                    "quota": 1000,
                    "status": 2
                }, {
                    "timeFrom": "13:00",
                    "timeTo": "18:00",
                    "quota": 500,
                    "status": 2
                }]
            }, {
                "label": "RS",
                "maxAvailable": 197100,
                "status": 66,
 
                "intervals": [{
                    "timeFrom": "08:00",
                    "timeTo": "12:00",
                    "quota": 2000,
                    "status": 2
                }, {
                    "timeFrom": "13:00",
                    "timeTo": "18:00",
                    "quota": 1000,
                    "status": 2
                }]
            }]
        }]
    }]
}
Back to Top