openapi: 3.1.0 info: title: Arthur Scope Agents V1 Webhooks V1 API version: 0.1.0 tags: - name: Webhooks V1 paths: /api/v1/workspaces/{workspace_id}/webhooks: post: tags: - Webhooks V1 summary: Post Webhook. description: Creates a webhook in a given workspace. Requires workspace_create_webhook permission. operationId: post_webhook security: - OAuth2AuthorizationCode: - workspace_create_webhook parameters: - name: workspace_id in: path required: true schema: type: string format: uuid title: Workspace Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PostWebhook' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Webhook' '500': content: application/json: schema: $ref: '#/components/schemas/InternalServerError' description: Internal Server Error '400': content: application/json: schema: $ref: '#/components/schemas/BadRequestError' description: Bad Request '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: Not Found '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' get: tags: - Webhooks V1 summary: Get Webhooks. description: Return a list of webhooks associated with a workspace. Requires workspace_list_webhooks permission. operationId: get_workspace_webhooks security: - OAuth2AuthorizationCode: - workspace_list_webhooks parameters: - name: workspace_id in: path required: true schema: type: string format: uuid title: Workspace Id - name: sort in: query required: false schema: $ref: '#/components/schemas/WebhookSort' description: Override the field used for sorting the returned list. Optional. default: created_at description: Override the field used for sorting the returned list. Optional. - name: order in: query required: false schema: $ref: '#/components/schemas/SortOrder' description: Override the sort order used. Optional. default: desc description: Override the sort order used. Optional. - name: name in: query required: false schema: type: string description: Search term to filter webhooks by name. title: Name description: Search term to filter webhooks by name. - name: page in: query required: false schema: type: integer minimum: 1 description: The page to return starting from 1 up to total_pages. default: 1 title: Page description: The page to return starting from 1 up to total_pages. - name: page_size in: query required: false schema: type: integer maximum: 1000 minimum: 1 description: The number of records per page. The max is 1000. default: 20 title: Page Size description: The number of records per page. The max is 1000. responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ResourceList_Webhook_' '500': content: application/json: schema: $ref: '#/components/schemas/InternalServerError' description: Internal Server Error '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: Not Found '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/v1/workspaces/{workspace_id}/webhooks/test: post: tags: - Webhooks V1 summary: Post Test Webhook. description: Tests a webhook in a given workspace. Requires workspace_test_webhook permission. operationId: post_test_webhook security: - OAuth2AuthorizationCode: - workspace_test_webhook parameters: - name: workspace_id in: path required: true schema: type: string format: uuid title: Workspace Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PostWebhook' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/WebhookResult' '500': content: application/json: schema: $ref: '#/components/schemas/InternalServerError' description: Internal Server Error '400': content: application/json: schema: $ref: '#/components/schemas/BadRequestError' description: Bad Request '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: Not Found '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/v1/webhooks/{webhook_id}: get: tags: - Webhooks V1 summary: Get Webhook. description: Requires webhook_read permission. operationId: get_webhook security: - OAuth2AuthorizationCode: - webhook_read parameters: - name: webhook_id in: path required: true schema: type: string format: uuid title: Webhook Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Webhook' '500': content: application/json: schema: $ref: '#/components/schemas/InternalServerError' description: Internal Server Error '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: Not Found '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' patch: tags: - Webhooks V1 summary: Patch Webhook. description: Requires webhook_update permission. operationId: patch_webhook security: - OAuth2AuthorizationCode: - webhook_update parameters: - name: webhook_id in: path required: true schema: type: string format: uuid title: Webhook Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PatchWebhook' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Webhook' '500': content: application/json: schema: $ref: '#/components/schemas/InternalServerError' description: Internal Server Error '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: Not Found '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - Webhooks V1 summary: Delete Webhook. description: Requires webhook_delete permission. operationId: delete_webhook security: - OAuth2AuthorizationCode: - webhook_delete parameters: - name: webhook_id in: path required: true schema: type: string format: uuid title: Webhook Id responses: '204': description: Successful Response '500': content: application/json: schema: $ref: '#/components/schemas/InternalServerError' description: Internal Server Error '400': content: application/json: schema: $ref: '#/components/schemas/BadRequestError' description: Bad Request '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: Not Found '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: Webhook: properties: name: type: string title: Name description: Name of webhook. url: type: string title: Url description: URL of the webhook. headers: additionalProperties: items: type: string type: array type: object title: Headers description: List of headers for the webhook. default: {} body: type: string title: Body description: Body of the webhook. created_at: type: string format: date-time title: Created At description: Time of record creation. updated_at: type: string format: date-time title: Updated At description: Time of last record update. id: type: string format: uuid title: Id description: The id of the webhook. workspace_id: type: string format: uuid title: Workspace Id description: ID of the parent workspace. last_updated_by_user: anyOf: - $ref: '#/components/schemas/User' - type: 'null' description: Information for user who last updated the webhook. type: object required: - name - url - body - created_at - updated_at - id - workspace_id title: Webhook ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError UserType: type: string enum: - user - data_plane - service_account title: UserType Pagination: properties: page: type: integer title: Page description: The current page number. Page 1 is the first page. default: 1 page_size: type: integer title: Page Size description: Number of records per page. default: 20 total_pages: type: integer title: Total Pages description: Total number of pages. total_records: type: integer title: Total Records description: Total number of records across all pages. type: object required: - total_pages - total_records title: Pagination WebhookResponse: properties: status_code: anyOf: - type: integer - type: 'null' title: Status Code response: anyOf: - type: string - type: 'null' title: Response type: object required: - status_code - response title: WebhookResponse User: properties: created_at: type: string format: date-time title: Created At description: Time of record creation. updated_at: type: string format: date-time title: Updated At description: Time of last record update. organization_id: type: string format: uuid4 title: Organization Id description: The ID of the Arthur organization the user belongs to. id: type: string format: uuid4 title: Id description: Unique user ID assigned by Arthur. first_name: type: string title: First Name description: The user's first name. last_name: anyOf: - type: string - type: 'null' title: Last Name description: The user's last name. email: anyOf: - type: string format: email - type: 'null' title: Email description: The user's email, if provided. picture: anyOf: - type: string - type: 'null' title: Picture description: A url to the user's profile picture, if one exists. user_type: $ref: '#/components/schemas/UserType' description: The type of user. data_plane_id: anyOf: - type: string format: uuid - type: 'null' title: Data Plane Id description: Arthur data plane ID. Only set for data plane users. client_id: anyOf: - type: string - type: 'null' title: Client Id description: Arthur client ID for this user. Only set for service account type users. organization_name: type: string title: Organization Name description: Name of user's Arthur organization. type: object required: - created_at - updated_at - organization_id - id - first_name - last_name - user_type - organization_name title: User SortOrder: type: string enum: - asc - desc title: SortOrder ResourceList_Webhook_: properties: records: items: $ref: '#/components/schemas/Webhook' type: array title: Records description: List of records. pagination: $ref: '#/components/schemas/Pagination' description: Pagination information. type: object required: - records - pagination title: ResourceList[Webhook] PatchWebhook: properties: name: anyOf: - type: string - type: 'null' title: Name description: Name of webhook. url: anyOf: - type: string - type: 'null' title: Url description: URL of the webhook. headers: anyOf: - additionalProperties: items: type: string type: array type: object - type: 'null' title: Headers description: List of headers for the webhook. body: anyOf: - type: string - type: 'null' title: Body description: Body of the webhook. type: object title: PatchWebhook InternalServerError: properties: detail: type: string title: Detail default: Internal server error type: object title: InternalServerError WebhookResult: properties: error: anyOf: - type: string - type: 'null' title: Error response: anyOf: - $ref: '#/components/schemas/WebhookResponse' - type: 'null' type: object required: - error - response title: WebhookResult NotFoundError: properties: detail: type: string title: Detail default: Resource not found type: object title: NotFoundError WebhookSort: type: string enum: - created_at - updated_at - name title: WebhookSort BadRequestError: properties: detail: type: string title: Detail default: Bad Request type: object title: BadRequestError PostWebhook: properties: name: type: string title: Name description: Name of webhook. url: type: string title: Url description: URL of the webhook. headers: additionalProperties: items: type: string type: array type: object title: Headers description: List of headers for the webhook. default: {} body: type: string title: Body description: Body of the webhook. type: object required: - name - url - body title: PostWebhook HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError securitySchemes: OAuth2AuthorizationCode: type: oauth2 flows: authorizationCode: refreshUrl: https://platform-auth.arthur.ai/realms/arthur/protocol/openid-connect/token scopes: {} authorizationUrl: https://platform-auth.arthur.ai/realms/arthur/protocol/openid-connect/auth tokenUrl: https://platform-auth.arthur.ai/realms/arthur/protocol/openid-connect/token