Create or update quota

patch

/rest/ofscCapacity/v1/quota

This operation creates a new quota or updates an existing quota.

Request

Body ()
The schema of the request body parameters.
Root Schema : quotaPatchList
Type: object
The collection of quota values.
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : quotaPatchRequest
Type: object
Show Source
Nested Schema : areas
Type: array
Show Source
Nested Schema : items
Type: object
Show Source
  • categories
    The capacity categories assigned to the capacity area.
  • Minimum Length: 1
    Maximum Length: 40
    The label of the capacity area.
  • 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 quota value in minutes. Valid values are 0..16777215. If request has a value out of this range then zero value is assumed.
    • 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.
Nested Schema : categories
Type: array
The capacity categories assigned to the capacity area.
Show Source
Nested Schema : items
Type: object
Show Source
  • intervals
    An array of quota values for the booking intervals.
  • Minimum Length: 1
    Maximum Length: 40
    The label of 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 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 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.
Nested Schema : intervals
Type: array
An array of quota values for 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.
Back to Top

Response

Supported Media Types

200 Response

This section describes the default error response for this operation.
Body ()
Root Schema : ResultQuotaObject
Type: object
Show Source
Nested Schema : results
Type: object
Show Source
  • errors
    The array of failed operations.
  • The number of fields for which the values were not changed when the operation is performed. Only the fields that were passed in the request are counted.
  • The number of fields for which the values were changed when the operation is performed. Only the fields that were passed in the request are counted.
Nested Schema : errors
Type: array
The array of failed operations.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : errorDetail
Type: object
The details of the error.
Show Source
Nested Schema : operation
Type: object
The operation that caused the error.
Show Source
  • The label of the capacity area for which the operation is performed. It is not returned if the transaction fails.
  • The label of the capacity category for which the operation is performed. It is not returned if the transaction fails.
  • The date on which the operation is performed. It is not returned if the transaction fails.

Default Response

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

Examples

cURL command Example

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

curl -u 'clientId@instance:clientSecret' \
 -X PATCH \
 --url https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCapacity/v1/quota \
 --data-binary '{
    "items": [{
        "date": "2017-08-23",
        "areas": [{
            "label" : "Asia",
            "quota": 50,
 
            "categories": [{
                "label" : "DI",
                "quota" : 30,
 
                "intervals": [{
                    "timeFrom": "08:00",
                    "timeTo": "12:00",
                    "quota": 100
                }, {
                    "timeFrom": "08:00",
                    "timeTo": "12:00",
                    "quota": 0
                }]
            }]
        }]
    }]
}'

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:20:16 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
 
{
    "results": {
        "updatedFieldCount": 2,
        "notChangedFieldCount": 0,
        "errors": []
    }
}
Back to Top