openapi: 3.1.0 info: version: 1.0.0 title: Hatchet API Token Tenant API description: The Hatchet API servers: - url: '' security: - bearerAuth: [] - cookieAuth: [] tags: - name: Tenant paths: /api/v1/tenants/{tenant}/alerting-email-groups: post: x-resources: - tenant description: Creates a new tenant alert email group operationId: alert-email-group:create parameters: - description: The tenant id in: path name: tenant required: true schema: type: string format: uuid minLength: 36 maxLength: 36 requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateTenantAlertEmailGroupRequest' description: The tenant alert email group to create required: true responses: '201': content: application/json: schema: $ref: '#/components/schemas/TenantAlertEmailGroup' description: Successfully created the tenant alert email group '400': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: A malformed or bad request '403': content: application/json: schema: $ref: '#/components/schemas/APIError' description: Forbidden summary: Create Tenant Alert Email Group tags: - Tenant get: x-resources: - tenant description: Gets a list of tenant alert email groups operationId: alert-email-group:list parameters: - description: The tenant id in: path name: tenant required: true schema: type: string format: uuid minLength: 36 maxLength: 36 responses: '200': content: application/json: schema: $ref: '#/components/schemas/TenantAlertEmailGroupList' description: Successfully retrieved the tenant alert email groups '400': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: A malformed or bad request '403': content: application/json: schema: $ref: '#/components/schemas/APIError' description: Forbidden summary: List Tenant Alert Email Groups tags: - Tenant /api/v1/tenants/{tenant}/resource-policy: get: x-resources: - tenant description: Gets the resource policy for a tenant operationId: tenant-resource-policy:get parameters: - description: The tenant id in: path name: tenant required: true schema: type: string format: uuid minLength: 36 maxLength: 36 responses: '200': content: application/json: schema: $ref: '#/components/schemas/TenantResourcePolicy' description: Successfully retrieved the tenant resource policy '400': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: A malformed or bad request '403': content: application/json: schema: $ref: '#/components/schemas/APIError' description: Forbidden summary: Create Tenant Alert Email Group tags: - Tenant /api/v1/alerting-email-groups/{alert-email-group}: patch: x-resources: - tenant - alert-email-group description: Updates a tenant alert email group operationId: alert-email-group:update parameters: - description: The tenant alert email group id in: path name: alert-email-group required: true schema: type: string format: uuid minLength: 36 maxLength: 36 requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateTenantAlertEmailGroupRequest' description: The tenant alert email group to update required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/TenantAlertEmailGroup' description: Successfully updated the tenant alert email group '400': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: A malformed or bad request '403': content: application/json: schema: $ref: '#/components/schemas/APIError' description: Forbidden summary: Update Tenant Alert Email Group tags: - Tenant delete: x-resources: - tenant - alert-email-group description: Deletes a tenant alert email group operationId: alert-email-group:delete parameters: - description: The tenant alert email group id in: path name: alert-email-group required: true schema: type: string format: uuid minLength: 36 maxLength: 36 responses: '204': description: Successfully deleted the tenant alert email group '400': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: A malformed or bad request '403': content: application/json: schema: $ref: '#/components/schemas/APIError' description: Forbidden summary: Delete Tenant Alert Email Group tags: - Tenant /api/v1/users/invites: get: description: Lists all tenant invites for the current user operationId: user:list:tenant-invites responses: '200': content: application/json: schema: $ref: '#/components/schemas/TenantInviteList' description: Successfully listed the tenant invites '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 security: - cookieAuth: [] summary: List Tenant Invites tags: - Tenant /api/v1/users/invites/accept: post: description: Accepts a tenant invite operationId: tenant-invite:accept requestBody: content: application/json: schema: $ref: '#/components/schemas/AcceptInviteRequest' responses: '200': description: Successfully accepted the tenant invite '400': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: A malformed or bad request '403': content: application/json: schema: $ref: '#/components/schemas/APIError' description: Forbidden summary: Accept Tenant Invite tags: - Tenant /api/v1/users/invites/reject: post: description: Rejects a tenant invite operationId: tenant-invite:reject requestBody: content: application/json: schema: $ref: '#/components/schemas/RejectInviteRequest' responses: '200': description: Successfully rejected the tenant invite '400': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: A malformed or bad request '403': content: application/json: schema: $ref: '#/components/schemas/APIError' description: Forbidden summary: Reject Tenant Invite tags: - Tenant /api/v1/tenants: post: x-resources: [] description: Creates a new tenant operationId: tenant:create requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateTenantRequest' description: The tenant to create required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/Tenant' description: Successfully created the tenant '400': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: A malformed or bad request '403': content: application/json: schema: $ref: '#/components/schemas/APIError' description: Forbidden summary: Create Tenant tags: - Tenant /api/v1/tenants/{tenant}: patch: x-resources: - tenant description: Update an existing tenant operationId: tenant:update parameters: - description: The tenant id in: path name: tenant required: true schema: type: string format: uuid minLength: 36 maxLength: 36 requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateTenantRequest' description: The tenant properties to update required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/Tenant' description: Successfully created the tenant '400': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: A malformed or bad request '403': content: application/json: schema: $ref: '#/components/schemas/APIError' description: Forbidden summary: Update Tenant tags: - Tenant get: x-resources: - tenant description: Get the details of a tenant operationId: tenant:get parameters: - description: The tenant id to get details for in: path name: tenant required: true schema: type: string format: uuid minLength: 36 maxLength: 36 responses: '200': content: application/json: schema: $ref: '#/components/schemas/Tenant' description: Successfully got the tenant '400': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: A malformed or bad request '403': content: application/json: schema: $ref: '#/components/schemas/APIError' description: Forbidden '404': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: Tenant does not exist summary: Get Tenant tags: - Tenant /api/v1/tenants/{tenant}/alerting/settings: get: x-resources: - tenant description: Gets the alerting settings for a tenant operationId: tenant-alerting-settings:get parameters: - description: The tenant id in: path name: tenant required: true schema: type: string format: uuid minLength: 36 maxLength: 36 responses: '200': content: application/json: schema: $ref: '#/components/schemas/TenantAlertingSettings' description: Successfully retrieved the tenant alerting settings '400': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: A malformed or bad request '403': content: application/json: schema: $ref: '#/components/schemas/APIError' description: Forbidden summary: Get Tenant Alerting Settings tags: - Tenant /api/v1/tenants/{tenant}/invites: post: x-resources: - tenant x-enable-rate-limiting: true description: Creates a new tenant invite operationId: tenant-invite:create parameters: - description: The tenant id in: path name: tenant required: true schema: type: string format: uuid minLength: 36 maxLength: 36 requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateTenantInviteRequest' description: The tenant invite to create required: true responses: '201': content: application/json: schema: $ref: '#/components/schemas/TenantInvite' description: Successfully created the tenant invite '400': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: A malformed or bad request '403': content: application/json: schema: $ref: '#/components/schemas/APIError' description: Forbidden '422': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: Rate limit exceeded summary: Create Tenant Invite tags: - Tenant get: x-resources: - tenant description: Gets a list of tenant invites operationId: tenant-invite:list parameters: - description: The tenant id in: path name: tenant required: true schema: type: string format: uuid minLength: 36 maxLength: 36 responses: '200': content: application/json: schema: $ref: '#/components/schemas/TenantInviteList' description: Successfully retrieved the tenant invites '400': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: A malformed or bad request '403': content: application/json: schema: $ref: '#/components/schemas/APIError' description: Forbidden summary: List Tenant Invites tags: - Tenant /api/v1/tenants/{tenant}/step-run-queue-metrics: get: x-resources: - tenant description: Get the queue metrics for the tenant operationId: tenant:get:step-run-queue-metrics parameters: - description: The tenant id in: path name: tenant required: true schema: type: string format: uuid minLength: 36 maxLength: 36 responses: '200': content: application/json: schema: $ref: '#/components/schemas/TenantStepRunQueueMetrics' description: Successfully retrieved the step run queue metrics '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 '404': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: Not found summary: Get Step Run Metrics tags: - Tenant /api/v1/tenants/{tenant}/members: get: x-resources: - tenant description: Gets a list of tenant members operationId: tenant-member:list parameters: - description: The tenant id in: path name: tenant required: true schema: type: string format: uuid minLength: 36 maxLength: 36 responses: '200': content: application/json: schema: $ref: '#/components/schemas/TenantMemberList' description: Successfully retrieved the tenant members '400': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: A malformed or bad request '403': content: application/json: schema: $ref: '#/components/schemas/APIError' description: Forbidden summary: List Tenant Members tags: - Tenant /api/v1/tenants/{tenant}/members/{member}: patch: x-resources: - tenant - member description: Update a tenant member operationId: tenant-member:update parameters: - description: The tenant id in: path name: tenant required: true schema: type: string format: uuid minLength: 36 maxLength: 36 - description: The tenant member id in: path name: member required: true schema: type: string format: uuid minLength: 36 maxLength: 36 requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateTenantMemberRequest' description: The tenant member properties to update required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/TenantMember' description: Successfully updated the tenant member '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 '404': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: Not found summary: Update a Tenant Member tags: - Tenant delete: x-resources: - tenant - member description: Delete a member from a tenant operationId: tenant-member:delete parameters: - description: The tenant id in: path name: tenant required: true schema: type: string format: uuid minLength: 36 maxLength: 36 - description: The tenant member id in: path name: member required: true schema: type: string format: uuid minLength: 36 maxLength: 36 responses: '204': content: application/json: schema: $ref: '#/components/schemas/TenantMember' description: Successfully deleted the tenant members '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 '404': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: Not found summary: Delete a Tenant Member tags: - Tenant /api/v1/tenants/{tenant}/prometheus-metrics: get: x-resources: - tenant description: Get the prometheus metrics for the tenant operationId: tenant:get:prometheus-metrics parameters: - description: The tenant id in: path name: tenant required: true schema: type: string format: uuid minLength: 36 maxLength: 36 responses: '200': content: text/plain: schema: type: string description: Successfully retrieved the prometheus metrics '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 '404': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: Not found summary: Get Prometheus Metrics tags: - Tenant /api/v1/tenants/{tenant}/task-stats: get: x-resources: - tenant x-enable-rate-limiting: true description: Get task stats for tenant operationId: tenant:get:task-stats parameters: - description: The tenant ID in: path name: tenant required: true schema: type: string format: uuid minLength: 36 maxLength: 36 - description: Task names that must appear in the response. Missing tasks are zero-filled so KEDA's metrics-api JSONPath always resolves. in: query name: taskNames required: false schema: type: array items: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/TaskStats' description: Successfully retrieved task stats for tenant '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 '404': content: application/json: schema: $ref: '#/components/schemas/APIErrors' description: Not found summary: Get Task Stats for Tenant tags: - Tenant components: schemas: TenantResource: enum: - WORKER - WORKER_SLOT - EVENT - TASK_RUN - CRON - SCHEDULE - INCOMING_WEBHOOK type: string TenantEnvironment: enum: - local - development - production type: string TenantAlertingSettings: properties: metadata: $ref: '#/components/schemas/APIResourceMeta' alertMemberEmails: type: boolean description: Whether to alert tenant members. enableWorkflowRunFailureAlerts: type: boolean description: Whether to send alerts when workflow runs fail. enableExpiringTokenAlerts: type: boolean description: Whether to enable alerts when tokens are approaching expiration. enableTenantResourceLimitAlerts: type: boolean description: Whether to enable alerts when tenant resources are approaching limits. maxAlertingFrequency: type: string description: The max frequency at which to alert. lastAlertedAt: type: string description: The last time an alert was sent. format: date-time required: - metadata - maxAlertingFrequency type: object TenantMemberRole: enum: - OWNER - ADMIN - MEMBER type: string Tenant: properties: metadata: $ref: '#/components/schemas/APIResourceMeta' name: type: string description: The name of the tenant. slug: type: string description: The slug of the tenant. analyticsOptOut: type: boolean description: Whether the tenant has opted out of analytics. alertMemberEmails: type: boolean description: Whether to alert tenant members. version: $ref: '#/components/schemas/TenantVersion' description: The version of the tenant. environment: $ref: '#/components/schemas/TenantEnvironment' description: The environment type of the tenant. serverUrl: type: string description: The server URL for the tenant (includes scheme) region: type: string description: Control-plane shard region for the tenant (e.g. aws:us-west-2). required: - metadata - name - slug - version type: object APIResourceMeta: type: object properties: id: type: string description: the id of this resource, in UUID format example: bb214807-246e-43a5-a25d-41761d1cff9e minLength: 0 maxLength: 36 createdAt: type: string description: the time that this resource was created format: date-time example: '2022-12-13T15:06:48.888358-05:00' updatedAt: type: string description: the time that this resource was last updated format: date-time example: '2022-12-13T15:06:48.888358-05:00' required: - id - createdAt - updatedAt TaskStats: type: object additionalProperties: $ref: '#/components/schemas/TaskStat' 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 TenantMemberList: properties: pagination: $ref: '#/components/schemas/PaginationResponse' rows: items: $ref: '#/components/schemas/TenantMember' type: array x-go-name: Rows 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 UpdateTenantMemberRequest: properties: role: $ref: '#/components/schemas/TenantMemberRole' description: The role of the user in the tenant. x-oapi-codegen-extra-tags: validate: required required: - role type: object AcceptInviteRequest: properties: invite: type: string example: bb214807-246e-43a5-a25d-41761d1cff9e minLength: 36 maxLength: 36 x-oapi-codegen-extra-tags: validate: required,uuid required: - invite type: object UpdateTenantRequest: properties: name: type: string description: The name of the tenant. analyticsOptOut: type: boolean description: Whether the tenant has opted out of analytics. alertMemberEmails: type: boolean description: Whether to alert tenant members. enableWorkflowRunFailureAlerts: type: boolean description: Whether to send alerts when workflow runs fail. enableExpiringTokenAlerts: type: boolean description: Whether to enable alerts when tokens are approaching expiration. enableTenantResourceLimitAlerts: type: boolean description: Whether to enable alerts when tenant resources are approaching limits. maxAlertingFrequency: type: string description: The max frequency at which to alert. x-oapi-codegen-extra-tags: validate: omitnil,duration version: $ref: '#/components/schemas/TenantVersion' description: The version of the tenant. type: object TenantResourcePolicy: properties: limits: type: array items: $ref: '#/components/schemas/TenantResourceLimit' description: A list of resource limits for the tenant. required: - limits type: object TaskStat: properties: queued: $ref: '#/components/schemas/TaskStatusStat' running: $ref: '#/components/schemas/TaskStatusStat' type: object TenantAlertEmailGroup: properties: metadata: $ref: '#/components/schemas/APIResourceMeta' emails: type: array items: type: string description: A list of emails for users required: - metadata - emails type: object TenantAlertEmailGroupList: properties: pagination: $ref: '#/components/schemas/PaginationResponse' rows: items: $ref: '#/components/schemas/TenantAlertEmailGroup' type: array x-go-name: Rows TenantResourceLimit: properties: metadata: $ref: '#/components/schemas/APIResourceMeta' resource: $ref: '#/components/schemas/TenantResource' description: The resource associated with this limit. limitValue: type: integer description: The limit associated with this limit. alarmValue: type: integer description: The alarm value associated with this limit to warn of approaching limit value. value: type: integer description: The current value associated with this limit. window: type: string description: The meter window for the limit. (i.e. 1 day, 1 week, 1 month) lastRefill: type: string description: The last time the limit was refilled. format: date-time required: - metadata - tenantId - resource - limitValue - value type: object CreateTenantInviteRequest: properties: email: type: string description: The email of the user to invite. x-oapi-codegen-extra-tags: validate: required,email role: $ref: '#/components/schemas/TenantMemberRole' description: The role of the user in the tenant. x-oapi-codegen-extra-tags: validate: required required: - email - role type: object CreateTenantAlertEmailGroupRequest: properties: emails: type: array items: type: string description: A list of emails for users x-oapi-codegen-extra-tags: validate: required,dive,email required: - emails type: object CreateTenantRequest: properties: name: type: string description: The name of the tenant. x-oapi-codegen-extra-tags: validate: required slug: type: string description: The slug of the tenant. x-oapi-codegen-extra-tags: validate: required,hatchetName engineVersion: $ref: '#/components/schemas/TenantVersion' description: The engine version of the tenant. Defaults to V0. environment: $ref: '#/components/schemas/TenantEnvironment' description: The environment type of the tenant. onboardingData: type: object description: Additional onboarding data to store with the tenant. additionalProperties: true required: - name - slug type: object APIErrors: type: object properties: errors: type: array items: $ref: '#/components/schemas/APIError' required: - errors TenantVersion: enum: - V0 - V1 type: string UserTenantPublic: properties: email: type: string format: email description: The email address of the user. name: type: string description: The display name of the user. required: - email type: object TaskStatusStat: properties: total: type: integer format: int64 queues: type: object additionalProperties: type: integer format: int64 concurrency: type: array items: $ref: '#/components/schemas/ConcurrencyStat' oldest: type: string format: date-time type: object TenantInviteList: properties: pagination: $ref: '#/components/schemas/PaginationResponse' rows: items: $ref: '#/components/schemas/TenantInvite' type: array x-go-name: Rows TenantInvite: properties: metadata: $ref: '#/components/schemas/APIResourceMeta' email: type: string description: The email of the user to invite. role: $ref: '#/components/schemas/TenantMemberRole' description: The role of the user in the tenant. tenantId: type: string description: The tenant id associated with this tenant invite. tenantName: type: string description: The tenant name for the tenant. expires: type: string description: The time that this invite expires. format: date-time required: - metadata - email - role - expires - tenantId type: object TenantMember: properties: metadata: $ref: '#/components/schemas/APIResourceMeta' user: $ref: '#/components/schemas/UserTenantPublic' description: The user associated with this tenant member. role: $ref: '#/components/schemas/TenantMemberRole' description: The role of the user in the tenant. tenant: $ref: '#/components/schemas/Tenant' description: The tenant associated with this tenant member. required: - metadata - user - role type: object TenantStepRunQueueMetrics: properties: queues: type: object UpdateTenantAlertEmailGroupRequest: properties: emails: type: array items: type: string description: A list of emails for users x-oapi-codegen-extra-tags: validate: required,dive,email required: - emails type: object ConcurrencyStat: properties: expression: type: string type: type: string keys: type: object additionalProperties: type: integer format: int64 type: object RejectInviteRequest: properties: invite: type: string example: bb214807-246e-43a5-a25d-41761d1cff9e minLength: 36 maxLength: 36 x-oapi-codegen-extra-tags: validate: required,uuid required: - invite type: object securitySchemes: bearerAuth: type: http scheme: bearer cookieAuth: type: apiKey in: cookie name: hatchet customAuth: type: http scheme: bearer