GitLab CI variables API

Use this API to manage CI/CD variables for a [project](https://docs.gitlab.com/ci/variables/#for-a-project), a [group](https://docs.gitlab.com/ci/variables/#for-a-group), or an [instance](https://docs.gitlab.com/ci/variables/#for-an-instance). Managing project variables requires the Maintainer role for the project. Managing group variables requires the Owner role for the group. Managing instance variables requires administrator access.

Operations 15

GET /api/v4/groups/{id}/variables List all group variables #
POST /api/v4/groups/{id}/variables Create a group variable #
GET /api/v4/groups/{id}/variables/{key} Retrieve details of a group variable #
PUT /api/v4/groups/{id}/variables/{key} Update a group variable #
DELETE /api/v4/groups/{id}/variables/{key} Delete a group variable #
GET /api/v4/projects/{id}/variables List all project variables #
POST /api/v4/projects/{id}/variables Create a variable #
GET /api/v4/projects/{id}/variables/{key} Retrieve a single variable #
PUT /api/v4/projects/{id}/variables/{key} Update a variable #
DELETE /api/v4/projects/{id}/variables/{key} Delete a variable #
GET /api/v4/admin/ci/variables List all instance variables #
POST /api/v4/admin/ci/variables Create instance variable #
GET /api/v4/admin/ci/variables/{key} Retrieve instance variable details #
PUT /api/v4/admin/ci/variables/{key} Update an instance variable #
DELETE /api/v4/admin/ci/variables/{key} Delete instance variable #

Documentation

📖
Documentation
https://docs.gitlab.com/api/openapi/
📖
Documentation
https://docs.gitlab.com/api/issues/
📖
Authentication
https://docs.gitlab.com/api/rest/authentication/
📖
Documentation
https://docs.gitlab.com/api/merge_requests/
📖
Documentation
https://docs.gitlab.com/api/pipelines/
📖
Documentation
https://docs.gitlab.com/api/jobs/
📖
Documentation
https://docs.gitlab.com/api/runners/
📖
Documentation
https://docs.gitlab.com/api/users/
📖
Documentation
https://docs.gitlab.com/api/repositories/
📖
Documentation
https://docs.gitlab.com/api/commits/
📖
Documentation
https://docs.gitlab.com/api/branches/
📖
Documentation
https://docs.gitlab.com/api/tags/
📖
Documentation
https://docs.gitlab.com/api/releases/
📖
Documentation
https://docs.gitlab.com/api/environments/
📖
Documentation
https://docs.gitlab.com/api/deployments/
📖
Documentation
https://docs.gitlab.com/api/pipeline_schedules/
📖
Documentation
https://docs.gitlab.com/api/labels/
📖
Documentation
https://docs.gitlab.com/api/milestones/
📖
Documentation
https://docs.gitlab.com/api/notes/
📖
Documentation
https://docs.gitlab.com/api/snippets/
📖
Documentation
https://docs.gitlab.com/api/packages/
📖
Documentation
https://docs.gitlab.com/api/container_registry/
📖
Documentation
https://docs.gitlab.com/api/vulnerabilities/
📖
Documentation
https://docs.gitlab.com/api/deploy_keys/
📖
Documentation
https://docs.gitlab.com/api/protected_branches/
📖
Documentation
https://docs.gitlab.com/api/wikis/
📖
Documentation
https://docs.gitlab.com/api/events/
📖
Documentation
https://docs.gitlab.com/api/search/
📖
Documentation
https://docs.gitlab.com/api/namespaces/
📖
Documentation
https://docs.gitlab.com/api/groups/
📖
Documentation
https://docs.gitlab.com/api/projects/
📖
Documentation
https://docs.gitlab.com/api/applications/
📖
Documentation
https://docs.gitlab.com/api/avatar/
📖
Documentation
https://docs.gitlab.com/api/broadcast_messages/
📖
Documentation
https://docs.gitlab.com/api/bulk_imports/
📖
Documentation
https://docs.gitlab.com/api/settings/
📖
Documentation
https://docs.gitlab.com/api/metadata/
📖
Documentation
https://docs.gitlab.com/api/version/
📖
Documentation
https://docs.gitlab.com/api/rest/
📖
APIReference
https://docs.gitlab.com/api/api_resources/
📖
RateLimits
https://docs.gitlab.com/security/rate_limits/
📖
Documentation
https://docs.gitlab.com/api/oauth2/
📖
Authentication
https://docs.gitlab.com/integration/oauth_provider/
📖
Documentation
https://docs.gitlab.com/user/project/integrations/webhooks.html
📖
APIReference
https://docs.gitlab.com/api/project_webhooks/

Specifications

Schemas & Data

📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-put-api-v4-application-settings-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-apientities-geo-node-status-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-apientities-geo-site-status-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-apientities-application-setting-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-post-api-v4-geo-status-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-put-api-v4-projects-id-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-api-entities-cluster-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-api-entities-batched-background-migration-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-api-entities-ci-variable-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-api-entities-dictionary-table-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-api-entities-plan-limit-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-api-entities-appearance-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-api-entities-avatar-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-api-entities-bulk-imports-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-api-entities-bulk-import-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-api-entities-metadata-schema.json

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/gitlab:gitlab-ci-variables-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

gitlab-ci-variables-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: GitLab REST CI variables API
  description: GitLab REST API used to interact with a GitLab installation.
  termsOfService: https://handbook.gitlab.com/handbook/legal/api-terms/
  version: '19.6'
  license:
    name: CC BY-SA 4.0
    url: https://gitlab.com/gitlab-org/gitlab/-/blob/master/LICENSE
    x-gitlab-description: The license applies to the OpenAPI specification document itself. For terms governing use of the GitLab API, see the termsOfService field.
servers:
- url: https://{hostname}
  description: GitLab REST API
  variables:
    hostname:
      default: gitlab.com
      description: Your GitLab instance hostname
security:
- http: []
- oauth2: []
- apiKey: []
tags:
- name: CI variables
  description: 'Use this API to manage CI/CD variables for a project,

    a group, or an

    instance.


    Managing project variables requires the Maintainer role for the project.

    Managing group variables requires the Owner role for the group.

    Managing instance variables requires administrator access.'
  x-displayName: CI variables
  externalDocs:
    url: https://docs.gitlab.com/api/project_level_variables/
paths:
  /api/v4/groups/{id}/variables:
    get:
      operationId: getApiV4GroupsIdVariables
      summary: List all group variables
      description: Lists all variables for a specified group. Use the `page` and `per_page` pagination parameters to control the pagination of results.
      tags:
      - CI variables
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIEntitiesCiVariable'
        '404':
          description: Not Found
        '400':
          description: Bad Request
      parameters:
      - name: id
        required: true
        description: ID or URL-encoded path of the group.
        schema:
          type: string
        in: path
      - name: page
        required: false
        description: Page number of results to retrieve.
        schema:
          type: integer
          default: 1
        in: query
        example: 1
      - name: per_page
        required: false
        description: Number of items to list per page.
        schema:
          type: integer
          default: 20
        in: query
        example: 20
    post:
      operationId: postApiV4GroupsIdVariables
      summary: Create a group variable
      description: Creates a group variable.
      tags:
      - CI variables
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIEntitiesCiVariable'
        '400':
          description: 400 Bad Request
        '404':
          description: Not Found
      parameters:
      - name: id
        required: true
        description: ID or URL-encoded path of the group.
        schema:
          type: string
        in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/postApiV4GroupsIdVariablesRequest'
  /api/v4/groups/{id}/variables/{key}:
    get:
      operationId: getApiV4GroupsIdVariablesKey
      summary: Retrieve details of a group variable
      description: Retrieves details of a specified group variable. If there are multiple variables with the same key, use `filter` to select the correct `environment_scope`.
      tags:
      - CI variables
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIEntitiesCiVariable'
        '404':
          description: Group Variable Not Found
        '400':
          description: Bad Request
      parameters:
      - name: id
        required: true
        description: ID or URL-encoded path of the group.
        schema:
          type: string
        in: path
      - name: key
        required: true
        description: Key of the group variable. Must be 255 characters or fewer and contain only `A-Z`, `a-z`, `0-9`, and `_`.
        schema:
          type: string
        in: path
    put:
      operationId: putApiV4GroupsIdVariablesKey
      summary: Update a group variable
      description: Updates a specified group variable. If there are multiple variables with the same key, use `filter` to select the correct `environment_scope`.
      tags:
      - CI variables
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIEntitiesCiVariable'
        '400':
          description: 400 Bad Request
        '404':
          description: Group Variable Not Found
      parameters:
      - name: id
        required: true
        description: ID or URL-encoded path of the group.
        schema:
          type: string
        in: path
      - name: key
        required: true
        description: Key of the group variable. Must be 255 characters or fewer and contain only `A-Z`, `a-z`, `0-9`, and `_`.
        schema:
          type: string
        in: path
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/putApiV4GroupsIdVariablesKeyRequest'
    delete:
      operationId: deleteApiV4GroupsIdVariablesKey
      summary: Delete a group variable
      description: Deletes a specified group variable. If there are multiple variables with the same key, use `filter` to select the correct `environment_scope`.
      tags:
      - CI variables
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIEntitiesCiVariable'
        '404':
          description: Group Variable Not Found
        '400':
          description: Bad Request
      parameters:
      - name: id
        required: true
        description: ID or URL-encoded path of the group.
        schema:
          type: string
        in: path
      - name: key
        required: true
        description: Key of the group variable. Must be 255 characters or fewer and contain only `A-Z`, `a-z`, `0-9`, and `_`.
        schema:
          type: string
        in: path
  /api/v4/projects/{id}/variables:
    get:
      operationId: getApiV4ProjectsIdVariables
      summary: List all project variables
      description: Lists all variables for a project. Use the `page` and `per_page` pagination parameters to control the pagination of results.
      tags:
      - CI variables
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIEntitiesCiVariable'
        '404':
          description: Not Found
        '400':
          description: Bad Request
      parameters:
      - name: id
        required: true
        description: ID or URL-encoded path of the project.
        schema:
          oneOf:
          - type: string
          - type: integer
        in: path
      - name: page
        required: false
        description: Page number of results to retrieve.
        schema:
          type: integer
          default: 1
        in: query
        example: 1
      - name: per_page
        required: false
        description: Number of items to list per page.
        schema:
          type: integer
          default: 20
        in: query
        example: 20
    post:
      operationId: postApiV4ProjectsIdVariables
      summary: Create a variable
      description: 'Creates a variable. If a variable with the same `key` already exists, the variable must have a different `environment_scope`. Otherwise, GitLab returns a message similar to: `VARIABLE_NAME has already been taken`.'
      tags:
      - CI variables
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIEntitiesCiVariable'
        '400':
          description: 400 Bad Request
        '404':
          description: Not Found
      parameters:
      - name: id
        required: true
        description: ID or URL-encoded path of the project.
        schema:
          oneOf:
          - type: string
          - type: integer
        in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/postApiV4ProjectsIdVariablesRequest'
  /api/v4/projects/{id}/variables/{key}:
    get:
      operationId: getApiV4ProjectsIdVariablesKey
      summary: Retrieve a single variable
      description: Retrieves details of a specified variable. If there are multiple variables with the same key, use `filter` to select the correct `environment_scope`.
      tags:
      - CI variables
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIEntitiesCiVariable'
        '404':
          description: Variable Not Found
        '400':
          description: Bad Request
      parameters:
      - name: id
        required: true
        description: ID or URL-encoded path of the project.
        schema:
          oneOf:
          - type: string
          - type: integer
        in: path
      - name: key
        required: true
        description: Key of the project variable. Must be 255 characters or fewer and contain only `A-Z`, `a-z`, `0-9`, and `_`.
        schema:
          type: string
        in: path
      - name: filter
        required: false
        description: Filter results when multiple variables share the same key.
        schema:
          type:
          - object
          - 'null'
        in: query
      - name: filter[environment_scope]
        required: false
        description: Environment scope of the variable.
        schema:
          type:
          - string
          - 'null'
        in: query
    put:
      operationId: putApiV4ProjectsIdVariablesKey
      summary: Update a variable
      description: Updates a project variable. If there are multiple variables with the same key, use `filter` to select the correct `environment_scope`.
      tags:
      - CI variables
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIEntitiesCiVariable'
        '404':
          description: Variable Not Found
        '400':
          description: Bad Request
      parameters:
      - name: id
        required: true
        description: ID or URL-encoded path of the project.
        schema:
          oneOf:
          - type: string
          - type: integer
        in: path
      - name: key
        required: true
        description: Key of the project variable. Must be 255 characters or fewer and contain only `A-Z`, `a-z`, `0-9`, and `_`.
        schema:
          type: string
        in: path
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/putApiV4ProjectsIdVariablesKeyRequest'
    delete:
      operationId: deleteApiV4ProjectsIdVariablesKey
      summary: Delete a variable
      description: Deletes a project variable. If there are multiple variables with the same key, use `filter` to select the correct `environment_scope`.
      tags:
      - CI variables
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIEntitiesCiVariable'
        '404':
          description: Variable Not Found
        '400':
          description: Bad Request
      parameters:
      - name: id
        required: true
        description: ID or URL-encoded path of the project.
        schema:
          oneOf:
          - type: string
          - type: integer
        in: path
      - name: key
        required: true
        description: Key of the project variable. Must be 255 characters or fewer and contain only `A-Z`, `a-z`, `0-9`, and `_`.
        schema:
          type: string
        in: path
      - name: filter
        required: false
        description: Filter results when multiple variables share the same key.
        schema:
          type:
          - object
          - 'null'
        in: query
      - name: filter[environment_scope]
        required: false
        description: Environment scope of the variable.
        schema:
          type:
          - string
          - 'null'
        in: query
  /api/v4/admin/ci/variables:
    get:
      operationId: getApiV4AdminCiVariables
      summary: List all instance variables
      description: Lists all instance-level variables. Use the `page` and `per_page` pagination parameters to control the pagination of results.
      tags:
      - CI variables
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIEntitiesCiVariable'
        '400':
          description: Bad Request
      parameters:
      - name: page
        required: false
        description: Page number of results to retrieve.
        schema:
          type: integer
          default: 1
        in: query
        example: 1
      - name: per_page
        required: false
        description: Number of items to list per page.
        schema:
          type: integer
          default: 20
        in: query
        example: 20
    post:
      operationId: postApiV4AdminCiVariables
      summary: Create instance variable
      description: Creates a instance-level variable. The maximum number of instance-level variables can be changed.
      tags:
      - CI variables
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIEntitiesCiVariable'
        '400':
          description: 400 Bad Request
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/postApiV4AdminCiVariablesRequest'
  /api/v4/admin/ci/variables/{key}:
    get:
      operationId: getApiV4AdminCiVariablesKey
      summary: Retrieve instance variable details
      description: Retrieves details of a specified instance-level variable.
      tags:
      - CI variables
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIEntitiesCiVariable'
        '404':
          description: Instance Variable Not Found
        '400':
          description: Bad Request
      parameters:
      - name: key
        required: true
        description: Key of the instance variable. Must be 255 characters or fewer and contain only `A-Z`, `a-z`, `0-9`, and `_`.
        schema:
          type: string
        in: path
    put:
      operationId: putApiV4AdminCiVariablesKey
      summary: Update an instance variable
      description: Updates a specified instance variable.
      tags:
      - CI variables
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIEntitiesCiVariable'
        '404':
          description: Instance Variable Not Found
        '400':
          description: Bad Request
      parameters:
      - name: key
        required: true
        description: Key of the instance variable. Must be 255 characters or fewer and contain only `A-Z`, `a-z`, `0-9`, and `_`.
        schema:
          type: string
        in: path
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/putApiV4AdminCiVariablesKeyRequest'
    delete:
      operationId: deleteApiV4AdminCiVariablesKey
      summary: Delete instance variable
      description: Deletes a specified instance variable.
      tags:
      - CI variables
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIEntitiesCiVariable'
        '404':
          description: Instance Variable Not Found
        '400':
          description: Bad Request
      parameters:
      - name: key
        required: true
        description: Key of the instance variable. Must be 255 characters or fewer and contain only `A-Z`, `a-z`, `0-9`, and `_`.
        schema:
          type: string
        in: path
components:
  schemas:
    postApiV4ProjectsIdVariablesRequest:
      type: object
      properties:
        key:
          type:
          - string
          - 'null'
          description: Key of the project variable. Must be 255 characters or fewer and contain only `A-Z`, `a-z`, `0-9`, and `_`.
        value:
          type:
          - string
          - 'null'
          description: Value of the variable.
        protected:
          type:
          - boolean
          - 'null'
          description: If `true`, the variable is protected.
        masked:
          type:
          - boolean
          - 'null'
          description: If `true`, the variable is masked.
        masked_and_hidden:
          type:
          - boolean
          - 'null'
          description: If `true`, the variable is masked and hidden. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/29674) in GitLab 17.4.
        raw:
          type:
          - boolean
          - 'null'
          description: If `true`, the variable is treated as a raw string. If `false`, the value is [expanded](https://docs.gitlab.com/ci/variables/#allow-cicd-variable-expansion).
        variable_type:
          type: string
          enum:
          - env_var
          - file
          description: The type of the variable.
          default: env_var
        environment_scope:
          type:
          - string
          - 'null'
          description: Environment scope of the variable. Defaults to `*`.
        description:
          type:
          - string
          - 'null'
          description: Description of the variable. Limited to 255 characters.
      required:
      - key
      - value
    putApiV4GroupsIdVariablesKeyRequest:
      type: object
      properties:
        value:
          type:
          - string
          - 'null'
          description: Value of the variable.
        protected:
          type:
          - boolean
          - 'null'
          description: If `true`, the variable is protected.
        masked:
          type:
          - boolean
          - 'null'
          description: If `true`, the variable is masked.
        raw:
          type:
          - boolean
          - 'null'
          description: If `true`, the variable is treated as a raw string. If `false`, the value is [expanded](https://docs.gitlab.com/ci/variables/#allow-cicd-variable-expansion).
        variable_type:
          type:
          - string
          - 'null'
          enum:
          - env_var
          - file
          - null
          description: 'The type of the variable. Default: env_var'
        environment_scope:
          type:
          - string
          - 'null'
          description: The environment scope of the variable
        description:
          type:
          - string
          - 'null'
          description: Description of the variable. Limited to 255 characters.
    putApiV4AdminCiVariablesKeyRequest:
      type: object
      properties:
        description:
          type:
          - string
          - 'null'
          description: Description of the variable. Limited to 255 characters.
        value:
          type:
          - string
          - 'null'
          description: Value of the variable. Limited to 10,000 characters, or 50,000 characters for `file` variables.
        protected:
          type:
          - boolean
          - 'null'
          description: If `true`, the variable is protected.
        masked:
          type:
          - boolean
          - 'null'
          description: If `true`, the variable is masked.
        raw:
          type:
          - boolean
          - 'null'
          description: If `true`, the variable is treated as a raw string. If `false`, the value is [expanded](https://docs.gitlab.com/ci/variables/#allow-cicd-variable-expansion).
        variable_type:
          type:
          - string
          - 'null'
          enum:
          - env_var
          - file
          - null
          description: 'The type of a variable. Available types are: env_var (default) and file'
    APIEntitiesCiVariable:
      type: object
      properties:
        variable_type:
          type: string
          example: env_var
        key:
          type: string
          example: TEST_VARIABLE_1
        value:
          type: string
          example: TEST_1
        hidden:
          type: boolean
        protected:
          type: boolean
        masked:
          type: boolean
        raw:
          type: boolean
        environment_scope:
          type: string
          example: '*'
        description:
          type: string
          example: This variable is being used for ...
    putApiV4ProjectsIdVariablesKeyRequest:
      type: object
      properties:
        value:
          type:
          - string
          - 'null'
          description: Value of the variable.
        protected:
          type:
          - boolean
          - 'null'
          description: If `true`, the variable is protected.
        masked:
          type:
          - boolean
          - 'null'
          description: If `true`, the variable is masked.
        environment_scope:
          type:
          - string
          - 'null'
          description: Environment scope of the variable.
        raw:
          type:
          - boolean
          - 'null'
          description: If `true`, the variable is treated as a raw string. If `false`, the value is [expanded](https://docs.gitlab.com/ci/variables/#allow-cicd-variable-expansion).
        variable_type:
          type:
          - string
          - 'null'
          enum:
          - env_var
          - file
          - null
          description: 'The type of the variable. Default: env_var'
        filter:
          type:
          - object
          - 'null'
          description: Filter results when multiple variables share the same key.
          properties:
            environment_scope:
              type:
              - string
              - 'null'
              description: Environment scope of the variable.
        description:
          type:
          - string
          - 'null'
          description: Description of the variable. Limited to 255 characters.
    postApiV4GroupsIdVariablesRequest:
      type: object
      properties:
        key:
          type:
          - string
          - 'null'
          description: Key of the group variable. Must be 255 characters or fewer and contain only `A-Z`, `a-z`, `0-9`, and `_`.
        value:
          type:
          - string
          - 'null'
          description: Value of the variable.
        protected:
          type:
          - boolean
          - 'null'
          description: If `true`, the variable is protected.
        masked_and_hidden:
          type:
          - boolean
          - 'null'
          description: If `true`, the variable is masked and hidden.
        masked:
          type:
          - boolean
          - 'null'
          description: If `true`, the variable is masked.
        raw:
          type:
          - boolean
          - 'null'
          description: If `true`, the variable is treated as a raw string. If `false`, the value is [expanded](https://docs.gitlab.com/ci/variables/#allow-cicd-variable-expansion).
        variable_type:
          type: string
          enum:
          - env_var
          - file
          description: The type of the variable.
          default: env_var
        environment_scope:
          type:
          - string
          - 'null'
          description: The environment scope of the variable
        description:
          type:
          - string
          - 'null'
          description: Description of the variable. Limited to 255 characters.
      required:
      - key
      - value
    postApiV4AdminCiVariablesRequest:
      type: object
      properties:
        key:
          type:
          - string
          - 'null'
          description: Key of the instance variable. Must be 255 characters or fewer and contain only `A-Z`, `a-z`, `0-9`, and `_`.
        description:
          type:
          - string
          - 'null'
          description: Description of the variable. Limited to 255 characters.
        value:
          type:
          - string
          - 'null'
          description: Value of the variable. Limited to 10,000 characters, or 50,000 characters for `file` variables.
        protected:
          type:
          - boolean
          - 'null'
          description: If `true`, the variable is protected.
        masked:
          type:
          - boolean
          - 'null'
          description: If `true`, the variable is masked.
        raw:
          type:
          - boolean
          - 'null'
          description: If `true`, the variable is treated as a raw string. If `false`, the value is [expanded](https://docs.gitlab.com/ci/variables/#allow-cicd-variable-expansion).
        variable_type:
          type: string
          enum:
          - env_var
          - file
          description: The type of a variable.
          default: env_var
      required:
      - key
      - value
  securitySchemes:
    http:
      type: http
      scheme: bearer
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://gitlab.com/oauth/authorize
          tokenUrl: https://gitlab.com/oauth/token
          refreshUrl: https://gitlab.com/oauth/token
          scopes:
            api: Grants complete read/write access to the API, including all groups and projects, the container registry, the dependency proxy, and the package registry.
            read_api: Grants read access to the API, including all groups and projects, the container registry, and the package registry.
            read_user: Grants read-only access to your profile through the /user API endpoint, which includes username, public email, and full name. Also grants access to read-only API endpoints under /users.
            create_runner: Grants create access to the runners.
            manage_runner: Grants access to manage the runners.
            k8s_proxy: Grants permission to perform Kubernetes API calls using the agent for Kubernetes.
            self_rotate: Grants permission for token to rotate itself.
            mcp: Grants read-write access to remote Model Context Protocol (MCP) server for tools execution.
            mcp_orbit: Grants access to the Orbit Knowledge Graph MCP server for graph queries and schema retrieval.
    apiKey:
      type: apiKey
      name: PRIVATE-TOKEN
      in: header