Application Research Configurations API

Operations for managing component configurations

Documentation

Specifications

Code Examples

Schemas & Data

OpenAPI Specification

application-research-configurations-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Application Research CNAB Bundle API Resources Configurations 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: Configurations
  description: Operations for managing component configurations
paths:
  /configurations:
    get:
      tags:
      - Configurations
      summary: Application Research List component configurations
      operationId: listConfigurations
      parameters:
      - $ref: '#/components/parameters/LimitParam'
      - $ref: '#/components/parameters/OffsetParam'
      responses:
        '200':
          description: List of configurations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfigurationListResponse'
              examples:
                configList:
                  $ref: '#/components/examples/ConfigurationListResponse'
        '500':
          $ref: '#/components/responses/InternalError'
    post:
      tags:
      - Configurations
      summary: Application Research Create a component configuration
      operationId: createConfiguration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ComponentConfiguration'
            examples:
              mlPipeline:
                $ref: '#/components/examples/MLPipelineConfiguration'
              microservices:
                $ref: '#/components/examples/MicroservicesConfiguration'
      responses:
        '201':
          description: Configuration created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ComponentConfiguration'
              examples:
                mlPipeline:
                  $ref: '#/components/examples/MLPipelineConfiguration'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalError'
  /configurations/{id}:
    parameters:
    - $ref: '#/components/parameters/ConfigurationIdParam'
    get:
      tags:
      - Configurations
      summary: Application Research Get a configuration by ID
      operationId: getConfiguration
      responses:
        '200':
          description: Configuration details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ComponentConfiguration'
              examples:
                mlPipeline:
                  $ref: '#/components/examples/MLPipelineConfiguration'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
    delete:
      tags:
      - Configurations
      summary: Application Research Delete a configuration
      operationId: deleteConfiguration
      responses:
        '204':
          description: Configuration deleted
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  examples:
    MLPipelineConfiguration:
      summary: ML Pipeline Configuration
      description: Configuration for ML training and inference components
      value:
        components:
        - name: github.com/ailab.org/model-training-pipeline
          version: 4.2.0
          provider:
            name: ailab
            labels:
            - name: department
              value: research
            - name: cost-center
              value: ml-ops
          labels:
          - name: gpu-required
            value: 'true'
          - name: framework
            value: pytorch
          sources:
          - name: training-scripts
            type: git
            input:
              type: dir
              path: ./ml/training
              compress: true
              excludeFiles:
              - '**/__pycache__/**'
              - '*.pyc'
          resources:
          - name: trainer-image
            type: ociImage
            relation: local
            input:
              type: docker
              path: ./docker/trainer
              repository: gcr.io/ailab/model-trainer
            labels:
            - name: cuda-version
              value: '12.1'
          - name: base-model
            type: ociArtifact
            version: 1.0.0
            relation: external
            access:
              type: ociArtifact
              imageReference: gcr.io/ml-models/bert-base-uncased:v1.0.0
          - name: training-data
            type: dataset
            relation: external
            access:
              type: s3
              region: us-west-2
              bucket: ailab-datasets
              key: nlp/training-v4.2.0.tar.gz
              mediaType: application/x-tar+gzip
          componentReferences:
          - name: data-preprocessing
            componentName: github.com/ailab.org/data-pipeline
            version: 2.1.5
        - name: github.com/ailab.org/inference-service
          version: 3.0.1
          provider: ailab
          labels:
          - name: serving-framework
            value: triton
          resources:
          - name: triton-server
            type: ociImage
            relation: local
            input:
              type: docker
              path: ./docker/triton-custom
              repository: gcr.io/ailab/triton-inference
          - name: model-artifacts
            type: ociBlob
            version: 3.0.1
            relation: local
            access:
              type: ociBlob
              imageReference: gcr.io/ailab/model-artifacts
              digest: sha256:41029839fa6ad57a33a4fe85a9f7c7127d37e42d6947317488b5de4c5dbeb20e
              mediaType: application/x-tar+gzip
              size: 524288000
    ErrorNotFound:
      summary: Not Found Error
      description: Example not found error
      value:
        code: NOT_FOUND
        message: Component 'github.com/acme.org/unknown-component' not found
    ErrorBadRequest:
      summary: Bad Request Error
      description: Example bad request error
      value:
        code: BAD_REQUEST
        message: Invalid component name format
        details:
          field: component.name
          pattern: ^[a-z][-a-z0-9]*([.][a-z][-a-z0-9]*)*[.][a-z]{2,}(/[a-z][-a-z0-9_]*([.][a-z][-a-z0-9_]*)*)+$
    MicroservicesConfiguration:
      summary: Microservices Configuration
      description: Configuration for enterprise microservices
      value:
        components:
        - name: github.com/enterprise.io/order-service
          version: 3.1.0
          provider: enterprise
          labels:
          - name: service-mesh
            value: istio
          - name: tier
            value: critical
          sources:
          - name: service-code
            type: git
            input:
              type: dir
              path: ./services/order-service
              compress: true
              excludeFiles:
              - '*.test.js'
              - node_modules/**
          resources:
          - name: service-image
            type: ociImage
            relation: local
            input:
              type: docker
              path: ./services/order-service
              repository: ghcr.io/enterprise/order-service
          - name: api-spec
            type: openapi
            relation: local
            input:
              type: file
              path: ./api/order-service-v3.yaml
              mediaType: application/yaml
        - name: github.com/enterprise.io/payment-service
          version: 2.8.3
          provider:
            name: enterprise
            labels:
            - name: compliance
              value: pci-dss
          resources:
          - name: payment-processor
            type: ociImage
            relation: local
            input:
              type: dockermulti
              variants:
              - linux/amd64
              - linux/arm64
              repository: ghcr.io/enterprise/payment-service
          - name: stripe-sdk
            type: npmPackage
            relation: external
            version: 14.5.0
            access:
              type: npm
              registry: https://registry.npmjs.org
              package: stripe
              version: 14.5.0
          - name: helm-deployment
            type: helmChart
            relation: local
            input:
              type: helm
              path: ./charts/payment-service
              version: 2.8.3
    ErrorInternal:
      summary: Internal Error
      description: Example internal server error
      value:
        code: INTERNAL_ERROR
        message: An unexpected error occurred
        details:
          requestId: req-xyz789
    ConfigurationListResponse:
      summary: Configuration list
      description: Example list of configurations
      value:
        items:
        - components:
          - name: github.com/ailab.org/model-training-pipeline
            version: 4.2.0
            provider: ailab
        - components:
          - name: github.com/enterprise.io/order-service
            version: 3.1.0
            provider: enterprise
        total: 2
  schemas:
    ComponentName:
      type: string
      description: Fully qualified component name
      maxLength: 255
      pattern: ^[a-z][-a-z0-9]*([.][a-z][-a-z0-9]*)*[.][a-z]{2,}(/[a-z][-a-z0-9_]*([.][a-z][-a-z0-9_]*)*)+$
      examples:
      - github.com/acme.org/web-application
      - github.com/ailab.org/model-training-pipeline
    Resource:
      type: object
      description: Component resource
      required:
      - name
      - type
      properties:
        name:
          $ref: '#/components/schemas/ElementName'
        type:
          type: string
          description: Resource type
          examples:
          - ociImage
          - helmChart
          - json
          - directory
        extraIdentity:
          $ref: '#/components/schemas/IdentityAttribute'
        version:
          $ref: '#/components/schemas/Version'
        relation:
          type: string
          enum:
          - local
          - external
          default: external
        labels:
          $ref: '#/components/schemas/Labels'
        srcRefs:
          type: array
          items:
            $ref: '#/components/schemas/SrcRef'
        access:
          $ref: '#/components/schemas/Access'
        input:
          $ref: '#/components/schemas/Input'
        digest:
          oneOf:
          - type: 'null'
          - $ref: '#/components/schemas/DigestSpec'
    Provider:
      type: object
      description: Component provider information
      required:
      - name
      properties:
        name:
          type: string
          description: Provider name
          examples:
          - acme
          - ailab
          - enterprise
        labels:
          $ref: '#/components/schemas/Labels'
    Source:
      type: object
      description: Component source
      required:
      - name
      - type
      properties:
        name:
          $ref: '#/components/schemas/ElementName'
        type:
          type: string
          description: Source type
          examples:
          - git
          - helmChart
          - yaml
        extraIdentity:
          $ref: '#/components/schemas/IdentityAttribute'
        version:
          $ref: '#/components/schemas/Version'
        labels:
          $ref: '#/components/schemas/Labels'
        access:
          $ref: '#/components/schemas/Access'
        input:
          $ref: '#/components/schemas/Input'
    Labels:
      type: array
      items:
        $ref: '#/components/schemas/Label'
    ConfigurationListResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/ComponentConfiguration'
        total:
          type: integer
    Access:
      type: object
      description: Access specification for resources and sources
      required:
      - type
      properties:
        type:
          type: string
          description: Access type identifier
      discriminator:
        propertyName: type
        mapping:
          localBlob: '#/components/schemas/LocalBlobAccess'
          ociArtifact: '#/components/schemas/OciArtifactAccess'
          ociBlob: '#/components/schemas/OciBlobAccess'
          helm: '#/components/schemas/HelmAccess'
          gitHub: '#/components/schemas/GitHubAccess'
          github: '#/components/schemas/GitHubAccess'
          s3: '#/components/schemas/S3Access'
          npm: '#/components/schemas/NpmAccess'
          wget: '#/components/schemas/WgetAccess'
          http: '#/components/schemas/HttpAccess'
    Error:
      type: object
      description: Error response
      required:
      - code
      - message
      properties:
        code:
          type: string
        message:
          type: string
        details:
          type: object
          additionalProperties: true
    ComponentConfiguration:
      type: object
      description: Configuration for multiple components
      required:
      - components
      properties:
        components:
          type: array
          items:
            $ref: '#/components/schemas/Component'
    SrcRef:
      type: object
      description: Reference to a component-local source
      properties:
        identitySelector:
          $ref: '#/components/schemas/IdentityAttribute'
        labels:
          $ref: '#/components/schemas/Labels'
    RepositoryContext:
      type: object
      description: Repository context for component storage
      required:
      - type
      properties:
        type:
          type: string
          enum:
          - ociRegistry
          - OCIRegistry
        baseUrl:
          type: string
          description: Base URL of the repository
        componentNameMapping:
          type: string
          enum:
          - urlPath
          - sha256-digest
    DigestSpec:
      type: object
      description: Cryptographic digest specification
      required:
      - hashAlgorithm
      - normalisationAlgorithm
      - value
      properties:
        hashAlgorithm:
          type: string
          description: Hash algorithm used
          examples:
          - SHA-256
          - SHA-512
        normalisationAlgorithm:
          type: string
          description: Normalisation algorithm used
          examples:
          - jsonNormalisation/v1
          - ociArtifactDigest/v1
        value:
          type: string
          description: The digest value
    ElementName:
      type: string
      description: Element name for resources and sources
      minLength: 2
      pattern: ^[a-z0-9]([-_+a-z0-9]*[a-z0-9])?$
      examples:
      - frontend-image
      - backend-image
      - helm-chart
    Version:
      type: string
      description: Semantic version string
      pattern: ^[v]?(0|[1-9]\d*)(?:\.(0|[1-9]\d*))?(?:\.(0|[1-9]\d*))?(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
      examples:
      - 1.0.0
      - 2.5.1
      - v1.0.0-beta.1
    Input:
      type: object
      description: Input specification for local resources
      required:
      - type
      properties:
        type:
          type: string
    Label:
      type: object
      description: A label with name-value pair
      required:
      - name
      - value
      properties:
        name:
          type: string
          description: Label name
        value: {}
        version:
          type: string
          pattern: ^v[0-9]+$
        signing:
          type: boolean
          description: Whether this label should be included in signing
        merge:
          $ref: '#/components/schemas/Merge'
    ComponentReference:
      type: object
      description: Reference to another component
      required:
      - name
      - componentName
      - version
      properties:
        name:
          $ref: '#/components/schemas/ElementName'
        componentName:
          $ref: '#/components/schemas/ComponentName'
        version:
          $ref: '#/components/schemas/Version'
        extraIdentity:
          $ref: '#/components/schemas/IdentityAttribute'
        labels:
          $ref: '#/components/schemas/Labels'
        digest:
          oneOf:
          - type: 'null'
          - $ref: '#/components/schemas/DigestSpec'
    IdentityAttribute:
      type: object
      description: Identity attributes for element identification
      additionalProperties:
        type: string
    Merge:
      type: object
      properties:
        algorithm:
          type: string
          pattern: ^[a-z][a-z0-9/_-]+$
        config: {}
    Component:
      type: object
      description: Component definition
      required:
      - name
      - version
      - provider
      properties:
        name:
          $ref: '#/components/schemas/ComponentName'
        version:
          $ref: '#/components/schemas/Version'
        creationTime:
          type:
          - string
          - 'null'
          format: date-time
        repositoryContexts:
          type: array
          items:
            $ref: '#/components/schemas/RepositoryContext'
        provider:
          oneOf:
          - type: string
          - $ref: '#/components/schemas/Provider'
        labels:
          $ref: '#/components/schemas/Labels'
        sources:
          type: array
          items:
            $ref: '#/components/schemas/Source'
        resources:
          type: array
          items:
            $ref: '#/components/schemas/Resource'
        componentReferences:
          type: array
          items:
            $ref: '#/components/schemas/ComponentReference'
  responses:
    BadRequest:
      description: Bad request - invalid input
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            badRequest:
              $ref: '#/components/examples/ErrorBadRequest'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            notFound:
              $ref: '#/components/examples/ErrorNotFound'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            internalError:
              $ref: '#/components/examples/ErrorInternal'
  parameters:
    OffsetParam:
      name: offset
      in: query
      description: Number of items to skip
      schema:
        type: integer
        minimum: 0
        default: 0
    LimitParam:
      name: limit
      in: query
      description: Maximum number of items to return
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
    ConfigurationIdParam:
      name: id
      in: path
      required: true
      description: Configuration ID
      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