openapi: 3.1.0 info: title: elastic.io Platform REST Agents Credentials API description: The elastic.io Platform REST API v2 provides programmatic access to the elastic.io iPaaS platform. It allows you to manage integration flows, workspaces, contracts, credentials, components, recipes, users, and other platform resources. The API follows the JSON:API specification and uses Bearer token authentication. version: 2.0.0 contact: name: elastic.io url: https://www.elastic.io/ license: name: Proprietary url: https://www.elastic.io/ termsOfService: https://www.elastic.io/ servers: - url: https://api.elastic.io/v2 description: elastic.io Platform API v2 security: - bearerAuth: [] tags: - name: Credentials description: Manage authentication credentials for components paths: /credentials: get: operationId: listCredentials summary: Elastic.io List credentials description: Retrieve a list of credentials for the current workspace. tags: - Credentials parameters: - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/PageNumber' - $ref: '#/components/parameters/WorkspaceFilter' responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/CredentialListResponse' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createCredential summary: Elastic.io Create a credential description: Create a new credential for authenticating with external services. tags: - Credentials requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CredentialCreateRequest' responses: '201': description: Credential created successfully content: application/json: schema: $ref: '#/components/schemas/CredentialResponse' '401': $ref: '#/components/responses/Unauthorized' /credentials/{credential_id}: get: operationId: getCredential summary: Elastic.io Get a credential description: Retrieve details of a specific credential. tags: - Credentials parameters: - $ref: '#/components/parameters/CredentialId' responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/CredentialResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' patch: operationId: updateCredential summary: Elastic.io Update a credential description: Update an existing credential. tags: - Credentials parameters: - $ref: '#/components/parameters/CredentialId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CredentialUpdateRequest' responses: '200': description: Credential updated successfully content: application/json: schema: $ref: '#/components/schemas/CredentialResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' delete: operationId: deleteCredential summary: Elastic.io Delete a credential description: Delete a credential. tags: - Credentials parameters: - $ref: '#/components/parameters/CredentialId' responses: '204': description: Credential deleted successfully '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' components: schemas: CredentialUpdateRequest: type: object required: - data properties: data: type: object required: - type - id properties: type: type: string enum: - credential id: type: string attributes: type: object properties: name: type: string keys: type: object Credential: type: object properties: id: type: string type: type: string enum: - credential attributes: type: object properties: name: type: string keys: type: object description: Credential key-value pairs for authentication created_at: type: string format: date-time updated_at: type: string format: date-time relationships: type: object properties: workspace: $ref: '#/components/schemas/JsonApiRelationship' component: $ref: '#/components/schemas/JsonApiRelationship' CredentialListResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/Credential' meta: $ref: '#/components/schemas/JsonApiMeta' links: $ref: '#/components/schemas/JsonApiLinks' ErrorResponse: type: object properties: errors: type: array items: type: object properties: status: type: integer title: type: string detail: type: string JsonApiRelationship: type: object properties: data: type: object properties: id: type: string type: type: string JsonApiMeta: type: object properties: page: type: integer per_page: type: integer total: type: integer total_pages: type: integer CredentialCreateRequest: type: object required: - data properties: data: type: object required: - type - attributes - relationships properties: type: type: string enum: - credential attributes: type: object required: - name - keys properties: name: type: string keys: type: object relationships: type: object required: - workspace - component properties: workspace: $ref: '#/components/schemas/JsonApiRelationship' component: $ref: '#/components/schemas/JsonApiRelationship' JsonApiLinks: type: object properties: self: type: string format: uri first: type: string format: uri prev: type: string format: uri next: type: string format: uri last: type: string format: uri CredentialResponse: type: object properties: data: $ref: '#/components/schemas/Credential' parameters: WorkspaceFilter: name: filter[workspace_id] in: query description: Filter by workspace ID schema: type: string CredentialId: name: credential_id in: path required: true description: The unique identifier of the credential schema: type: string PageNumber: name: page[number] in: query description: Page number to retrieve schema: type: integer default: 1 PageSize: name: page[size] in: query description: Number of items per page schema: type: integer default: 20 responses: Unauthorized: description: Authentication required or token is invalid content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' NotFound: description: The requested resource was not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT description: Bearer token authentication. Obtain a token through the elastic.io platform login or API key.