openapi: 3.2.0 info: description: Credo AI server API title: Credo AI server Sources API servers: - url: /api/v2/credoai tags: - name: sources paths: /sources: get: description: Retrieve a list of all sources available in the system. operationId: CredoAIWeb.API.V2.SourceController.index parameters: - description: page after cursor in: query name: page[after] required: false schema: type: string - description: page before cursor in: query name: page[before] required: false schema: type: string - description: page limit in: query name: page[limit] required: false schema: type: integer responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/SourcesPageResponse' '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' security: - Bearer: [] summary: '' tags: - sources post: description: Create a new source with the specified attributes. operationId: CredoAIWeb.API.V2.SourceController.create responses: '201': description: Created content: application/vnd.api+json: schema: $ref: '#/components/schemas/SourceResource' '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: - sources requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/SourceCreateRequest' description: Attributes required to create a new source /sources/in_use: get: description: Retrieves a list of sources that are currently in use by models. operationId: CredoAIWeb.API.V2.SourceController.in_use responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/SourcesPageResponse' '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' security: - Bearer: [] summary: '' tags: - sources /sources/{id}: patch: description: Update the attributes of an existing source identified by its ID. operationId: CredoAIWeb.API.V2.SourceController.update parameters: - description: Unique identifier of the source to update in: path name: id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/SourceResource' '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: - sources requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/SourceUpdateRequest' description: Attributes to update the source components: schemas: 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 SourcesPageResponse: description: A page of [SourceResource](#sourceresource) results properties: data: description: Content with [SourceResource](#sourceresource) objects items: $ref: '#/components/schemas/SourceResource' type: array meta: properties: after: description: after cursor for the next page resources type: string before: description: before cursor for the previous page resources type: string limit: description: number of resources limit applied to this request type: integer type: object required: - data type: object SourceCreateRequest: description: '' properties: data: description: '' properties: attributes: properties: name: description: Source name type: string required: - name type: object type: description: The JSON-API resource type example: resource-type type: string type: object type: object SourceUpdateRequest: description: '' properties: data: description: '' properties: attributes: properties: name: description: Source name type: string required: - name 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 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 SourceResource: description: '' properties: attributes: properties: id: description: '' type: string inserted_at: description: '' type: string name: description: '' type: string updated_at: description: '' type: string type: object id: description: The JSON-API resource ID example: 64YUaLWSviHgibJaRWr3ZE type: string relationships: properties: {} type: object type: description: The JSON-API resource type example: sources type: string 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