openapi: 3.1.0 info: version: 1.0.0 title: Hatchet API Token Rate Limits API description: The Hatchet API servers: - url: '' security: - bearerAuth: [] - cookieAuth: [] tags: - name: Rate Limits paths: /api/v1/tenants/{tenant}/rate-limits: get: x-resources: - tenant description: Lists all rate limits for a tenant. operationId: rate-limit:list parameters: - description: The tenant id in: path name: tenant required: true schema: type: string format: uuid minLength: 36 maxLength: 36 - description: The number to skip in: query name: offset required: false schema: type: integer format: int64 - description: The number to limit by in: query name: limit required: false schema: type: integer format: int64 - description: The search query to filter for in: query name: search required: false schema: type: string - description: What to order by in: query name: orderByField required: false schema: $ref: '#/components/schemas/RateLimitOrderByField' - description: The order direction in: query name: orderByDirection required: false schema: $ref: '#/components/schemas/RateLimitOrderByDirection' responses: '200': content: application/json: schema: $ref: '#/components/schemas/RateLimitList' description: Successfully listed the rate limits '400': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: A malformed or bad request '403': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: Forbidden summary: List Rate Limits tags: - Rate Limits delete: x-resources: - tenant description: Delete a rate limit for a tenant. operationId: rate-limit:delete parameters: - description: The tenant id in: path name: tenant required: true schema: type: string format: uuid minLength: 36 maxLength: 36 - description: The limit key in: query name: key required: true schema: type: string responses: '204': description: Successfully deleted the rate limit '400': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: A malformed or bad request '403': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: Forbidden summary: Delete Rate Limit tags: - Rate Limits components: schemas: RateLimitOrderByDirection: type: string enum: - asc - desc RateLimitOrderByField: type: string enum: - key - value - limitValue PaginationResponse: type: object properties: current_page: type: integer description: the current page format: int64 example: 2 next_page: type: integer description: the next page format: int64 example: 3 num_pages: type: integer description: the total number of pages for listing format: int64 example: 10 example: next_page: 3 num_pages: 10 current_page: 2 RateLimit: properties: key: type: string description: The key for the rate limit. tenantId: type: string description: The ID of the tenant associated with this rate limit. limitValue: type: integer description: The maximum number of requests allowed within the window. value: type: integer description: The current number of requests made within the window. window: type: string description: The window of time in which the limitValue is enforced. lastRefill: type: string format: date-time example: '2022-12-13T15:06:48.888358-05:00' description: The last time the rate limit was refilled. required: - key - tenantId - limitValue - value - window - lastRefill RateLimitList: properties: pagination: $ref: '#/components/schemas/PaginationResponse' rows: items: $ref: '#/components/schemas/RateLimit' type: array APIErrors: type: object properties: errors: type: array items: $ref: '#/components/schemas/APIError' required: - errors APIError: type: object properties: code: type: integer description: a custom Hatchet error code format: uint64 example: 1400 field: type: string description: the field that this error is associated with, if applicable example: name description: type: string description: a description for this error example: A descriptive error message docs_link: type: string description: a link to the documentation for this error, if it exists example: github.com/hatchet-dev/hatchet required: - description securitySchemes: bearerAuth: type: http scheme: bearer cookieAuth: type: apiKey in: cookie name: hatchet customAuth: type: http scheme: bearer