diff --git a/openapi.yaml b/openapi.yaml index 5a14fb37..69bed1f7 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -106,6 +106,11 @@ tags: description: Get overall summary for the selected time bucket. - name: Analytics > Groups description: Get grouped metrics for the selected time bucket. + - name: Usage Limits Policies + description: Manage usage limits policies to control total usage over time + - name: Rate Limits Policies + description: Manage rate limits policies to control request or token rates + paths: # Note: When adding an endpoint, make sure you also add it in the `groups` section, in the end of this file, @@ -17138,37 +17143,176 @@ paths: }) console.log(apiKey); - /analytics/graphs/requests: - servers: *ControlPlaneServers + /policies/usage-limits: + post: + tags: + - Usage Limits Policies + summary: Create Usage Limits Policy + description: Create a new usage limits policy to control total usage (cost or tokens) over a period. + operationId: createUsageLimitsPolicy + security: + - Portkey-Key: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateUsageLimitsPolicyRequest' + examples: + monthlyCostLimit: + summary: Monthly Cost Limit per API Key + value: + name: Monthly Cost Limit per API Key + conditions: + - key: workspace_id + value: workspace-123 + group_by: + - key: api_key + type: cost + credit_limit: 1000.0 + alert_threshold: 800.0 + periodic_reset: monthly + tokenLimit: + summary: Token Limit per User + value: + name: Token Limit per User + conditions: + - key: workspace_id + value: workspace-123 + group_by: + - key: metadata.user_id + type: tokens + credit_limit: 1000000 + periodic_reset: weekly + responses: + '200': + description: Policy created successfully + content: + application/json: + schema: + $ref: '#/components/schemas/CreatePolicyResponse' + '400': + description: Bad request + '401': + description: Unauthorized + '403': + description: Forbidden + '404': + description: Policy not found + '500': + description: Server error + get: tags: - - Analytics > Graphs - summary: Get requests graph + - Usage Limits Policies + summary: List Usage Limits Policies + description: List all usage limits policies with optional filtering. + operationId: listUsageLimitsPolicies + security: + - Portkey-Key: [] parameters: - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" - - $ref: "#/components/parameters/TotalUnitsMin" - - $ref: "#/components/parameters/TotalUnitsMax" - - $ref: "#/components/parameters/CostMin" - - $ref: "#/components/parameters/CostMax" - - $ref: "#/components/parameters/PromptTokenMin" - - $ref: "#/components/parameters/PromptTokenMax" - - $ref: "#/components/parameters/CompletionTokenMin" - - $ref: "#/components/parameters/CompletionTokenMax" - - $ref: "#/components/parameters/StatusCode" - - $ref: "#/components/parameters/WeightedFeedbackMin" - - $ref: "#/components/parameters/WeightedFeedbackMax" - - $ref: "#/components/parameters/VirtualKeys" - - $ref: "#/components/parameters/Configs" - - $ref: "#/components/parameters/WorkspaceSlug" - - $ref: "#/components/parameters/ApiKeyIds" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/AiOrgModel" - - $ref: "#/components/parameters/TraceId" - - $ref: "#/components/parameters/SpanId" - - $ref: "#/components/parameters/PromptSlug" + - $ref: '#/components/parameters/WorkspaceIdQuery' + - name: status + in: query + description: Filter by status + required: false + schema: + type: string + enum: [active, archived] + default: active + - name: type + in: query + description: Filter by policy type + required: false + schema: + type: string + enum: [cost, tokens] + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/CurrentPage' responses: - "200": + '200': + description: List of usage limits policies + content: + application/json: + schema: + $ref: '#/components/schemas/UsageLimitsPolicyListResponse' + '400': + description: Bad request + '401': + description: Unauthorized + '403': + description: Forbidden + '404': + description: Policy not found + '500': + description: Server error + + /policies/usage-limits/{policyUsageLimitsId}: + get: + tags: + - Usage Limits Policies + summary: Get Usage Limits Policy + description: Get a single usage limits policy by ID. + operationId: getUsageLimitsPolicy + security: + - Portkey-Key: [] + parameters: + - $ref: '#/components/parameters/PolicyUsageLimitsId' + - name: status + in: query + description: Filter by status + required: false + schema: + type: string + enum: [active, archived] + default: active + - name: include_usage + in: query + description: Include usage information for each value key + required: false + schema: + type: boolean + default: false + responses: + '200': + description: Usage limits policy details + content: + application/json: + schema: + $ref: '#/components/schemas/UsageLimitsPolicyResponse' + '400': + description: Bad request + '401': + description: Unauthorized + '403': + description: Forbidden + '404': + description: Policy not found + '500': + description: Server error + + put: + tags: + - Usage Limits Policies + summary: Update Usage Limits Policy + description: Update an existing usage limits policy. + operationId: updateUsageLimitsPolicy + security: + - Portkey-Key: [] + parameters: + - $ref: '#/components/parameters/PolicyUsageLimitsId' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateUsageLimitsPolicyRequest' + example: + credit_limit: 2000.0 + alert_threshold: 1500.0 + reset_usage_for_value: api-key-123 + responses: + '200': description: OK headers: Content-Type: @@ -17179,71 +17323,30 @@ paths: application/json: schema: type: object - properties: - summary: - type: object - properties: - total: - type: integer - description: Total requests across all data points - required: - - total - data_points: - type: array - items: - type: object - properties: - timestamp: - type: string - format: date-time - description: The timestamp for the data point bucket - total: - type: integer - description: Total requests for this data point bucket - required: - - timestamp - - total - description: An array of data points, each with a timestamp and metrics - object: - type: string - description: The type of object being returned - enum: [analytics-graph] - required: - - summary - - data_points - - object + example: {} + '400': + description: Bad request + '401': + description: Unauthorized + '403': + description: Forbidden + '404': + description: Policy not found + '500': + description: Server error - /analytics/graphs/cost: - servers: *ControlPlaneServers - get: + delete: tags: - - Analytics > Graphs - summary: Get cost graph + - Usage Limits Policies + summary: Delete Usage Limits Policy + description: Archive (soft delete) a usage limits policy. + operationId: deleteUsageLimitsPolicy + security: + - Portkey-Key: [] parameters: - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" - - $ref: "#/components/parameters/TotalUnitsMin" - - $ref: "#/components/parameters/TotalUnitsMax" - - $ref: "#/components/parameters/CostMin" - - $ref: "#/components/parameters/CostMax" - - $ref: "#/components/parameters/PromptTokenMin" - - $ref: "#/components/parameters/PromptTokenMax" - - $ref: "#/components/parameters/CompletionTokenMin" - - $ref: "#/components/parameters/CompletionTokenMax" - - $ref: "#/components/parameters/StatusCode" - - $ref: "#/components/parameters/WeightedFeedbackMin" - - $ref: "#/components/parameters/WeightedFeedbackMax" - - $ref: "#/components/parameters/VirtualKeys" - - $ref: "#/components/parameters/Configs" - - $ref: "#/components/parameters/WorkspaceSlug" - - $ref: "#/components/parameters/ApiKeyIds" - - $ref: "#/components/parameters/Metadata" - - $ref: "#/components/parameters/AiOrgModel" - - $ref: "#/components/parameters/TraceId" - - $ref: "#/components/parameters/SpanId" - - $ref: "#/components/parameters/PromptSlug" + - $ref: '#/components/parameters/PolicyUsageLimitsId' responses: - "200": + '200': description: OK headers: Content-Type: @@ -17254,57 +17357,407 @@ paths: application/json: schema: type: object - properties: - summary: - type: object - properties: - total: - type: integer - description: Total cost in cents across all data points - avg: - type: integer - description: Average cost per request across all data points - required: - - total - - avg - data_points: - type: array - items: - type: object - properties: - timestamp: - type: string - format: date-time - description: The timestamp for the data point bucket - total: - type: integer - description: Total cost in cents for this data point bucket - avg: - type: integer - description: Average cost per request for this data point bucket - required: - - timestamp - - total - - avg - description: An array of data points, each with a timestamp and metrics - object: - type: string - description: The type of object being returned - enum: [analytics-graph] - required: - - summary - - data_points - - object + example: {} + '400': + description: Bad request + '401': + description: Unauthorized + '403': + description: Forbidden + '404': + description: Policy not found + '500': + description: Server error - /analytics/graphs/latency: - servers: *ControlPlaneServers - get: + /policies/rate-limits: + post: tags: - - Analytics > Graphs - summary: Get latency graph - parameters: - - $ref: "#/components/parameters/TimeOfGenerationMin" - - $ref: "#/components/parameters/TimeOfGenerationMax" + - Rate Limits Policies + summary: Create Rate Limits Policy + description: Create a new rate limits policy to control the rate of requests or tokens consumed per minute, hour, or day. + operationId: createRateLimitsPolicy + security: + - Portkey-Key: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateRateLimitsPolicyRequest' + examples: + requestsPerMinute: + summary: 100 Requests per Minute per API Key + value: + name: 100 RPM per API Key + conditions: + - key: workspace_id + value: workspace-123 + group_by: + - key: api_key + type: requests + unit: rpm + value: 100 + tokensPerHour: + summary: 10K Tokens per Hour per User + value: + name: 10K Tokens per Hour per User + conditions: + - key: workspace_id + value: workspace-123 + group_by: + - key: metadata.user_id + type: tokens + unit: rph + value: 10000 + responses: + '200': + description: Policy created successfully + content: + application/json: + schema: + $ref: '#/components/schemas/CreatePolicyResponse' + '400': + description: Bad request + '401': + description: Unauthorized + '403': + description: Forbidden + '500': + description: Server error + + get: + tags: + - Rate Limits Policies + summary: List Rate Limits Policies + description: List all rate limits policies with optional filtering. + operationId: listRateLimitsPolicies + security: + - Portkey-Key: [] + parameters: + - $ref: '#/components/parameters/WorkspaceIdQuery' + - name: status + in: query + description: Filter by status + required: false + schema: + type: string + enum: [active, archived] + default: active + - name: type + in: query + description: Filter by policy type + required: false + schema: + type: string + enum: [requests, tokens] + - name: unit + in: query + description: Filter by rate unit + required: false + schema: + type: string + enum: [rpm, rph, rpd] + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/CurrentPage' + responses: + '200': + description: List of rate limits policies + content: + application/json: + schema: + $ref: '#/components/schemas/RateLimitsPolicyListResponse' + '400': + description: Bad request + '401': + description: Unauthorized + '403': + description: Forbidden + '404': + description: Policy not found + '500': + description: Server error + + /policies/rate-limits/{rateLimitsPolicyId}: + get: + tags: + - Rate Limits Policies + summary: Get Rate Limits Policy + description: Get a single rate limits policy by ID. + operationId: getRateLimitsPolicy + security: + - Portkey-Key: [] + parameters: + - $ref: '#/components/parameters/RateLimitsPolicyId' + - name: status + in: query + description: Filter by status + required: false + schema: + type: string + enum: [active, archived] + default: active + responses: + '200': + description: Rate limits policy details + content: + application/json: + schema: + $ref: '#/components/schemas/RateLimitsPolicyResponse' + '400': + description: Bad request + '401': + description: Unauthorized + '403': + description: Forbidden + '404': + description: Policy not found + '500': + description: Server error + + put: + tags: + - Rate Limits Policies + summary: Update Rate Limits Policy + description: Update an existing rate limits policy. + operationId: updateRateLimitsPolicy + security: + - Portkey-Key: [] + parameters: + - $ref: '#/components/parameters/RateLimitsPolicyId' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateRateLimitsPolicyRequest' + example: + value: 200 + unit: rph + responses: + '200': + description: OK + headers: + Content-Type: + schema: + type: string + example: application/json + content: + application/json: + schema: + type: object + example: {} + '400': + description: Bad request + '401': + description: Unauthorized + '403': + description: Forbidden + '404': + description: Policy not found + '500': + description: Server error + + delete: + tags: + - Rate Limits Policies + summary: Delete Rate Limits Policy + description: Delete a rate limits policy. + operationId: deleteRateLimitsPolicy + security: + - Portkey-Key: [] + parameters: + - $ref: '#/components/parameters/RateLimitsPolicyId' + responses: + '200': + description: OK + headers: + Content-Type: + schema: + type: string + example: application/json + content: + application/json: + schema: + type: object + example: {} + '400': + description: Bad request + '401': + description: Unauthorized + '403': + description: Forbidden + '404': + description: Policy not found + '500': + description: Server error + + /analytics/graphs/requests: + servers: *ControlPlaneServers + get: + tags: + - Analytics > Graphs + summary: Get requests graph + parameters: + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" + - $ref: "#/components/parameters/TotalUnitsMin" + - $ref: "#/components/parameters/TotalUnitsMax" + - $ref: "#/components/parameters/CostMin" + - $ref: "#/components/parameters/CostMax" + - $ref: "#/components/parameters/PromptTokenMin" + - $ref: "#/components/parameters/PromptTokenMax" + - $ref: "#/components/parameters/CompletionTokenMin" + - $ref: "#/components/parameters/CompletionTokenMax" + - $ref: "#/components/parameters/StatusCode" + - $ref: "#/components/parameters/WeightedFeedbackMin" + - $ref: "#/components/parameters/WeightedFeedbackMax" + - $ref: "#/components/parameters/VirtualKeys" + - $ref: "#/components/parameters/Configs" + - $ref: "#/components/parameters/WorkspaceSlug" + - $ref: "#/components/parameters/ApiKeyIds" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/AiOrgModel" + - $ref: "#/components/parameters/TraceId" + - $ref: "#/components/parameters/SpanId" + - $ref: "#/components/parameters/PromptSlug" + responses: + "200": + description: OK + headers: + Content-Type: + schema: + type: string + example: application/json + content: + application/json: + schema: + type: object + properties: + summary: + type: object + properties: + total: + type: integer + description: Total requests across all data points + required: + - total + data_points: + type: array + items: + type: object + properties: + timestamp: + type: string + format: date-time + description: The timestamp for the data point bucket + total: + type: integer + description: Total requests for this data point bucket + required: + - timestamp + - total + description: An array of data points, each with a timestamp and metrics + object: + type: string + description: The type of object being returned + enum: [analytics-graph] + required: + - summary + - data_points + - object + + /analytics/graphs/cost: + servers: *ControlPlaneServers + get: + tags: + - Analytics > Graphs + summary: Get cost graph + parameters: + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" + - $ref: "#/components/parameters/TotalUnitsMin" + - $ref: "#/components/parameters/TotalUnitsMax" + - $ref: "#/components/parameters/CostMin" + - $ref: "#/components/parameters/CostMax" + - $ref: "#/components/parameters/PromptTokenMin" + - $ref: "#/components/parameters/PromptTokenMax" + - $ref: "#/components/parameters/CompletionTokenMin" + - $ref: "#/components/parameters/CompletionTokenMax" + - $ref: "#/components/parameters/StatusCode" + - $ref: "#/components/parameters/WeightedFeedbackMin" + - $ref: "#/components/parameters/WeightedFeedbackMax" + - $ref: "#/components/parameters/VirtualKeys" + - $ref: "#/components/parameters/Configs" + - $ref: "#/components/parameters/WorkspaceSlug" + - $ref: "#/components/parameters/ApiKeyIds" + - $ref: "#/components/parameters/Metadata" + - $ref: "#/components/parameters/AiOrgModel" + - $ref: "#/components/parameters/TraceId" + - $ref: "#/components/parameters/SpanId" + - $ref: "#/components/parameters/PromptSlug" + responses: + "200": + description: OK + headers: + Content-Type: + schema: + type: string + example: application/json + content: + application/json: + schema: + type: object + properties: + summary: + type: object + properties: + total: + type: integer + description: Total cost in cents across all data points + avg: + type: integer + description: Average cost per request across all data points + required: + - total + - avg + data_points: + type: array + items: + type: object + properties: + timestamp: + type: string + format: date-time + description: The timestamp for the data point bucket + total: + type: integer + description: Total cost in cents for this data point bucket + avg: + type: integer + description: Average cost per request for this data point bucket + required: + - timestamp + - total + - avg + description: An array of data points, each with a timestamp and metrics + object: + type: string + description: The type of object being returned + enum: [analytics-graph] + required: + - summary + - data_points + - object + + /analytics/graphs/latency: + servers: *ControlPlaneServers + get: + tags: + - Analytics > Graphs + summary: Get latency graph + parameters: + - $ref: "#/components/parameters/TimeOfGenerationMin" + - $ref: "#/components/parameters/TimeOfGenerationMax" - $ref: "#/components/parameters/TotalUnitsMin" - $ref: "#/components/parameters/TotalUnitsMax" - $ref: "#/components/parameters/CostMin" @@ -18798,6 +19251,7 @@ paths: - object - data + components: securitySchemes: Portkey-Key: @@ -19050,13 +19504,37 @@ components: name: x-portkey-cache-namespace schema: type: string - description: Partition your Portkey cache store based on custom strings, ignoring metadata and other headers - PortkeyCacheForceRefresh: - in: header - name: x-portkey-cache-force-refresh + description: Partition your Portkey cache store based on custom strings, ignoring metadata and other headers + PortkeyCacheForceRefresh: + in: header + name: x-portkey-cache-force-refresh + schema: + type: boolean + description: Forces a cache refresh for your request by making a new API call and storing the updated value + + PolicyUsageLimitsId: + name: policyUsageLimitsId + in: path + required: true + description: Usage limits policy UUID + schema: + type: string + format: uuid + RateLimitsPolicyId: + name: rateLimitsPolicyId + in: path + required: true + description: Rate limits policy UUID + schema: + type: string + format: uuid + WorkspaceIdQuery: + name: workspace_id + in: query + required: false + description: Workspace ID or slug schema: - type: boolean - description: Forces a cache refresh for your request by making a new API call and storing the updated value + type: string schemas: Error: @@ -32319,6 +32797,390 @@ components: VertexBatchParams: type: object + Condition: + type: object + required: + - key + - value + properties: + key: + type: string + description: | + Condition key. Valid values: + - `api_key` - Apply to a specific API key + - `organisation_id` - Apply to an organization + - `workspace_id` - Apply to a workspace + - `metadata.*` - Apply based on custom metadata fields (e.g., `metadata.user_id`, `metadata.team`) + example: workspace_id + value: + type: string + description: Condition value + example: workspace-123 + + GroupBy: + type: object + required: + - key + properties: + key: + type: string + description: | + Group by key. Valid values: + - `api_key` - Group by API key + - `organisation_id` - Group by organization + - `workspace_id` - Group by workspace + - `metadata.*` - Group by custom metadata fields + example: api_key + + CreateUsageLimitsPolicyRequest: + type: object + required: + - conditions + - group_by + - type + - credit_limit + properties: + name: + type: string + maxLength: 255 + description: Policy name + example: Monthly Cost Limit + conditions: + type: array + minItems: 1 + items: + $ref: '#/components/schemas/Condition' + description: Array of conditions that define which requests the policy applies to + group_by: + type: array + minItems: 1 + items: + $ref: '#/components/schemas/GroupBy' + description: Array of group by fields that define how usage is aggregated + type: + type: string + enum: [cost, tokens] + description: Policy type + credit_limit: + type: number + minimum: 0 + description: Maximum usage allowed + alert_threshold: + type: number + nullable: true + minimum: 0 + description: Threshold at which to send alerts. Must be less than credit_limit. + periodic_reset: + type: string + nullable: true + enum: [monthly, weekly] + description: Reset period. If not provided, limit is cumulative. + workspace_id: + type: string + description: Workspace ID or slug. Required if not using API key authentication. + organisation_id: + type: string + format: uuid + description: Organization ID. Required if not using API key authentication. + + UpdateUsageLimitsPolicyRequest: + type: object + properties: + name: + type: string + maxLength: 255 + description: Policy name + credit_limit: + type: number + minimum: 0 + description: Maximum usage allowed + alert_threshold: + type: number + nullable: true + minimum: 0 + description: Threshold at which to send alerts. Must be less than credit_limit. + periodic_reset: + type: string + nullable: true + enum: [monthly, weekly] + description: Reset period. Set to null to remove periodic reset. + reset_usage_for_value: + type: string + description: Reset usage for a specific value key (e.g., API key). This will reset the usage counter for that key to 0. + + CreateRateLimitsPolicyRequest: + type: object + required: + - conditions + - group_by + - type + - unit + - value + properties: + name: + type: string + maxLength: 255 + description: Policy name + example: 100 Requests per Minute + conditions: + type: array + minItems: 1 + items: + $ref: '#/components/schemas/Condition' + description: Array of conditions that define which requests the policy applies to + group_by: + type: array + minItems: 1 + items: + $ref: '#/components/schemas/GroupBy' + description: Array of group by fields that define how usage is aggregated + type: + type: string + enum: [requests, tokens] + description: Policy type + unit: + type: string + enum: [rpm, rph, rpd] + description: | + Rate unit: + - `rpm` - Requests/Tokens per minute + - `rph` - Requests/Tokens per hour + - `rpd` - Requests/Tokens per day + value: + type: number + description: Rate limit value + workspace_id: + type: string + description: Workspace ID or slug. Required if not using API key authentication. + organisation_id: + type: string + format: uuid + description: Organization ID. Required if not using API key authentication. + + UpdateRateLimitsPolicyRequest: + type: object + properties: + name: + type: string + maxLength: 255 + description: Policy name + unit: + type: string + enum: [rpm, rph, rpd] + description: Rate unit + value: + type: number + description: Rate limit value + + UsageLimitsPolicy: + type: object + required: + - id + - type + - status + - workspace_id + - organisation_id + - created_at + - last_updated_at + properties: + id: + type: string + format: uuid + description: Policy UUID + name: + type: string + nullable: true + description: Policy name + conditions: + type: array + items: + $ref: '#/components/schemas/Condition' + description: Array of conditions + group_by: + type: array + items: + $ref: '#/components/schemas/GroupBy' + description: Array of group by fields + type: + type: string + enum: [cost, tokens] + description: Policy type + credit_limit: + type: number + description: Maximum usage allowed + alert_threshold: + type: number + nullable: true + description: Alert threshold + periodic_reset: + type: string + nullable: true + enum: [monthly, weekly] + description: Reset period + status: + type: string + enum: [active, archived] + description: Policy status + workspace_id: + type: string + format: uuid + description: Workspace UUID + organisation_id: + type: string + format: uuid + description: Organization UUID + created_at: + type: string + format: date-time + description: Creation timestamp + last_updated_at: + type: string + format: date-time + description: Last update timestamp + value_key_usage_map: + type: object + additionalProperties: + $ref: '#/components/schemas/ValueKeyUsage' + description: Map of value keys to usage information (only included when include_usage=true) + + ValueKeyUsage: + type: object + properties: + current_usage: + type: number + description: Current usage value + status: + type: string + enum: [active, exhausted] + description: Usage status + is_threshold_alerts_sent: + type: boolean + description: Whether threshold alerts have been sent + is_exhausted_alerts_sent: + type: boolean + description: Whether exhausted alerts have been sent + + RateLimitsPolicy: + type: object + required: + - id + - type + - unit + - value + - status + - workspace_id + - organisation_id + - created_at + - last_updated_at + properties: + id: + type: string + format: uuid + description: Policy UUID + name: + type: string + nullable: true + description: Policy name + conditions: + type: array + items: + $ref: '#/components/schemas/Condition' + description: Array of conditions + group_by: + type: array + items: + $ref: '#/components/schemas/GroupBy' + description: Array of group by fields + type: + type: string + enum: [requests, tokens] + description: Policy type + unit: + type: string + enum: [rpm, rph, rpd] + description: Rate unit + value: + type: number + description: Rate limit value + status: + type: string + enum: [active, archived] + description: Policy status + workspace_id: + type: string + format: uuid + description: Workspace UUID + organisation_id: + type: string + format: uuid + description: Organization UUID + created_at: + type: string + format: date-time + description: Creation timestamp + last_updated_at: + type: string + format: date-time + description: Last update timestamp + + CreatePolicyResponse: + type: object + properties: + id: + type: string + format: uuid + description: Created policy UUID + object: + type: string + description: Resource type + example: policy_usage_limits + + UsageLimitsPolicyListResponse: + type: object + properties: + object: + type: string + example: list + data: + type: array + items: + $ref: '#/components/schemas/UsageLimitsPolicy' + total: + type: integer + description: Total number of policies + + UsageLimitsPolicyResponse: + allOf: + - $ref: '#/components/schemas/UsageLimitsPolicy' + - type: object + properties: + object: + type: string + example: policy_usage_limits + + RateLimitsPolicyListResponse: + type: object + properties: + object: + type: string + example: list + data: + type: array + items: + $ref: '#/components/schemas/RateLimitsPolicy' + total: + type: integer + description: Total number of policies + + RateLimitsPolicyResponse: + allOf: + - $ref: '#/components/schemas/RateLimitsPolicy' + - type: object + properties: + object: + type: string + example: policy_rate_limits + security: - Portkey-Key: []