openapi: 3.1.0 info: title: Application Research CNAB Bundle API Resources Claim Results API version: 1.0.0 description: 'API for managing Cloud Native Application Bundles (CNAB). This API provides endpoints for managing CNAB bundles, claims, claim results, dependencies, parameter sources, relocation mappings, and installation status. ' contact: name: CNAB Specification url: https://cnab.io license: name: Apache-2.0 url: https://www.apache.org/licenses/LICENSE-2.0 servers: - url: https://api.example.com/v1 description: Production server - url: https://staging-api.example.com/v1 description: Staging server security: - bearerAuth: [] - apiKey: [] tags: - name: Claim Results description: Operations for managing claim execution results paths: /claims/{id}/results: parameters: - $ref: '#/components/parameters/ClaimIdParam' get: tags: - Claim Results summary: Application Research List results for a claim operationId: listClaimResults responses: '200': description: List of claim results content: application/json: schema: $ref: '#/components/schemas/ClaimResultListResponse' examples: resultList: $ref: '#/components/examples/ClaimResultListResponse' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalError' /results/{id}: get: tags: - Claim Results summary: Application Research Get a claim result by ID operationId: getClaimResult parameters: - $ref: '#/components/parameters/ResultIdParam' responses: '200': description: Claim result details content: application/json: schema: $ref: '#/components/schemas/ClaimResult' examples: successResult: $ref: '#/components/examples/ClaimResultSuccess' failedResult: $ref: '#/components/examples/ClaimResultFailed' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalError' components: responses: InternalError: description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' examples: internalError: $ref: '#/components/examples/ErrorInternal' NotFound: description: Resource not found content: application/json: schema: $ref: '#/components/schemas/Error' examples: notFound: $ref: '#/components/examples/ErrorNotFound' schemas: ClaimResult: type: object description: CNAB Claim Result representing the outcome of an action required: - id - claimId - status - created properties: id: type: string description: The result ID (ULID) claimId: type: string description: The associated claim ID status: $ref: '#/components/schemas/ClaimResultStatus' message: type: string description: The last message from the invocation image or runtime created: type: string format: date-time description: The date created (ISO-8601) outputs: type: object description: Map of outputs generated by the operation additionalProperties: $ref: '#/components/schemas/ClaimResultOutput' custom: type: object description: Reserved for custom extensions additionalProperties: true ClaimResultOutput: type: object description: An output value from a claim result properties: contentDigest: type: string description: A cryptographic hash digest of the output contents additionalProperties: true Error: type: object description: Error response required: - code - message properties: code: type: string description: Error code message: type: string description: Human-readable error message details: type: object description: Additional error details additionalProperties: true ClaimResultStatus: type: string description: The status of the operation enum: - canceled - failed - succeeded - pending - running - unknown ClaimResultListResponse: type: array items: $ref: '#/components/schemas/ClaimResult' examples: ErrorNotFound: summary: Not found error description: Example error when resource is not found value: code: NOT_FOUND message: Bundle 'my-bundle' not found ErrorInternal: summary: Internal error description: Example internal server error value: code: INTERNAL_ERROR message: An unexpected error occurred details: requestId: req-123456 ClaimResultFailed: summary: Failed claim result description: Example of a failed operation result value: id: 01HQABC223456789ABCDEFGH claimId: 01HQXYZ223456789ABCDEFGH status: failed message: 'Error: Unable to connect to database server' created: '2024-02-20T14:50:00Z' outputs: {} ClaimResultListResponse: summary: Claim result list response description: Example response for listing claim results value: - id: 01HQABC123456789ABCDEFGH claimId: 01HQXYZ123456789ABCDEFGH status: succeeded message: Installation completed successfully created: '2024-01-15T10:35:00Z' - id: 01HQABC223456789ABCDEFGH claimId: 01HQXYZ123456789ABCDEFGH status: running message: Upgrading database schema... created: '2024-01-16T09:00:00Z' ClaimResultSuccess: summary: Successful claim result description: Example of a successful operation result value: id: 01HQABC123456789ABCDEFGH claimId: 01HQXYZ123456789ABCDEFGH status: succeeded message: Installation completed successfully created: '2024-01-15T10:35:00Z' outputs: db-connection-string: contentDigest: sha256:conn123... parameters: ResultIdParam: name: id in: path required: true description: Result ID (ULID) schema: type: string ClaimIdParam: name: id in: path required: true description: Claim ID (ULID) schema: type: string securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT description: JWT-based authentication apiKey: type: apiKey in: header name: X-API-Key description: API key authentication