GitLab CI/CD ml_model_registry API

Operations related to Model registry

OpenAPI Specification

gitlab-ci-ml-model-registry-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: GitLab access_requests ml_model_registry API
  version: v4
  description: Operations related to access requests
host: gitlab.com
produces:
- application/json
tags:
- name: ml_model_registry
  description: Operations related to Model registry
paths:
  /api/v4/projects/{id}/packages/ml_models/{model_version_id}/files/(*path/){file_name}/authorize:
    put:
      summary: Workhorse authorize model package file
      description: Introduced in GitLab 16.8
      produces:
      - application/json
      consumes:
      - application/json
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        type: string
        required: true
      - in: path
        name: file_name
        description: File name
        type: string
        required: true
      - in: path
        name: model_version_id
        description: Model version id
        type: string
        required: true
      - name: putApiV4ProjectsIdPackagesMlModelsModelVersionIdFiles(*path)FileNameAuthorize
        in: body
        required: true
        schema:
          $ref: '#/definitions/putApiV4ProjectsIdPackagesMlModelsModelVersionIdFiles(*path)FileNameAuthorize'
      responses:
        '200':
          description: Workhorse authorize model package file
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      tags:
      - ml_model_registry
      operationId: putApiV4ProjectsIdPackagesMlModelsModelVersionIdFiles(*path)FileNameAuthorize
  /api/v4/projects/{id}/packages/ml_models/{model_version_id}/files/(*path/){file_name}:
    put:
      summary: Workhorse upload model package file
      description: Introduced in GitLab 16.8
      produces:
      - application/json
      consumes:
      - application/json
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        type: string
        required: true
      - in: path
        name: file_name
        description: File name
        type: string
        required: true
      - in: path
        name: model_version_id
        description: Model version id
        type: string
        required: true
      - name: putApiV4ProjectsIdPackagesMlModelsModelVersionIdFiles(*path)FileName
        in: body
        required: true
        schema:
          $ref: '#/definitions/putApiV4ProjectsIdPackagesMlModelsModelVersionIdFiles(*path)FileName'
      responses:
        '201':
          description: Workhorse upload model package file
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      tags:
      - ml_model_registry
      operationId: putApiV4ProjectsIdPackagesMlModelsModelVersionIdFiles(*path)FileName
    get:
      summary: Download an ml_model package file
      description: This feature was introduced in GitLab 16.8
      produces:
      - application/json
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        type: string
        required: true
      - in: path
        name: file_name
        description: File name
        type: string
        required: true
      - in: query
        name: path
        description: File directory path
        type: string
        required: false
      - in: query
        name: status
        description: Package status
        type: string
        enum:
        - default
        - hidden
        required: false
      - in: path
        name: model_version_id
        description: Model version id
        type: string
        required: true
      responses:
        '200':
          description: Download an ml_model package file
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      tags:
      - ml_model_registry
      operationId: getApiV4ProjectsIdPackagesMlModelsModelVersionIdFiles(*path)FileName
definitions:
  putApiV4ProjectsIdPackagesMlModelsModelVersionIdFiles(*path)FileName:
    type: object
    properties:
      path:
        type: string
        description: File directory path
      status:
        type: string
        description: Package status
        enum:
        - default
        - hidden
      file:
        type: file
        description: The package file to be published (generated by Multipart middleware)
    required:
    - file
    description: Workhorse upload model package file
  putApiV4ProjectsIdPackagesMlModelsModelVersionIdFiles(*path)FileNameAuthorize:
    type: object
    properties:
      path:
        type: string
        description: File directory path
      status:
        type: string
        description: Package status
        enum:
        - default
        - hidden
    description: Workhorse authorize model package file
securityDefinitions:
  access_token_header:
    type: apiKey
    name: PRIVATE-TOKEN
    in: header
  access_token_query:
    type: apiKey
    name: private_token
    in: query