diff --git a/openapi.yaml b/openapi.yaml index 6f3bb612..f9630d26 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -19465,10 +19465,21 @@ paths: application/json: schema: $ref: '#/components/schemas/UpdateUsageLimitsPolicyRequest' - example: - credit_limit: 2000.0 - alert_threshold: 1500.0 - reset_usage_for_value: api-key-123 + examples: + updateLimits: + summary: Update credit limit and alert threshold + value: + credit_limit: 2000.0 + alert_threshold: 1500.0 + reset_usage_for_value: api-key-123 + updateConditions: + summary: Replace the policy conditions + value: + conditions: + - key: workspace_id + value: workspace-123 + - key: model + value: '@openai/*' responses: '200': description: OK @@ -37921,6 +37932,19 @@ components: type: string maxLength: 255 description: Policy name + description: + type: string + nullable: true + maxLength: 500 + description: Policy description + conditions: + type: array + minItems: 1 + items: + $ref: '#/components/schemas/Condition' + description: >- + Array of conditions that define which requests the policy applies to. + If provided, this replaces the existing conditions on the policy. credit_limit: type: number minimum: 0 @@ -37934,7 +37958,18 @@ components: type: string nullable: true enum: [monthly, weekly] - description: Reset period. Set to null to remove periodic reset. + description: Reset period. Set to null to remove periodic reset. Cannot be combined with periodic_reset_days. + periodic_reset_days: + type: integer + nullable: true + minimum: 1 + maximum: 365 + description: Number of days after which usage resets. Cannot be combined with periodic_reset. + next_usage_reset_at: + type: string + format: date-time + nullable: true + description: ISO 8601 timestamp for the next scheduled usage 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.