Rate Limiting

Rate Limiting policies can be configured via the API.

See https://octopus.com/docs/administration/managing-infrastructure/rate-limiting to understand the feature and what the settings mean.

List all rate limiting policies

GET /api/ratelimitingpolicies

There are three builtin policies, so while this returns a paginated response, there is only ever a single page. - Unauthenticated requests - Authenticated requests - AI Agent requests

Query Parameters

  • skip integer
    Number of items to skip. Minimum 0.
  • take integer
    Number of items to take. Minimum 0.

Response

200 — Success

  • ItemType string
  • Items array of object
    • AuditMode boolean
      When enabled, the policy logs requests that would be rate limited without rejecting them (no 429 response).
    • BurstLimit integer
      Maximum capacity of the token bucket.
    • Id string
      The ID of this policy.
    • IsBuiltIn boolean
      Whether this is a built-in policy that cannot be deleted or have its name or scope changed.
    • IsEnabled boolean
      Whether this policy is actively enforced.
    • Name string
      The display name of this policy. Minimum length 1.
    • RequestsPerMinute integer
      Number of requests permitted per minute.
    • ScopeType string
      The scope this policy applies to.
  • ItemsPerPage integer
  • LastPageNumber integer
  • NumberOfPages integer
  • TotalResults integer

Example Response

JSON
{
  "ItemType": "string",
  "Items": [
    {
      "AuditMode": true,
      "BurstLimit": 200,
      "Id": "RateLimitingPolicies-1",
      "IsBuiltIn": true,
      "IsEnabled": true,
      "Name": "Authenticated requests",
      "RequestsPerMinute": 600,
      "ScopeType": "string"
    }
  ],
  "ItemsPerPage": 0,
  "LastPageNumber": 0,
  "NumberOfPages": 0,
  "TotalResults": 0
}

Get a rate limiting policy by ID

GET /api/ratelimitingpolicies/{id}

Path Parameters

  • id string (required)
    ID of the rate limiting policy.

Response

200 — A Rate Limiting Policy

  • AuditMode boolean
    When enabled, the policy logs requests that would be rate limited without rejecting them (no 429 response).
  • BurstLimit integer
    Maximum capacity of the token bucket.
  • Id string
    The ID of this policy.
  • IsBuiltIn boolean
    Whether this is a built-in policy that cannot be deleted or have its name or scope changed.
  • IsEnabled boolean
    Whether this policy is actively enforced.
  • Name string
    The display name of this policy. Minimum length 1.
  • RequestsPerMinute integer
    Number of requests permitted per minute.
  • ScopeType string
    The scope this policy applies to.

Example Response

JSON
{
  "AuditMode": true,
  "BurstLimit": 200,
  "Id": "RateLimitingPolicies-1",
  "IsBuiltIn": true,
  "IsEnabled": true,
  "Name": "Authenticated requests",
  "RequestsPerMinute": 600,
  "ScopeType": "string"
}

Modify an existing rate limiting policy

PUT /api/ratelimitingpolicies/{id}

Path Parameters

  • id string (required)
    ID of the policy to modify.

Request Body

  • AuditMode boolean (required)
    When enabled, the policy logs requests that would be rate limited without rejecting them (no 429 response).
  • BurstLimit integer (required)
    Maximum capacity of the token bucket.
  • Id string (required)
    ID of the policy to modify.
  • IsEnabled boolean (required)
    Whether this policy is actively enforced.
  • Name string (required)
    The display name of the policy. Minimum length 1.
  • RequestsPerMinute integer (required)
    Number of requests permitted per minute.
  • ScopeType string (required)
    The scope this policy applies to.

Response

200 — A Rate Limiting Policy

  • AuditMode boolean
    When enabled, the policy logs requests that would be rate limited without rejecting them (no 429 response).
  • BurstLimit integer
    Maximum capacity of the token bucket.
  • Id string
    The ID of this policy.
  • IsBuiltIn boolean
    Whether this is a built-in policy that cannot be deleted or have its name or scope changed.
  • IsEnabled boolean
    Whether this policy is actively enforced.
  • Name string
    The display name of this policy. Minimum length 1.
  • RequestsPerMinute integer
    Number of requests permitted per minute.
  • ScopeType string
    The scope this policy applies to.

Example Request

JSON
{
  "AuditMode": true,
  "BurstLimit": 200,
  "Id": "RateLimitingPolicies-1",
  "IsEnabled": true,
  "Name": "Authenticated requests",
  "RequestsPerMinute": 600,
  "ScopeType": "string"
}

Example Response

JSON
{
  "AuditMode": true,
  "BurstLimit": 200,
  "Id": "RateLimitingPolicies-1",
  "IsBuiltIn": true,
  "IsEnabled": true,
  "Name": "Authenticated requests",
  "RequestsPerMinute": 600,
  "ScopeType": "string"
}