Create Rate Limits for a Consumer
POST /obp/v7.0.0/management/consumers/CONSUMER_ID/consumer/rate-limits
OBPv6.0.0-createCallLimits Roles: CanCreateRateLimits Consumer
Create Rate Limits for a Consumer
Each of the six limits is one of:
0: this record grants no calls in that period. Records are summed, so the consumer is blocked (every call refused with 429) only when the sum over all of its records for that period is 0.-1: unlimited for that period, adding nothing to the sum. Once a record exists, the system default for that period no longer applies.- a positive number: the maximum number of calls in that period. Overlapping records for the consumer are summed.
A consumer with no records at all gets the system defaults (rate_limiting_per_* props).
A record created by an API Product Subscription is managed by that subscription: it is rewritten on the subscription's next status change and removed when the subscription is cancelled.
See here for details.
User Authentication is Required. The User must be logged in. The Application must also be authenticated.
URL Parameters:
CONSUMER_ID: 7uy8a7e4-6d02-40e3-a129-0b2bf89de8uh
JSON request body fields (10)
- from_date
- 1100-01-01T01:01:01.000Z
- per_day_call_limit
- per_hour_call_limit
- per_minute_call_limit
- per_month_call_limit
- per_second_call_limit
- 10
- per_week_call_limit
- to_date
- 1100-01-01T01:01:01.000Z
- api_name
- api_name
- api_version
JSON response body fields (13)
- created_at
- created_at
- from_date
- 1100-01-01T01:01:01.000Z
- per_day_call_limit
- per_hour_call_limit
- per_minute_call_limit
- per_month_call_limit
- per_second_call_limit
- 10
- per_week_call_limit
- rate_limiting_id
- rate_limiting_id
- to_date
- 1100-01-01T01:01:01.000Z
- updated_at
- updated_at
- api_name
- api_name
- api_version
Example request body
{
"from_date": "1100-01-01T00:00:00Z",
"to_date": "1100-01-01T00:00:00Z",
"api_version": "v6.0.0",
"api_name": "getConsumerCallLimits",
"per_second_call_limit": "100",
"per_minute_call_limit": "1000",
"per_hour_call_limit": "-1",
"per_day_call_limit": "-1",
"per_week_call_limit": "-1",
"per_month_call_limit": "-1"
}Example success response
{
"rate_limiting_id": "80e1e0b2-d8bf-4f85-a579-e69ef36e3305",
"from_date": "1100-01-01T00:00:00Z",
"to_date": "1100-01-01T00:00:00Z",
"api_version": "v6.0.0",
"api_name": "getConsumerCallLimits",
"per_second_call_limit": "100",
"per_minute_call_limit": "1000",
"per_hour_call_limit": "-1",
"per_day_call_limit": "-1",
"per_week_call_limit": "-1",
"per_month_call_limit": "-1",
"created_at": "1100-01-01T00:00:00Z",
"updated_at": "1100-01-01T00:00:00Z"
}Possible errors (6)
- OBP-20001: User not logged in. Authentication is required!
- OBP-10001: Incorrect json format.
- OBP-20014: Invalid Consumer ID. Please specify a valid value for CONSUMER_ID.
- OBP-30019: Consumer not found. Please specify a valid value for CONSUMER_ID.
- OBP-20006: User is missing one or more roles:
- OBP-50000: Unknown Error.