openapi: 3.2.0 info: description: Credo AI server API title: Credo AI server Integrations API servers: - url: /api/v2/credoai tags: - name: integrations paths: /integrations: get: description: Retrieve a list of all integrations. operationId: CredoAIWeb.API.V2.IntegrationController.index responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/IntegrationsResponse' '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' security: - Bearer: [] summary: '' tags: - integrations post: description: Create a new integration with the provided attributes. operationId: CredoAIWeb.API.V2.IntegrationController.create responses: '201': description: Created content: application/vnd.api+json: schema: $ref: '#/components/schemas/IntegrationResponse' '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' '403': description: Forbidden content: application/vnd.api+json: schema: $ref: '#/components/schemas/ForbiddenError' security: - Bearer: [] summary: '' tags: - integrations requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/IntegrationCreateRequest' description: The attributes for the integration being created. /integrations/{id}: delete: description: Delete an integration by its ID. operationId: CredoAIWeb.API.V2.IntegrationController.delete parameters: - description: The unique ID of the integration to delete. in: path name: id required: true schema: type: string responses: '204': description: No Content '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' '403': description: Forbidden content: application/vnd.api+json: schema: $ref: '#/components/schemas/ForbiddenError' '404': description: Not Found content: application/vnd.api+json: schema: $ref: '#/components/schemas/NotFoundError' security: - Bearer: [] summary: '' tags: - integrations get: description: Fetch details of a specific integration by its ID. operationId: CredoAIWeb.API.V2.IntegrationController.show parameters: - description: The unique ID of the integration. in: path name: id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/IntegrationResponse' '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' '404': description: Not Found content: application/vnd.api+json: schema: $ref: '#/components/schemas/NotFoundError' security: - Bearer: [] summary: '' tags: - integrations patch: description: Update an existing integration identified by its ID. operationId: CredoAIWeb.API.V2.IntegrationController.update parameters: - description: The unique ID of the integration to update. in: path name: id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/IntegrationResponse' '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' '403': description: Forbidden content: application/vnd.api+json: schema: $ref: '#/components/schemas/ForbiddenError' '404': description: Not Found content: application/vnd.api+json: schema: $ref: '#/components/schemas/NotFoundError' security: - Bearer: [] summary: '' tags: - integrations requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/IntegrationUpdateRequest' description: Updated integration data. /integrations/{id}/refresh_data: post: description: Trigger a data sync from the external integration source. operationId: CredoAIWeb.API.V2.IntegrationController.refresh_data parameters: - description: The unique ID of the integration. in: path name: id required: true schema: type: string responses: '202': description: Accepted content: application/vnd.api+json: schema: $ref: '#/components/schemas/IntegrationResponse' '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' '403': description: Forbidden content: application/vnd.api+json: schema: $ref: '#/components/schemas/ForbiddenError' '404': description: Not Found content: application/vnd.api+json: schema: $ref: '#/components/schemas/NotFoundError' security: - Bearer: [] summary: '' tags: - integrations /integrations/{id}/rotate_token: post: description: Rotate the integration token/key for the specified integration. operationId: CredoAIWeb.API.V2.IntegrationController.rotate_token parameters: - description: The unique ID of the integration. in: path name: id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/IntegrationResponse' '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' '403': description: Forbidden content: application/vnd.api+json: schema: $ref: '#/components/schemas/ForbiddenError' '404': description: Not Found content: application/vnd.api+json: schema: $ref: '#/components/schemas/NotFoundError' security: - Bearer: [] summary: '' tags: - integrations components: schemas: IntegrationUpdateRequest: description: '' properties: data: description: '' properties: attributes: properties: data: description: integration data type: object type: description: integration type type: string type: object id: description: The JSON-API resource ID example: 64YUaLWSviHgibJaRWr3ZE type: string type: description: The JSON-API resource type example: resource-type type: string type: object type: object NotFoundError: properties: errors: description: Errors items: properties: code: description: an application-specific error code, expressed as a string value. type: integer detail: description: a human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized. type: string title: description: a short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. type: string type: object type: array type: object IntegrationResource: description: '' properties: attributes: properties: data: description: '' type: string inserted_at: description: '' type: string type: description: '' type: string updated_at: description: '' type: string type: object id: description: The JSON-API resource ID example: 64YUaLWSviHgibJaRWr3ZE type: string relationships: properties: use_case_sync_issues: properties: data: items: properties: id: description: Related use_case_sync_issues resource id type: string type: description: Type of related use_case_sync_issues resource type: string type: object type: array type: object type: object type: description: The JSON-API resource type example: integrations type: string type: object IntegrationResponse: description: A JSON-API document with a single [IntegrationResource](#integrationresource) resource properties: data: $ref: '#/components/schemas/IntegrationResource' included: description: Included resources items: properties: id: description: The JSON-API resource ID type: string type: description: The JSON-API resource type type: string type: object type: array required: - data type: object IntegrationCreateRequest: description: '' properties: data: description: '' properties: attributes: properties: data: description: integration data type: object type: description: integration type type: string required: - type - data type: object type: description: The JSON-API resource type example: resource-type type: string type: object type: object IntegrationsResponse: description: A collection of [IntegrationResource](#integrationresource) properties: data: description: Content with [IntegrationResource](#integrationresource) objects items: $ref: '#/components/schemas/IntegrationResource' type: array required: - data type: object ForbiddenError: properties: errors: description: Errors items: properties: code: description: an application-specific error code, expressed as a string value. type: integer detail: description: a human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized. type: string title: description: a short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. type: string type: object type: array type: object AuthError: properties: errors: description: Errors items: properties: code: description: an application-specific error code, expressed as a string value. type: integer detail: description: a human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized. type: string title: description: a short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. type: string type: object type: array type: object securitySchemes: Bearer: in: header name: Authorization type: apiKey