openapi: 3.0.3
info:
  title: Container Registry service
  description: |
    ## Overview
    Container Registry service enables IONOS clients to manage docker and OCI
    compliant registries for use by their managed Kubernetes clusters. Use a
    Container Registry to ensure you have a privately accessed registry to
    efficiently support image pulls.
    ## Changelog
    ### 1.1.0
     - Added new endpoints for Repositories
     - Added new endpoints for Artifacts
     - Added new endpoints for Vulnerabilities
     - Added registry vulnerabilityScanning feature
    ### 1.2.0
     - Added registry `apiSubnetAllowList`
    ### 1.2.1
     - Amended `apiSubnetAllowList` Regex
    ### 1.2.2
     - Added support for comma-separated values in `filter.severity` and `filter.vulnerabilitySeverity` parameters
  termsOfService: https://www.ionos.de/terms-gtc/terms-enterprise-cloud/enterprise-terms/
  contact:
    name: IONOS Cloud Support
    email: support@cloud.ionos.com
  version: '1.2.2'
externalDocs:
  description: More documentation
  url: https://docs.ionos.com/cloud/managed-services/container-registry
servers:
  - url: >-
      https://api.ionos.com/containerregistries
    description: Production
tags:
- name: Locations
  description: |
    The physical locations where new container registries can be provisioned
    
    This tag groups all operations for locations.
- name: Names
  description: |
    Name availability checks for new registries
    
    This tag groups all operations for names.
- name: Registries
  description: |
    Manage container registries for storage of docker images and OCI compliant artifacts. This operation is restricted to contract owner, admin, and users with 'accessAndManageRegistries' and Share/Edit access permissions for the data center hosting the registry.
    
    This tag groups all operations for registries.
- name: Tokens
  description: |
    Define access permissions to registry resources
    
    This tag groups all operations for tokens.
- name: Repositories
  description: |
    Repositories contain container images and other artifacts
    
    This tag groups all operations for repositories.
- name: Artifacts
  description: |
    Artifacts are the individual files stored in a repository
    
    This tag groups all operations for artifacts.
- name: Vulnerabilities
  description: |
    Vulnerability detail
    
    This tag groups all operations for vulnerabilities.
paths:
  /locations:
    get:
      tags:
        - Locations
      summary: Get container registry locations
      description: ''
      operationId: locationsGet
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocationsResponse'
      security:
        - basicAuth: []
        - tokenAuth: []
  /names/{name}:
    head:
      tags:
        - Names
      summary: Get container registry name availability
      description: |-
        Validate that the name is suitable to use for a new registry:
        - it uses only the characters "a-z", "0-9", or "-"
        - and starts with a letter and ends with a letter or number
        - and is between 3 to 63 characters in length
        - and is available
      operationId: namesCheckUsage
      parameters:
        - name: name
          in: path
          description: The desired registry name
          required: true
          schema:
            pattern: ^[a-z][-a-z0-9]{1,61}[a-z0-9]$
            type: string
            description: The desired registry name
      responses:
        '200':
          description: OK. The registry name is valid but already in use
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: Not found. The registry name is available and valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
      security:
        - basicAuth: []
        - tokenAuth: []
  /registries:
    get:
      tags:
        - Registries
      summary: List all container registries
      description: List all managed container registries for your account
      operationId: registriesGet
      parameters:
        - name: filter.name
          in: query
          description: The registry name to search for
          schema:
            type: string
            description: The registry name to search for
            example: my-registry
        - name: limit
          in: query
          description: >-
            The maximum number of elements to return (used together with
            pagination.token for pagination)
          schema:
            type: string
            description: >-
              The maximum number of elements to return (used together with
              pagination.token for pagination)
            default: '100'
        - name: pagination.token
          in: query
          description: >-
            An opaque token used to iterate the set of results (used together
            with limit for pagination)
          schema:
            type: string
            description: >-
              An opaque token used to iterate the set of results (used together
              with limit for pagination)
            example: >-
              eyJ2IjoibWV0YS5rOHMuaW8vdjEiLCJydiI6MTYzMjQ0OTk2ODAsInN0YXJ0IjoiM2RmYTc3YjctZGIwNS00MjMwLThmMjAtOGU3NjJlOTUxOTUzXHUwMDAwIn0
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegistriesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
      security:
        - basicAuth: []
        - tokenAuth: []
    post:
      tags:
        - Registries
      summary: Create container registry
      description: |-
        Create a registry to hold container images or OCI compliant artifacts
        - "name" must have passed validation
        - "location" must be one of the available location IDs
        - "garbageCollectionSchedule" time and days of the week for runs
        - "features": "vulnerabilityScanning" default is enabled
      operationId: registriesPost
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostRegistryInput'
        required: true
      responses:
        '201':
          description: >-
            The created container registry is returned with 'metadata.status'
            set to "BUSY".
          headers:
            Location:
              style: simple
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostRegistryOutput'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
      security:
        - basicAuth: []
        - tokenAuth: []
  /registries/{registryId}:
    delete:
      tags:
        - Registries
      summary: Delete registry
      description: ''
      operationId: registriesDelete
      parameters:
        - name: registryId
          in: path
          description: The unique ID of the registry
          required: true
          schema:
            pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
            type: string
            format: uuid
            description: The unique ID of the registry
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
      security:
        - basicAuth: []
        - tokenAuth: []
    get:
      tags:
        - Registries
      summary: Get a registry
      description: Get all information for a specific container registry
      operationId: registriesFindById
      parameters:
        - name: registryId
          in: path
          description: The unique ID of the registry
          required: true
          schema:
            pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
            type: string
            format: uuid
            description: The unique ID of the registry
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegistryResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
      security:
        - basicAuth: []
        - tokenAuth: []
    patch:
      tags:
        - Registries
      summary: Update the properties of a registry
      description: |-
        Update the properties of a registry
        - "garbageCollectionSchedule" time and days of the week for runs
      operationId: registriesPatch
      parameters:
        - name: registryId
          in: path
          description: The unique ID of the registry
          required: true
          schema:
            pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
            type: string
            format: uuid
            description: The unique ID of the registry
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchRegistryInput'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegistryResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
      security:
        - basicAuth: []
        - tokenAuth: []
    put:
      tags:
        - Registries
      summary: Create or replace a container registry
      description: |
        Create/replace a registry to hold container images or OCI compliant
        artifacts
        **On create**
        - "name" must have passed validation
        - "location" must be one of the available location IDs
        **On update**
        - "name" cannot be changed
        - "location" cannot be changed
        **On create or update**
        - "garbageCollectionSchedule": time and days of the week for runs
      operationId: registriesPut
      parameters:
        - name: registryId
          in: path
          description: The unique ID of the registry
          required: true
          schema:
            pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
            type: string
            format: uuid
            description: The unique ID of the registry
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PutRegistryInput'
        required: true
      responses:
        '201':
          description: >-
            The created container registry is returned with 'metadata.status'
            set to "BUSY".
          headers:
            Location:
              style: simple
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PutRegistryOutput'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
      security:
        - basicAuth: []
        - tokenAuth: []
  /registries/{registryId}/artifacts:
    get:
      operationId: registriesArtifactsGet
      summary: Retrieve all Artifacts by Registry 
      security:
      - tokenAuth: []
      description: |
        This endpoint enables retrieving all Artifacts using
        pagination and optional filters.
      parameters:
        - name: registryId
          in: path
          schema:
            type: string
            format: uuid
          example: "1e41a73c-59d0-5507-86dd-fa2fc2501cfd"
          required: true
          description: The ID (UUID) of the Registry.
        - $ref: "#/components/parameters/paginationOffset"
        - $ref: "#/components/parameters/paginationLimit"
        - $ref: "#/components/parameters/vulnerabilityId"
        - name: orderBy
          in: query
          description: The field to order the results by. If not provided, the results will be ordered by the default field.
          schema:
            type: string
            default: -pullCount
            enum:
              - -pullCount
              - -pushCount
              - -lastPush
              - -lastPull
              - -lastScan
              - -vulnTotalCount
              - -vulnFixableCount
              - pullCount
              - pushCount
              - lastPush
              - lastPull
              - lastScan
              - vulnTotalCount
              - vulnFixableCount
      tags:
        - Artifacts
      responses:
        "200":
          description: |
            Returned all requested Artifacts successfully.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RegistryArtifactsReadList"
        "400":
          $ref: '#/components/responses/BadRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/NotAllowed'
        "429":
          $ref: '#/components/responses/TooManyRequests'
        "500":
          $ref: '#/components/responses/InternalError'
        "503":
          $ref: '#/components/responses/ServiceUnavailable'
        default:
          $ref: '#/components/responses/UnexpectedError'
  /registries/{registryId}/repositories:
    get:
      operationId: registriesRepositoriesGet
      summary: Retrieve all Repositories
      security:
      - tokenAuth: []
      description: |
        This endpoint enables retrieving all Repositories using
        pagination and optional filters.
      parameters:
        - name: registryId
          in: path
          schema:
            type: string
            format: uuid
          example: "1e41a73c-59d0-5507-86dd-fa2fc2501cfd"
          required: true
          description: The ID (UUID) of the Registry.
        - $ref: "#/components/parameters/paginationOffset"
        - $ref: "#/components/parameters/paginationLimit"
        - $ref: "#/components/parameters/name"
        - $ref: "#/components/parameters/vulnerabilitySeverity"
        - name: orderBy
          in: query
          description: The field to order the results by. If not provided, the results will be ordered by the default field.
          schema:
            type: string
            default: -lastPush
            enum:
              - -lastPush
              - -lastPull
              - -artifactCount
              - -pullCount
              - -pushCount
              - name
              - lastPush
              - lastPull
              - artifactCount
              - pullCount
              - pushCount
      tags:
        - Repositories
      responses:
        "200":
          description: |
            Returned all requested Repositories successfully.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RepositoryReadList"
        "400":
          $ref: '#/components/responses/BadRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/NotAllowed'
        "429":
          $ref: '#/components/responses/TooManyRequests'
        "500":
          $ref: '#/components/responses/InternalError'
        "503":
          $ref: '#/components/responses/ServiceUnavailable'
        default:
          $ref: '#/components/responses/UnexpectedError'
  /registries/{registryId}/repositories/{repositoryName}:
    get:
      operationId: registriesRepositoriesFindByName
      summary: Retrieve Repository
      security:
      - tokenAuth: []
      tags:
        - Repositories
      description: Returns the Repository by Name.
      parameters:
        - name: registryId
          in: path
          schema:
            type: string
            format: uuid
          example: "1e41a73c-59d0-5507-86dd-fa2fc2501cfd"
          required: true
          description: The ID (UUID) of the Registry.
        - name: repositoryName
          in: path
          schema:
            type: string
            maxLength: 256
          example: "my-service"
          required: true
          description: The Name of the Repository.
      responses:
        "200":
          description: Getting Repository was successful.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RepositoryRead"
        "400":
          $ref: '#/components/responses/BadRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/NotAllowed'
        "404":
          $ref: '#/components/responses/NotFound'
        "429":
          $ref: '#/components/responses/TooManyRequests'
        "500":
          $ref: '#/components/responses/InternalError'
        "503":
          $ref: '#/components/responses/ServiceUnavailable'
        default:
          $ref: '#/components/responses/UnexpectedError'
    delete:
      tags:
        - Repositories
      summary: Delete repository
      description: "Delete all repository contents\n\n\t\tThe registry V2 API allows manifests and blobs to be deleted individually but it is not possible to remove an entire repository.\n\t\tThis operation is provided for convenience"
      operationId: registriesRepositoriesDelete
      parameters:
        - name: registryId
          in: path
          description: The unique ID of the registry
          required: true
          schema:
            pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
            type: string
            format: uuid
            description: The unique ID of the registry
        - name: repositoryName
          in: path
          description: The name of the repository
          required: true
          schema:
            pattern: ^[a-z0-9]+(?:[._-][a-z0-9]+)*$
            type: string
            description: The name of the repository
            example: my-service
      responses:
        '204':
          description: No Content
      security:
        - basicAuth: []
        - tokenAuth: []
  /registries/{registryId}/repositories/{repositoryName}/artifacts:
    get:
      operationId: registriesRepositoriesArtifactsGet
      summary: Retrieve all Artifacts by Repository 
      security:
      - tokenAuth: []
      description: |
        This endpoint enables retrieving all Artifacts using
        pagination and optional filters.
      parameters:
        - name: registryId
          in: path
          schema:
            type: string
            format: uuid
          example: "1e41a73c-59d0-5507-86dd-fa2fc2501cfd"
          required: true
          description: The ID (UUID) of the Registry.
        - name: repositoryName
          in: path
          schema:
            type: string
            maxLength: 256
          example: "my-service"
          required: true
          description: The Name of the Repository.
        - $ref: "#/components/parameters/paginationOffset"
        - $ref: "#/components/parameters/paginationLimit"
        - name: orderBy
          in: query
          description: The field to order the results by. If not provided, the results will be ordered by the default field.
          schema:
            type: string
            default: -lastPush
            enum:
              - -lastPush
              - -lastPull
              - -lastScan
              - -pullCount
              - -pushCount
              - -vulnMaxSeverity
              - -vulnTotalScore
              - -vulnTotalCount
              - -vulnFixableCount
              - lastPush
              - lastPull
              - lastScan
              - pullCount
              - pushCount
              - vulnMaxSeverity
              - vulnTotalScore
              - vulnTotalCount
              - vulnFixableCount
      tags:
        - Artifacts
      responses:
        "200":
          description: |
            Returned all requested Artifacts successfully.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ArtifactReadList"
        "400":
          $ref: '#/components/responses/BadRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/NotAllowed'
        "429":
          $ref: '#/components/responses/TooManyRequests'
        "500":
          $ref: '#/components/responses/InternalError'
        "503":
          $ref: '#/components/responses/ServiceUnavailable'
        default:
          $ref: '#/components/responses/UnexpectedError'
  /registries/{registryId}/repositories/{repositoryName}/artifacts/{digest}:
    get:
      operationId: registriesRepositoriesArtifactsFindByDigest
      summary: Retrieve Artifact
      security:
      - tokenAuth: []
      tags:
        - Artifacts
      description: Returns the Artifact by Digest.
      parameters:
        - name: registryId
          in: path
          schema:
            type: string
            format: uuid
          example: "1e41a73c-59d0-5507-86dd-fa2fc2501cfd"
          required: true
          description: The ID (UUID) of the Registry.
        - name: repositoryName
          in: path
          schema:
            type: string
            maxLength: 256
          example: "my-service"
          required: true
          description: The Name of the Repository.
        - name: digest
          in: path
          schema:
            type: string
            maxLength: 128
          example: "sha256:12345678901234567890123456789012"
          required: true
          description: The Digest of the Artifact.
      responses:
        "200":
          description: Getting Artifact was successful.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ArtifactRead"
        "400":
          $ref: '#/components/responses/BadRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/NotAllowed'
        "404":
          $ref: '#/components/responses/NotFound'
        "429":
          $ref: '#/components/responses/TooManyRequests'
        "500":
          $ref: '#/components/responses/InternalError'
        "503":
          $ref: '#/components/responses/ServiceUnavailable'
        default:
          $ref: '#/components/responses/UnexpectedError'
  /registries/{registryId}/repositories/{repositoryName}/artifacts/{digest}/vulnerabilities:
    get:
      operationId: registriesRepositoriesArtifactsVulnerabilitiesGet
      summary: Retrieve all Vulnerabilities
      security:
      - tokenAuth: []
      description: |
        This endpoint enables retrieving all Vulnerabilities using
        pagination and optional filters.
      parameters:
        - name: registryId
          in: path
          schema:
            type: string
            format: uuid
          example: "1e41a73c-59d0-5507-86dd-fa2fc2501cfd"
          required: true
          description: The ID (UUID) of the Registry.
        - name: repositoryName
          in: path
          schema:
            type: string
            maxLength: 256
          example: "my-service"
          required: true
          description: The Name of the Repository.
        - name: digest
          in: path
          schema:
            type: string
            maxLength: 128
          example: "sha256:12345678901234567890123456789012"
          required: true
          description: The Digest of the Artifact.
        - $ref: "#/components/parameters/paginationOffset"
        - $ref: "#/components/parameters/paginationLimit"
        - $ref: "#/components/parameters/severity"
        - $ref: "#/components/parameters/fixable"
        - name: orderBy
          in: query
          description: The field to order the results by. If not provided, the results will be ordered by the default field.
          schema:
            type: string
            default: -score
            enum:
              - -score
              - -severity
              - -publishedAt
              - -updatedAt
              - -fixable
              - score
              - severity
              - publishedAt
              - updatedAt
              - fixable
      tags:
        - Artifacts
      responses:
        "200":
          description: |
            Returned all requested Vulnerabilities successfully.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ArtifactVulnerabilityReadList"
        "400":
          $ref: '#/components/responses/BadRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/NotAllowed'
        "429":
          $ref: '#/components/responses/TooManyRequests'
        "500":
          $ref: '#/components/responses/InternalError'
        "503":
          $ref: '#/components/responses/ServiceUnavailable'
        default:
          $ref: '#/components/responses/UnexpectedError'
  /registries/{registryId}/tokens:
    get:
      tags:
        - Tokens
      summary: List all tokens for the container registry
      description: ''
      operationId: registriesTokensGet
      parameters:
        - name: offset
          in: query
          description: >-
            The first element (from the complete list of the elements) to
            include in the response (used together with limit for pagination)
          schema:
            type: string
            description: >-
              The first element (from the complete list of the elements) to
              include in the response (used together with limit for pagination)
            default: '0'
        - name: limit
          in: query
          description: >-
            The maximum number of elements to return (used together with offset
            for pagination)
          schema:
            type: string
            description: >-
              The maximum number of elements to return (used together with
              offset for pagination)
            default: '100'
        - name: registryId
          in: path
          description: The unique ID of the registry
          required: true
          schema:
            pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
            type: string
            format: uuid
            description: The unique ID of the registry
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokensResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
      security:
        - basicAuth: []
        - tokenAuth: []
    post:
      tags:
        - Tokens
      summary: Create token
      description: |-
        Create a token
        - password is only available once in the POST response
      operationId: registriesTokensPost
      parameters:
        - name: registryId
          in: path
          description: The unique ID of the registry
          required: true
          schema:
            pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
            type: string
            format: uuid
            description: The unique ID of the registry
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostTokenInput'
        required: true
      responses:
        '201':
          description: Created
          headers:
            Location:
              style: simple
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostTokenOutput'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
      security:
        - basicAuth: []
        - tokenAuth: []
  /registries/{registryId}/tokens/{tokenId}:
    delete:
      tags:
        - Tokens
      summary: Delete token
      description: ''
      operationId: registriesTokensDelete
      parameters:
        - name: registryId
          in: path
          description: The unique ID of the registry
          required: true
          schema:
            pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
            type: string
            format: uuid
            description: The unique ID of the registry
        - name: tokenId
          in: path
          description: The unique ID of the token
          required: true
          schema:
            pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
            type: string
            format: uuid
            description: The unique ID of the token
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
      security:
        - basicAuth: []
        - tokenAuth: []
    get:
      tags:
        - Tokens
      summary: Get token information
      description: >-
        Gets all information for a specific token used to access a container
        registry
      operationId: registriesTokensFindById
      parameters:
        - name: registryId
          in: path
          description: The unique ID of the registry
          required: true
          schema:
            pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
            type: string
            format: uuid
            description: The unique ID of the registry
        - name: tokenId
          in: path
          description: The unique ID of the token
          required: true
          schema:
            pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
            type: string
            format: uuid
            description: The unique ID of the token
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
      security:
        - basicAuth: []
        - tokenAuth: []
    patch:
      tags:
        - Tokens
      summary: Update token
      description: |-
        Update token properties, for example:
        - change status to 'enabled' or 'disabled'
        - change expiry date
      operationId: registriesTokensPatch
      parameters:
        - name: registryId
          in: path
          description: The unique ID of the registry
          required: true
          schema:
            pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
            type: string
            format: uuid
            description: The unique ID of the registry
        - name: tokenId
          in: path
          description: The unique ID of the token
          required: true
          schema:
            pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
            type: string
            format: uuid
            description: The unique ID of the token
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchTokenInput'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
      security:
        - basicAuth: []
        - tokenAuth: []
    put:
      tags:
        - Tokens
      summary: Create or replace token
      description: |-
        Create/replace a token
        - password is only available once in the create response
        - "name" cannot be changed
      operationId: registriesTokensPut
      parameters:
        - name: registryId
          in: path
          description: The unique ID of the registry
          required: true
          schema:
            pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
            type: string
            format: uuid
            description: The unique ID of the registry
        - name: tokenId
          in: path
          description: The unique ID of the token
          required: true
          schema:
            pattern: ^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$
            type: string
            description: The unique ID of the token
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PutTokenInput'
        required: true
      responses:
        '201':
          description: Created
          headers:
            Location:
              style: simple
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PutTokenOutput'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
      security:
        - basicAuth: []
        - tokenAuth: []
  /vulnerabilities/{vulnerabilityId}:
    get:
      operationId: vulnerabilitiesFindByID
      summary: Retrieve Vulnerability
      security:
      - tokenAuth: []
      tags:
        - Vulnerabilities
      description: Returns the Vulnerability by ID.
      parameters:
        - name: vulnerabilityId
          in: path
          schema:
            type: string
            maxLength: 64
          example: "CVE-2019-1234"
          required: true
          description: The ID of the Vulnerability.
      responses:
        "200":
          description: Getting Vulnerability was successful.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/VulnerabilityRead"
        "400":
          $ref: '#/components/responses/BadRequest'
        "401":
          $ref: '#/components/responses/Unauthorized'
        "403":
          $ref: '#/components/responses/NotAllowed'
        "404":
          $ref: '#/components/responses/NotFound'
        "429":
          $ref: '#/components/responses/TooManyRequests'
        "500":
          $ref: '#/components/responses/InternalError'
        "503":
          $ref: '#/components/responses/ServiceUnavailable'
        default:
          $ref: '#/components/responses/UnexpectedError'
components:
  parameters:
    paginationOffset:
      name: offset
      in: query
      description: The first element (of the total list of elements) to include in the response. Use this parameter together with the limit for pagination.
      required: false
      schema:
        type: integer
        format: int32
        default: 0
        minimum: 0
      example: 0
    paginationLimit:
      name: limit
      in: query
      description: The maximum number of elements to return. Use this parameter together with the offset for pagination.
      required: false
      schema:
        type: integer
        format: int32
        default: 100
        minimum: 1
        maximum: 1000
      example: 100
    fixable:
      name: "filter.fixable"
      in: query
      description: Filter resources by fixable (i.e. remediation action is available)
      required: false
      schema:
        type: boolean
    name:
      name: "filter.name"
      in: query
      description: Filter resources by name.
      required: false
      schema:
        type: string
    severity:
      name: "filter.severity"
      in: query
      description: Filter resources by vulnerability severity. Supports comma-separated values (e.g., "medium,high,critical").
      required: false
      schema:
        $ref: '#/components/schemas/VulnerabilitySeverity'
    vulnerabilityId:
      x-go-name: VulnerabilityIdParameter
      name: "filter.vulnerabilityId"
      in: query
      description: Filter resources by vulnerabilityId.
      required: false
      schema:
        type: string
    vulnerabilitySeverity:
      name: "filter.vulnerabilitySeverity"
      in: query
      description: Filter resources by vulnerability severity. Supports comma-separated values (e.g., "medium,high,critical").
      required: false
      schema:
        $ref: '#/components/schemas/VulnerabilitySeverity'
  responses:
    BadRequest:
      description: |
        ### Bad Request
        The request send to the API was malformed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: |
        ### Unauthorized
        The request is missing authorization information or the authorization information provided are expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotAllowed:
      description: |
        ### Not Allowed
        The user issuing the request does not have the needed permissions.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: |
        ### Conflict
        The UUID is already taken by another party, follow the guides to generate UUIDs uniquely.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ConflictDependencies:
      description: |
        ### ConflictDependencies
        The resource has dependencies and cannot be deleted. Follow the guidelines to delete the dependencies first.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: |
        ### Not Found
        The resource that was requested could not be found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnexpectedError:
      description: |
        ### Unexpected Internal Server Error
        An unexpected internal error occurred. We apologize for the inconvenience!
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnprocessableEntity:
      description: |
        ### Unprocessable Entity
        The request was well-formed but was unable to be followed due to semantic errors.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: |
        ### Too Many Requests
        The user has sent too many requests in a given amount of time.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnsupportedMediaType:
      description: |
        ### Unsupported Media Type
        The request has an unsupported media type.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: |
        ### Internal Server Error
        An internal error occurred. We apologize for the inconvenience!
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServiceUnavailable:
      description: |
        ### Service Unavailable
        The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      description: |
        The Error object is used to represent an error response from the API.
      type: object
      properties:
        httpStatus:
          type: integer
          description: The HTTP status code of the operation.
          example: 400
        messages:
          type: array
          description: |
            A list of error messages.
          items:
            type: object
            properties:
              errorCode:
                type: string
                description: |
                  Application internal error code
                example: "err-1234"
              message:
                type: string
                description: |
                  A human readable explanation specific to this occurrence of the
                  problem.
                example: "Error message example"
    ApiErrorMessage:
      required:
        - errorCode
        - message
      type: object
      properties:
        errorCode:
          type: string
          example: '123'
        message:
          type: string
    ApiErrorResponse:
      required:
        - httpStatus
        - messages
      type: object
      properties:
        httpStatus:
          type: integer
          example: 400
        messages:
          type: array
          items:
            $ref: '#/components/schemas/ApiErrorMessage'
          nullable: true
    ApiResourceMetadata:
      title: Metadata
      required:
        - createdBy
        - createdByUserId
        - createdDate
        - state
      type: object
      properties:
        createdBy:
          type: string
        createdByUserId:
          type: string
        createdDate:
          type: string
          format: date-time
        lastModifiedBy:
          type: string
        lastModifiedByUserId:
          type: string
        lastModifiedDate:
          type: string
          format: date-time
          nullable: true
        state:
          type: string
      nullable: true
    Credentials:
      required:
        - username
        - password
      type: object
      properties:
        password:
          type: string
          example: ''
        username:
          type: string
          example: push-token
      nullable: true
    Day:
      enum:
        - Monday
        - Tuesday
        - Wednesday
        - Thursday
        - Friday
        - Saturday
        - Sunday
      type: string
    Digest:
      type: string
      example: sha256:12345678901234567890123456789012
      description: The digest of the artifact
    Feature:
      type: object
      description: "An optional registry feature"
      required:
        - enabled
      properties:
        enabled:
          type: boolean
          default: true
        properties:
          type: object
    FeatureVulnerabilityScanning:
      description: "Vulnerability scanning for images.  __Note__: this is a paid add-on"
      allOf:
        - $ref: '#/components/schemas/Feature'
    Location:
      type: object
      properties:
        id:
          type: string
          example: de/txl
    LocationsResponse:
      type: object
      properties:
        href:
          type: string
        id:
          type: string
        items:
          type: array
          items:
            $ref: '#/components/schemas/Location'
          nullable: true
        type:
          type: string
    RegistryPagination:
      required:
        - limit
        - token
      type: object
      properties:
        limit:
          type: integer
          description: >-
            The maximum number of elements to return (used together with
            pagination.token for pagination)
        token:
          type: string
          description: >-
            An opaque token used to iterate the set of results (used together
            with limit for pagination)
          example: >-
            eyJ2IjoibWV0YS5rOHMuaW8vdjEiLCJydiI6MTYzMjQ0OTk2ODAsInN0YXJ0IjoiM2RmYTc3YjctZGIwNS00MjMwLThmMjAtOGU3NjJlOTUxOTUzXHUwMDAwIn0
    PaginationLinks:
      required:
        - next
        - self
        - previous
      type: object
      properties:
        next:
          type: string
        previous:
          type: string
        self:
          type: string
    PatchRegistryInput:
      type: object
      properties:
        garbageCollectionSchedule:
          $ref: '#/components/schemas/WeeklySchedule'
        features:
          $ref: '#/components/schemas/RegistryFeatures'
        apiSubnetAllowList:
          $ref: '#/components/schemas/APISubnetAllowList'
    PatchTokenInput:
      type: object
      properties:
        expiryDate:
          type: string
          format: date-time
          nullable: true
        scopes:
          type: array
          items:
            $ref: '#/components/schemas/Scope'
          nullable: true
        status:
          enum:
            - enabled
            - disabled
          type: string
    PostRegistryInput:
      required:
        - properties
      type: object
      properties:
        properties:
          $ref: '#/components/schemas/PostRegistryProperties'
    PostRegistryOutput:
      required:
        - metadata
        - properties
      type: object
      properties:
        href:
          type: string
        id:
          type: string
          format: uuid
        metadata:
          $ref: '#/components/schemas/ApiResourceMetadata'
        properties:
          $ref: '#/components/schemas/RegistryProperties'
        type:
          type: string
    PostRegistryProperties:
      required:
        - name
        - location
      type: object
      properties:
        garbageCollectionSchedule:
          $ref: '#/components/schemas/WeeklySchedule'
        location:
          type: string
          example: de/txl
        name:
          pattern: ^[a-z][-a-z0-9]{1,61}[a-z0-9]$
          type: string
          example: my-registry
        features:
          $ref: '#/components/schemas/RegistryFeatures'
        apiSubnetAllowList:
          $ref: '#/components/schemas/APISubnetAllowList'
    PostTokenInput:
      required:
        - properties
      type: object
      properties:
        properties:
          $ref: '#/components/schemas/PostTokenProperties'
    PostTokenOutput:
      required:
        - metadata
        - properties
      type: object
      properties:
        href:
          type: string
        id:
          type: string
          format: uuid
        metadata:
          $ref: '#/components/schemas/ApiResourceMetadata'
        properties:
          $ref: '#/components/schemas/TokenProperties'
        type:
          type: string
    PostTokenProperties:
      required:
        - name
      type: object
      properties:
        expiryDate:
          type: string
          format: date-time
          nullable: true
        name:
          minLength: 1
          pattern: ^[A-Za-z][-A-Za-z0-9]{0,61}[A-Za-z0-9]$
          type: string
          example: push-token
        scopes:
          type: array
          items:
            $ref: '#/components/schemas/Scope'
          nullable: true
        status:
          enum:
            - enabled
            - disabled
          type: string
    PutRegistryInput:
      required:
        - properties
      type: object
      properties:
        properties:
          $ref: '#/components/schemas/PostRegistryProperties'
    PutRegistryOutput:
      required:
        - metadata
        - properties
      type: object
      properties:
        href:
          type: string
        id:
          type: string
          format: uuid
        metadata:
          $ref: '#/components/schemas/ApiResourceMetadata'
        properties:
          $ref: '#/components/schemas/RegistryProperties'
        type:
          type: string
    PutTokenInput:
      required:
        - properties
      type: object
      properties:
        properties:
          $ref: '#/components/schemas/PostTokenProperties'
    PutTokenOutput:
      required:
        - metadata
        - properties
      type: object
      properties:
        href:
          type: string
        id:
          type: string
          format: uuid
        metadata:
          $ref: '#/components/schemas/ApiResourceMetadata'
        properties:
          $ref: '#/components/schemas/TokenProperties'
        type:
          type: string
    RegistryFeatures:
      type: object
      properties:
        vulnerabilityScanning:
          $ref: '#/components/schemas/FeatureVulnerabilityScanning'
      description: "Optional registry features.  __Note__: some may incur additional charges - see individual feature descriptions for details"
    RegistryArtifactsReadList:
      required:
        - id
        - type
        - href
        - offset
        - limit
        - _links
      type: object
      properties:
        id:
          type: string
          enum:
          - artifacts
        type:
          type: string
          enum:
          - collection
        href:
          type: string
          example: https://api.ionos.com/containerregistries/registries/artifacts
        items:
          type: array
          items:
            $ref: '#/components/schemas/ArtifactRead'
        offset:
          $ref: '#/components/schemas/Offset'
        limit:
          $ref: '#/components/schemas/Limit'
        _links:
          $ref: '#/components/schemas/Links'
    RegistriesResponse:
      required:
        - pagination
        - _links
      type: object
      properties:
        _links:
          $ref: '#/components/schemas/PaginationLinks'
        href:
          type: string
        id:
          type: string
        items:
          type: array
          items:
            $ref: '#/components/schemas/RegistryResponse'
          nullable: true
        pagination:
          $ref: '#/components/schemas/RegistryPagination'
        type:
          type: string
    RegistryProperties:
      required:
        - name
        - location
      type: object
      properties:
        garbageCollectionSchedule:
          $ref: '#/components/schemas/WeeklySchedule'
        hostname:
          type: string
          example: my-registry.cr.ionos.com
        location:
          type: string
          example: de/txl
        name:
          pattern: ^[a-z][-a-z0-9]{1,61}[a-z0-9]$
          type: string
          example: my-registry
        storageUsage:
          $ref: '#/components/schemas/StorageUsage'
        features:
          $ref: '#/components/schemas/RegistryFeatures'
        apiSubnetAllowList:
          $ref: '#/components/schemas/APISubnetAllowList'
      nullable: true
    RegistryResponse:
      required:
        - metadata
        - properties
      type: object
      properties:
        href:
          type: string
        id:
          type: string
          format: uuid
        metadata:
          $ref: '#/components/schemas/ApiResourceMetadata'
        properties:
          $ref: '#/components/schemas/RegistryProperties'
        type:
          type: string
    RepositoryReadList:
      required:
      - id
      - type
      - href
      - offset
      - limit
      - _links
      type: object
      properties:
        id:
          type: string
          enum:
          - repositories
        type:
          type: string
          enum:
          - collection
        href:
          type: string
          example: https://api.ionos.com/containerregistries/registries/f39c94e6-e84b-4d25-b54f-75e4289be43c/repositories
        items:
          type: array
          items:
            $ref: '#/components/schemas/RepositoryRead'
        offset:
          $ref: '#/components/schemas/Offset'
        limit:
          $ref: '#/components/schemas/Limit'
        _links:
          $ref: '#/components/schemas/Links'
    RepositoryRead:
      required:
        - id
        - type
        - href
        - metadata
        - properties
      type: object
      properties:
        id:
          type: string
          example: my-service
        type:
          type: string
          enum:
          - repository
        href:
          type: string
          example: https://api.ionos.com/containerregistries/registries/f39c94e6-e84b-4d25-b54f-75e4289be43c/repositories/my-service
        metadata:
          $ref: '#/components/schemas/RepositoryMetadata'
        properties:
          $ref: '#/components/schemas/Repository'
    RepositoryMetadata:
      allOf:
        - $ref: '#/components/schemas/Metadata'
        - required:
            - artifactCount
            - pullCount
            - pushCount
          type: object
          properties:
            artifactCount:
              type: integer
              format: int64
              example: 125
            pullCount:
              type: integer
              format: int64
              example: 4200
            pushCount:
              type: integer
              format: int64
              example: 200
            lastPulledAt:
              type: string
              format: date-time
            lastPushedAt:
              type: string
              format: date-time
            lastSeverity:
              description: The maximum vulnerability severity of the artifact last pushed in the repository, if any
              allOf:
              - $ref: '#/components/schemas/VulnerabilitySeverity'
    Repository:
      required:
        - name
      type: object
      properties:
        name:
          type: string
          example: my-service
    Artifact:
      required:
        - repositoryName
        - digest
        - mediaType
      type: object
      properties:
        repositoryName:
          type: string
          example: my-service
        digest:
          $ref: '#/components/schemas/Digest'
        tags:
          $ref: '#/components/schemas/Tags'
        mediaType:
            type: string
            example: application/vnd.oci.image.manifest.v1+json
            description: The media type of the artifact
    ArtifactMetadata:
      allOf:
        - $ref: '#/components/schemas/Metadata'
        - required:
            - lastPushedAt
            - pushCount
            - pullCount
          type: object
          properties:
            lastPushedAt:
              type: string
              format: date-time
              description: The date and time the artifact was last pushed
            lastPulledAt:
              type: string
              format: date-time
              description: The date and time the artifact was last pulled
            lastScannedAt:
              type: string
              format: date-time
              description: The date and time the artifact was last scanned
            pushCount:
              type: integer
              format: int64
              description: The number of times the artifact was pushed
              example: 1
            pullCount:
              type: integer
              format: int64
              description: The number of times the artifact was pulled
              example: 42
            vulnMaxSeverity:
              description: The maximum vulnerability severity of the artifact, if any
              allOf:
                - $ref: '#/components/schemas/VulnerabilitySeverity'
            vulnTotalScore:
              type: number
              format: float
              description: The total CVSS score of all vulnerabilities of the artifact
              example: 9.8
            vulnTotalCount:
              type: integer
              format: int64
              description: The total number of vulnerabilities of the artifact
              example: 20
            vulnFixableCount:
              type: integer
              format: int64
              description: The number of fixable vulnerabilities of the artifact
              example: 10
    ArtifactReadList:
      required:
        - id
        - type
        - href
        - offset
        - limit
        - _links
      type: object
      properties:
        id:
          type: string
          enum:
          - artifacts
        type:
          type: string
          enum:
          - collection
        href:
          type: string
          example: https://api.ionos.com/containerregistries/registries/f39c94e6-e84b-4d25-b54f-75e4289be43c/repositories/my-service/artifacts
        items:
          type: array
          items:
            $ref: '#/components/schemas/ArtifactRead'
        offset:
          $ref: '#/components/schemas/Offset'
        limit:
          $ref: '#/components/schemas/Limit'
        _links:
          $ref: '#/components/schemas/Links'
    ArtifactRead:
      required:
        - id
        - type
        - href
        - metadata
        - properties
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Digest'
        type:
          type: string
          enum:
          - artifact
        href:
          type: string
          example: https://api.ionos.com/containerregistries/registries/f39c94e6-e84b-4d25-b54f-75e4289be43c/repositories/my-service/artifacts/sha256:12345678901234567890123456789012
        metadata:
          $ref: '#/components/schemas/ArtifactMetadata'
        properties:
          $ref: '#/components/schemas/Artifact'
    Purl:
      required:
        - type
        - name
        - version
      type: object
      properties:
        type:
          type: string
          example: maven
          description: The affected package type
        name:
          type: string
          example: org.apache.commons:commons-lang3
          description: The affected package name
        version:
          type: string
          example: 3.8.1
          description: The affected package version
    VulnerabilityId:
      type: string
      description: The ID of the vulnerability allocated by the advisory database
      example: CVE-2019-1234
    Vulnerability:
      required:
        - description
        - dataSource
        - fixable
        - severity
        - score
        - affects
      type: object
      properties:
        description:
          type: string
          description: A description of the vulnerability as provided by the source.
          example: >-
            A vulnerability in the web UI of Cisco IOS XE Software could allow
            an authenticated, remote attacker to execute commands on the
            underlying Linux shell of an affected device with root privileges.
        recommendations:
          type: string
          description: >-
            Recommendations for the vulnerability as provided by the source.
          example: >-
            Cisco has released software updates that address this vulnerability.
            There are no workarounds that address this vulnerability.
        dataSource:
          type: object
          description: The source that published the vulnerability.
          properties:
            id:
              type: string
              description: The id of the source.
              example: osv
            url:
              type: string
              description: The URL of the source.
              example: >-
                https://github.com/pypa/advisory-db
        fixable:
          type: boolean
          description: >-
            Indicates whether the vulnerability can be fixed by updating the
            affected package.
          example: true
        affects:
          type: array
          items:
            $ref: '#/components/schemas/Purl'
        references:
          type: array
          description: Published advisories of the vulnerability if provided.
          items:
            type: string
            description: Location where the advisory can be obtained.
            example: >-
              https://access.redhat.com/security/cve/CVE-2019-1234
        severity:
          $ref: '#/components/schemas/VulnerabilitySeverity'
        score:
          type: number
          format: float
          description: The CVSS score of the vulnerability
          example: 9.8
    VulnerabilityMetadata:
      required:
        - publishedAt
      type: object
      properties:
        publishedAt:
          type: string
          format: date-time
          description: The date and time the vulnerability was published
          example: '2019-01-01T00:00:00+00:00'
        updatedAt:
          type: string
          format: date-time
          description: The date and time the vulnerability was last updated
          example: '2019-01-01T00:00:00+00:00'
    VulnerabilityRead:
      required:
        - id
        - type
        - href
        - metadata
        - properties
      type: object
      properties:
        id:
          $ref: '#/components/schemas/VulnerabilityId'
        type:
          type: string
          enum:
          - vulnerability
        href:
          type: string
          example: https://api.ionos.com/containerregistries/vulnerabilities/CVE-2019-1234
        metadata:
          $ref: '#/components/schemas/VulnerabilityMetadata'
        properties:
          $ref: '#/components/schemas/Vulnerability'
    ArtifactVulnerabilityReadList:
      required:
        - id
        - type
        - href
        - offset
        - limit
        - _links
      type: object
      properties:
        id:
          type: string
          enum:
          - vulnerabilities
        type:
          type: string
          enum:
          - collection
        href:
          type: string
          example: https://api.ionos.com/containerregistries/registries/f39c94e6-e84b-4d25-b54f-75e4289be43c/repositories/my-service/artifacts/sha256:12345678901234567890123456789012/vulnerabilities
        items:
          type: array
          items:
            $ref: '#/components/schemas/VulnerabilityRead'
        offset:
          $ref: '#/components/schemas/Offset'
        limit:
          $ref: '#/components/schemas/Limit'
        _links:
          $ref: '#/components/schemas/Links'
    VulnerabilityReadList:
      required:
        - id
        - type
        - href
        - offset
        - limit
        - _links
      type: object
      properties:
        id:
          type: string
          enum:
          - vulnerabilities
        type:
          type: string
          enum:
          - collection
        href:
          type: string
          example: https://api.ionos.com/containerregistries/registries/f39c94e6-e84b-4d25-b54f-75e4289be43c/vulnerabilities
        items:
          type: array
          items:
            $ref: '#/components/schemas/VulnerabilityRead'
        offset:
          $ref: '#/components/schemas/Offset'
        limit:
          $ref: '#/components/schemas/Limit'
        _links:
          $ref: '#/components/schemas/Links'
    Scope:
      required:
        - actions
        - name
        - type
      type: object
      properties:
        actions:
          type: array
          items:
            type: string
          nullable: true
          example: ["pull", "push", "delete"]
        name:
          type: string
          example: '*'
        type:
          type: string
          example: repository
    StorageUsage:
      required:
        - bytes
      type: object
      properties:
        bytes:
          type: integer
          nullable: true
          format: int64
        updatedAt:
          type: string
          format: date-time
          nullable: true
      nullable: true
    Tags:
      type: array
      items:
        type: string
      description: The tags of an artifact
      example: ["latest", "1.0.0"]
    TokenProperties:
      required:
        - name
        - credentials
      type: object
      properties:
        credentials:
          $ref: '#/components/schemas/Credentials'
        expiryDate:
          type: string
          format: date-time
          nullable: true
        name:
          minLength: 1
          pattern: ^[A-Za-z][-A-Za-z0-9]{0,61}[A-Za-z0-9]$
          type: string
          example: push-token
        scopes:
          type: array
          items:
            $ref: '#/components/schemas/Scope'
          nullable: true
        status:
          enum:
            - enabled
            - disabled
          type: string
      nullable: true
    TokenResponse:
      required:
        - metadata
        - properties
      type: object
      properties:
        href:
          type: string
        id:
          type: string
          format: uuid
        metadata:
          $ref: '#/components/schemas/ApiResourceMetadata'
        properties:
          $ref: '#/components/schemas/TokenProperties'
        type:
          type: string
    TokensResponse:
      required:
        - limit
        - offset
        - count
        - total
        - _links
      type: object
      properties:
        _links:
          $ref: '#/components/schemas/PaginationLinks'
        count:
          type: integer
        href:
          type: string
        id:
          type: string
        items:
          type: array
          items:
            $ref: '#/components/schemas/TokenResponse'
          nullable: true
        limit:
          type: integer
        offset:
          type: integer
        total:
          type: integer
        type:
          type: string
    VulnerabilitySeverity:
      type: string
      description: The CVSS vulnerability severity rating
      example: high
      x-extensible-enum:
      - unknown
      - none
      - info
      - low
      - medium
      - high
      - critical
    WeeklySchedule:
      required:
        - days
        - time
      type: object
      properties:
        days:
          type: array
          items:
            $ref: '#/components/schemas/Day'
          nullable: true
        time:
          type: string
          description: UTC time of day e.g. 01:00:00 - as defined by partial-time - RFC3339
          format: time
          example: 01:23:00+00:00
      nullable: true
    APISubnetAllowList:
      type: array
      description: |
        Subnets and IPs that are allowed to access the registry API, supports IPv4 and IPv6.
        Maximum of 25 items may be specified.
        If no CIDR is given /32 and /128 are assumed for IPv4 and IPv6 respectively.
        0.0.0.0/0 can be used to deny all traffic.
        __Note__: If this list is empty or not set, there are no restrictions.
      items:
        type: string
        pattern: "(^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))(/([0-9]|[1-2][0-9]|3[0-2]))?$)|(^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))(/([0-9]|[0-9][0-9]|1[0-1][0-9]|12[0-8]))?$)"
        # Add more examples once openapi is updated to 3.1
        example: 123.123.123.0/24
      minItems: 0
      maxItems: 25
      nullable: true
    Pagination:
      required:
      - offset
      - limit
      - _links
      description: |
        Pagination information. The offset and limit parameters are used to
        navigate the list of elements. The _links object contains URLs to
        navigate the different pages.
      type: object
      properties:
        offset:
          $ref: '#/components/schemas/Offset'
        limit:
          $ref: '#/components/schemas/Limit'
        _links:
          $ref: '#/components/schemas/Links'
    Offset:
      description: |
        The offset specified in the request (if none was specified, the default
        offset is 0).
      type: integer
      example: 0
      minimum: 0
      readOnly: true
    Limit:
      description: |
        The limit specified in the request (if none was specified, use the
        endpoint's default pagination limit).
      type: integer
      example: 42
      minimum: 0
      readOnly: true
    Links:
      description: |
        URLs to navigate the different pages. As of now we always only return a
        single page.
      type: object
      properties:
        prev:
          description: |
            URL (with offset and limit parameters) of the previous page; only
            present if offset is greater than 0.
          type: string
          format: uri
          example: http://PREVIOUS-PAGE-URI
          readOnly: true
        self:
          description: |
            URL (with offset and limit parameters) of the current page.
          type: string
          format: uri
          example: http://THIS-PAGE-URI
          readOnly: true
        next:
          description: |
            URL (with offset and limit parameters) of the next page; only
            present if offset + limit is less than the total number of elements.
          type: string
          format: uri
          example: http://NEXT-PAGE-URI
          readOnly: true
    Metadata:
      type: object
      description: Metadata of the resource.
      properties:
        createdDate:
          type: string
          format: date-time
          description: The ISO 8601 creation timestamp.
          example: "2020-12-10T13:37:50+01:00"
          readOnly: true
        createdBy:
          type: string
          description: Unique name of the identity that created the resource.
          example: "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3"
          readOnly: true
        createdByUserId:
          type: string
          description: Unique id of the identity that created the resource.
          example: 87f9a82e-b28d-49ed-9d04-fba2c0459cd3
          readOnly: true
        lastModifiedDate:
          type: string
          format: date-time
          description: The ISO 8601 modified timestamp.
          example: "2020-12-11T13:37:50+01:00"
          readOnly: true
        lastModifiedBy:
          type: string
          description: Unique name of the identity that last modified the resource.
          example: "ionos:identity:::users/87f9a82e-b28d-49ed-9d04-fba2c0459cd3"
          readOnly: true
        lastModifiedByUserId:
          type: string
          description: Unique id of the identity that last modified the resource.
          example: 87f9a82e-b28d-49ed-9d04-fba2c0459cd3
          readOnly: true
        resourceURN:
          type: string
          description: Unique name of the resource.
          example: "ionos:<product>:<location>:<contract>:<resource-path>"
          readOnly: true
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        You will need to base64 encode the string containing your credentials.
        Separate your username and password with a colon, i.e.,
        username:password and send it as 'Authorization' request header. More
        details: https://en.wikipedia.org/wiki/Basic_access_authentication
    tokenAuth:
      type: apiKey
      name: Authorization
      in: header
      description: >-
        Please provide header value as 'Bearer' and don't forget to add
        'Bearer' HTTP Authorization Scheme before the token        
