GitLab CI/CD metric_images API

Operations about metric_images

OpenAPI Specification

gitlab-ci-metric-images-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: GitLab access_requests metric_images API
  version: v4
  description: Operations related to access requests
host: gitlab.com
produces:
- application/json
tags:
- name: metric_images
  description: Operations about metric_images
paths:
  /api/v4/projects/{id}/issues/{issue_iid}/metric_images/authorize:
    post:
      description: Upload a metric image for an incident
      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: issue_iid
        type: integer
        format: int32
        required: true
      responses:
        '201':
          description: Upload a metric image for an incident
      tags:
      - metric_images
      operationId: postApiV4ProjectsIdIssuesIssueIidMetricImagesAuthorize
  /api/v4/projects/{id}/issues/{issue_iid}/metric_images:
    post:
      description: Upload a metric image for an issue
      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: issue_iid
        type: integer
        format: int32
        required: true
      - name: postApiV4ProjectsIdIssuesIssueIidMetricImages
        in: body
        required: true
        schema:
          $ref: '#/definitions/postApiV4ProjectsIdIssuesIssueIidMetricImages'
      responses:
        '201':
          description: Upload a metric image for an issue
          schema:
            $ref: '#/definitions/API_Entities_IssuableMetricImage'
      tags:
      - metric_images
      operationId: postApiV4ProjectsIdIssuesIssueIidMetricImages
    get:
      description: Metric Images for issue
      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: issue_iid
        type: integer
        format: int32
        required: true
      responses:
        '200':
          description: Metric Images for issue
          schema:
            $ref: '#/definitions/API_Entities_IssuableMetricImage'
      tags:
      - metric_images
      operationId: getApiV4ProjectsIdIssuesIssueIidMetricImages
  /api/v4/projects/{id}/issues/{issue_iid}/metric_images/{metric_image_id}:
    put:
      description: Update a metric image for an issue
      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: metric_image_id
        description: The ID of metric image
        type: integer
        format: int32
        required: true
      - in: path
        name: issue_iid
        type: integer
        format: int32
        required: true
      - name: putApiV4ProjectsIdIssuesIssueIidMetricImagesMetricImageId
        in: body
        required: true
        schema:
          $ref: '#/definitions/putApiV4ProjectsIdIssuesIssueIidMetricImagesMetricImageId'
      responses:
        '200':
          description: Update a metric image for an issue
          schema:
            $ref: '#/definitions/API_Entities_IssuableMetricImage'
      tags:
      - metric_images
      operationId: putApiV4ProjectsIdIssuesIssueIidMetricImagesMetricImageId
    delete:
      description: Remove a metric image for an issue
      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: metric_image_id
        description: The ID of metric image
        type: integer
        format: int32
        required: true
      - in: path
        name: issue_iid
        type: integer
        format: int32
        required: true
      responses:
        '200':
          description: Remove a metric image for an issue
          schema:
            $ref: '#/definitions/API_Entities_IssuableMetricImage'
      tags:
      - metric_images
      operationId: deleteApiV4ProjectsIdIssuesIssueIidMetricImagesMetricImageId
definitions:
  API_Entities_IssuableMetricImage:
    type: object
    properties:
      id:
        type: integer
        format: int32
        example: 1
      created_at:
        type: string
        format: date-time
        example: '2022-01-31T15:10:45.080Z'
      filename:
        type: string
        example: image.png
      file_path:
        type: string
        example: /uploads/-/system/issuable_metric_image/file/1/image.png
      url:
        type: string
        example: https://gitlab.example.com/example
      url_text:
        type: string
        example: Example URL
    required:
    - id
    - created_at
    - filename
    - file_path
    - url
    - url_text
    description: API_Entities_IssuableMetricImage model
  putApiV4ProjectsIdIssuesIssueIidMetricImagesMetricImageId:
    type: object
    properties:
      url:
        type: string
        description: The url to view more metric info
      url_text:
        type: string
        description: A description of the image or URL
    description: Update a metric image for an issue
  postApiV4ProjectsIdIssuesIssueIidMetricImages:
    type: object
    properties:
      file:
        type: file
        description: The image file to be uploaded
      url:
        type: string
        description: The url to view more metric info
      url_text:
        type: string
        description: A description of the image or URL
    required:
    - file
    description: Upload a metric image for an issue
securityDefinitions:
  access_token_header:
    type: apiKey
    name: PRIVATE-TOKEN
    in: header
  access_token_query:
    type: apiKey
    name: private_token
    in: query