openapi: 3.2.0 info: contact: email: support@aptible.com description: REST API for the core Aptible platform. title: Aptible API v1 Database Credentials API version: v1 servers: - url: '{baseUrl}' variables: baseUrl: default: https://api.aptible.com description: Override for local or test environments security: - token: [] tags: - name: Database Credentials paths: /databases/{database_id}/database_credentials: get: description: Returns a paginated list of credentials for the specified database. operationId: ListDatabaseCredentialsForDatabase parameters: - description: database_id explode: false in: path name: database_id required: true schema: type: integer style: simple - description: Current page of paginated results explode: true in: query name: page required: false schema: type: integer style: form - description: Number of results to return per page explode: true in: query name: per_page required: false schema: type: integer style: form - description: 'When true, omits embedded resources from the response. Also triggered when the Prefer: no_sensitive_extras=true header is present.' explode: true in: query name: no_embed required: false schema: type: boolean style: form - description: When set to no_sensitive_extras=true, omits sensitive fields and embedded resources from the response. explode: false in: header name: Prefer required: false schema: enum: - no_sensitive_extras=true type: string style: simple responses: '200': content: application/hal+json: schema: $ref: '#/components/schemas/ListDatabaseCredentialsForDatabase_200_response' description: successful default: content: application/hal+json: schema: $ref: '#/components/schemas/error' description: Error response. Often a 4xx or 5xx status code summary: list database_credentials tags: - Database Credentials /database_credentials/{id}: get: description: Returns the details of a specific database credential by ID. operationId: GetDatabaseCredential parameters: - description: id explode: false in: path name: id required: true schema: type: integer style: simple - description: 'When true, omits embedded resources from the response. Also triggered when the Prefer: no_sensitive_extras=true header is present.' explode: true in: query name: no_embed required: false schema: type: boolean style: form - description: When set to no_sensitive_extras=true, omits sensitive fields and embedded resources from the response. explode: false in: header name: Prefer required: false schema: enum: - no_sensitive_extras=true type: string style: simple responses: '200': content: application/hal+json: schema: $ref: '#/components/schemas/database_credential' description: successful default: content: application/hal+json: schema: $ref: '#/components/schemas/error' description: Error response. Often a 4xx or 5xx status code summary: show database_credential tags: - Database Credentials components: schemas: ListAccountsForStack_200_response__links_stack: properties: href: format: uri type: string type: object ListDatabaseCredentialsForDatabase_200_response__links: properties: database: $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack' next: $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack' prev: $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack' self: $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack' type: object database_credential__links: properties: database: $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack' operations: $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack' self: $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack' type: object ListDatabaseCredentialsForDatabase_200_response: properties: _embedded: $ref: '#/components/schemas/ListDatabaseCredentialsForDatabase_200_response__embedded' total_count: type: integer per_page: type: integer current_page: type: integer _links: $ref: '#/components/schemas/ListDatabaseCredentialsForDatabase_200_response__links' required: - _embedded - _links - current_page - per_page - total_count type: object ListDatabaseCredentialsForDatabase_200_response__embedded: properties: database_credentials: items: $ref: '#/components/schemas/database_credential' type: array type: object database_credential: properties: id: type: integer _type: type: string created_at: format: dateTime type: string updated_at: format: dateTime type: string connection_url: type: string type: type: string default: type: boolean _links: $ref: '#/components/schemas/database_credential__links' required: - _type - created_at - default - id - type - updated_at error: properties: code: type: integer error: type: string message: type: string required: - code - error - message type: object securitySchemes: token: in: header name: Authorization type: apiKey