Passer au contenu

⚙️ Set usage limits for a company endpoint

Requête

Set or update usage limits for a specific company endpoint.

Sécurité
APIKeyHeader
En-têtes
X-PDP-Client-Idstring(X-Pdp-Client-Id)obligatoire

ID of the PDP Client for which the operation is performed

Examples:
Sandbox client
client_abc123
Corpsapplication/jsonobligatoire
company_idstring(Company Id)obligatoire
endpointstring(Endpoint)obligatoire
methodstring(Method)obligatoire
limit_per_minuteinteger or null(Limit Per Minute)
Any of:

Rate limit per minute

>= 1
integer
limit_per_hourinteger or null(Limit Per Hour)
Any of:

Rate limit per hour

>= 1
integer
limit_per_dayinteger or null(Limit Per Day)
Any of:

Rate limit per day

>= 1
integer
limit_per_monthinteger or null(Limit Per Month)
Any of:

Rate limit per month

>= 1
integer
current_usage_minuteinteger, >= 0(Current Usage Minute)obligatoire

Current usage in the current minute

current_usage_hourinteger, >= 0(Current Usage Hour)obligatoire

Current usage in the current hour

current_usage_dayinteger, >= 0(Current Usage Day)obligatoire

Current usage in the current day

current_usage_monthinteger, >= 0(Current Usage Month)obligatoire

Current usage in the current month

curl -i -X POST \
  https://pdp.seqino.dev/api/usage/limits \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -H 'X-PDP-Client-Id: client_abc123' \
  -d '{
    "company_id": "string",
    "endpoint": "string",
    "method": "string",
    "limit_per_minute": 1,
    "limit_per_hour": 1,
    "limit_per_day": 1,
    "limit_per_month": 1,
    "current_usage_minute": 0,
    "current_usage_hour": 0,
    "current_usage_day": 0,
    "current_usage_month": 0
  }'

Réponses

Successful Response

Corpsapplication/json
company_idstring(Company Id)obligatoire
endpointstring(Endpoint)obligatoire
methodstring(Method)obligatoire
limit_per_minuteinteger or null(Limit Per Minute)
Any of:

Rate limit per minute

>= 1
integer
limit_per_hourinteger or null(Limit Per Hour)
Any of:

Rate limit per hour

>= 1
integer
limit_per_dayinteger or null(Limit Per Day)
Any of:

Rate limit per day

>= 1
integer
limit_per_monthinteger or null(Limit Per Month)
Any of:

Rate limit per month

>= 1
integer
current_usage_minuteinteger, >= 0(Current Usage Minute)obligatoire

Current usage in the current minute

current_usage_hourinteger, >= 0(Current Usage Hour)obligatoire

Current usage in the current hour

current_usage_dayinteger, >= 0(Current Usage Day)obligatoire

Current usage in the current day

current_usage_monthinteger, >= 0(Current Usage Month)obligatoire

Current usage in the current month

Response
{ "company_id": "string", "endpoint": "string", "method": "string", "limit_per_minute": 1, "limit_per_hour": 1, "limit_per_day": 1, "limit_per_month": 1, "current_usage_minute": 0, "current_usage_hour": 0, "current_usage_day": 0, "current_usage_month": 0 }