GitLab CI/CD secure_files API

Operations about secure_files

OpenAPI Specification

gitlab-ci-secure-files-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: GitLab access_requests secure_files API
  version: v4
  description: Operations related to access requests
host: gitlab.com
produces:
- application/json
tags:
- name: secure_files
  description: Operations about secure_files
paths:
  /api/v4/projects/{id}/secure_files:
    get:
      description: Get list of secure files in a project
      produces:
      - application/json
      parameters:
      - in: path
        name: id
        description: "The ID or URL-encoded path of the project owned by the\n        authenticated user"
        type: string
        required: true
      - in: query
        name: page
        description: Current page number
        type: integer
        format: int32
        default: 1
        required: false
        example: 1
      - in: query
        name: per_page
        description: Number of items per page
        type: integer
        format: int32
        default: 20
        required: false
        example: 20
      responses:
        '200':
          description: Get list of secure files in a project
          schema:
            $ref: '#/definitions/API_Entities_Ci_SecureFile'
      tags:
      - secure_files
      operationId: getApiV4ProjectsIdSecureFiles
    post:
      description: Create a secure file
      produces:
      - application/json
      consumes:
      - application/json
      parameters:
      - in: path
        name: id
        description: "The ID or URL-encoded path of the project owned by the\n        authenticated user"
        type: string
        required: true
      - name: postApiV4ProjectsIdSecureFiles
        in: body
        required: true
        schema:
          $ref: '#/definitions/postApiV4ProjectsIdSecureFiles'
      responses:
        '201':
          description: Create a secure file
          schema:
            $ref: '#/definitions/API_Entities_Ci_SecureFile'
        '400':
          description: 400 Bad Request
      tags:
      - secure_files
      operationId: postApiV4ProjectsIdSecureFiles
  /api/v4/projects/{id}/secure_files/{secure_file_id}:
    get:
      description: Get the details of a specific secure file in a project
      produces:
      - application/json
      parameters:
      - in: path
        name: id
        description: "The ID or URL-encoded path of the project owned by the\n        authenticated user"
        type: string
        required: true
      - in: path
        name: secure_file_id
        description: The ID of a secure file
        type: integer
        format: int32
        required: true
      responses:
        '200':
          description: Get the details of a specific secure file in a project
          schema:
            $ref: '#/definitions/API_Entities_Ci_SecureFile'
        '404':
          description: 404 Not found
      tags:
      - secure_files
      operationId: getApiV4ProjectsIdSecureFilesSecureFileId
    delete:
      description: Remove a secure file
      produces:
      - application/json
      parameters:
      - in: path
        name: id
        description: "The ID or URL-encoded path of the project owned by the\n        authenticated user"
        type: string
        required: true
      - in: path
        name: secure_file_id
        type: integer
        format: int32
        required: true
      responses:
        '204':
          description: Remove a secure file
        '404':
          description: 404 Not found
      tags:
      - secure_files
      operationId: deleteApiV4ProjectsIdSecureFilesSecureFileId
  /api/v4/projects/{id}/secure_files/{secure_file_id}/download:
    get:
      description: Download secure file
      produces:
      - application/json
      parameters:
      - in: path
        name: id
        description: "The ID or URL-encoded path of the project owned by the\n        authenticated user"
        type: string
        required: true
      - in: path
        name: secure_file_id
        description: The ID of a secure file
        type: integer
        format: int32
        required: true
      responses:
        '200':
          description: Download secure file
        '404':
          description: 404 Not found
      tags:
      - secure_files
      operationId: getApiV4ProjectsIdSecureFilesSecureFileIdDownload
definitions:
  API_Entities_Ci_SecureFile:
    type: object
    properties:
      id:
        type: integer
        format: int32
        example: 123
      name:
        type: string
        example: upload-keystore.jks
      checksum:
        type: string
        example: 16630b189ab34b2e3504f4758e1054d2e478deda510b2b08cc0ef38d12e80aac
      checksum_algorithm:
        type: string
        example: sha256
      created_at:
        type: string
        format: date-time
        example: '2022-02-22T22:22:22.222Z'
      expires_at:
        type: string
        format: date-time
        example: '2023-09-21T14:55:59.000Z'
      metadata:
        type: object
        example:
          id: '75949910542696343243264405377658443914'
      file_extension:
        type: string
        example: jks
    required:
    - id
    - name
    - checksum
    - checksum_algorithm
    - created_at
    - expires_at
    - metadata
    - file_extension
    description: API_Entities_Ci_SecureFile model
  postApiV4ProjectsIdSecureFiles:
    type: object
    properties:
      name:
        type: string
        description: "The name of the file being uploaded. The filename must be unique within\n            the project"
      file:
        type: file
        description: The secure file being uploaded
    required:
    - name
    - file
    description: Create a secure file
securityDefinitions:
  access_token_header:
    type: apiKey
    name: PRIVATE-TOKEN
    in: header
  access_token_query:
    type: apiKey
    name: private_token
    in: query