GitHub Variables API

The Variables API from GitHub — 9 operation(s) for variables.

Documentation

📖
Documentation
https://docs.github.com/en/rest/apps
📖
Documentation
https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/ https://docs.github.com/en/rest/authentication/authenticating-to-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/codes-of-conduct/codes-of-conduct
📖
Documentation
https://docs.github.com/en/rest/emojis
📖
Documentation
https://docs.github.com/en/rest/gitignore
📖
Documentation
https://docs.github.com/en/rest/apps/installations
📖
Documentation
https://docs.github.com/en/rest/enterprise-admin
📖
Documentation
https://docs.github.com/en/rest/activity/events
📖
Documentation
https://docs.github.com/en/rest/orgs
📖
Documentation
https://docs.github.com/en/rest/rate-limit
📖
Documentation
https://docs.github.com/en/enterprise-cloud@latest/rest/scim
📖
Documentation
https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/teams
📖
Documentation
https://docs.github.com/en/rest/meta/meta
📖
Documentation
https://docs.github.com/en/rest/actions
📖
Documentation
https://docs.github.com/en/rest/branches
📖
Documentation
https://docs.github.com/en/rest/code-scanning
📖
Documentation
https://docs.github.com/en/rest/collaborators
📖
Documentation
https://docs.github.com/en/rest/dependabot
📖
Documentation
https://docs.github.com/en/rest/webhooks
📖
Documentation
https://docs.github.com/en/rest/pulls
📖
Documentation
https://docs.github.com/en/rest/git/tags
📖
Documentation
https://docs.github.com/en/rest/repos/autolinks
📖
Documentation
https://docs.github.com/en/rest/collaborators/invitations

Specifications

Other Resources

OpenAPI Specification

github-variables-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: 1.1.4
  title: GitHub Application About Variables API
  description: 'Use the REST API to retrieve information about GitHub Apps and GitHub App

    installations.'
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  contact:
    name: Support
    url: https://support.github.com/contact?tags=dotcom-rest-api
  x-github-plan: ghes
  x-github-release: 3.9
servers:
- url: '{protocol}://{hostname}/api/v3'
  variables:
    hostname:
      description: Self-hosted Enterprise Server hostname
      default: HOSTNAME
    protocol:
      description: Self-hosted Enterprise Server protocol
      default: http
tags:
- name: Variables
paths:
  /orgs/{org}/actions/variables:
    get:
      summary: GitHub List Organization Variables
      description: 'Lists all organization variables.


        Authenticated users must have collaborator access to a repository to create, update, or read variables.


        OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.'
      tags:
      - Variables
      operationId: listOrganizationVariables
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/variables#list-organization-variables
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/variables-per-page'
      - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                required:
                - total_count
                - variables
                properties:
                  total_count:
                    type: integer
                  variables:
                    type: array
                    items:
                      $ref: '#/components/schemas/organization-actions-variable'
              examples:
                default:
                  $ref: '#/components/examples/organization-actions-variables-paginated'
          headers:
            Link:
              $ref: '#/components/headers/link'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: variables
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: GitHub Create an Organization Variable
      description: 'Creates an organization variable that you can reference in a GitHub Actions workflow.


        Authenticated users must have collaborator access to a repository to create, update, or read variables.


        OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.'
      tags:
      - Variables
      operationId: createAnOrganizationVariable
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/variables#create-an-organization-variable
      parameters:
      - $ref: '#/components/parameters/org'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The name of the variable.
                value:
                  type: string
                  description: The value of the variable.
                visibility:
                  type: string
                  description: The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable.
                  enum:
                  - all
                  - private
                  - selected
                selected_repository_ids:
                  type: array
                  description: An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`.
                  items:
                    type: integer
              required:
              - name
              - value
              - visibility
            examples:
              default:
                value:
                  name: USERNAME
                  value: octocat
                  visibility: selected
                  selected_repository_ids:
                  - 1296269
                  - 1296280
      responses:
        '201':
          description: Response when creating a variable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/empty-object'
              examples:
                default:
                  value: null
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: variables
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/actions/variables/{name}:
    get:
      summary: GitHub Get an Organization Variable
      description: 'Gets a specific variable in an organization.


        The authenticated user must have collaborator access to a repository to create, update, or read variables.


        OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.'
      tags:
      - Variables
      operationId: getAnOrganizationVariable
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/variables#get-an-organization-variable
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/variable-name'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/organization-actions-variable'
              examples:
                default:
                  $ref: '#/components/examples/organization-actions-variable'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: variables
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Update an Organization Variable
      description: 'Updates an organization variable that you can reference in a GitHub Actions workflow.


        Authenticated users must have collaborator access to a repository to create, update, or read variables.


        OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.'
      tags:
      - Variables
      operationId: updateAnOrganizationVariable
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/variables#update-an-organization-variable
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/variable-name'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The name of the variable.
                value:
                  type: string
                  description: The value of the variable.
                visibility:
                  type: string
                  description: The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable.
                  enum:
                  - all
                  - private
                  - selected
                selected_repository_ids:
                  type: array
                  description: An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`.
                  items:
                    type: integer
            examples:
              default:
                value:
                  name: USERNAME
                  value: octocat
                  visibility: selected
                  selected_repository_ids:
                  - 1296269
                  - 1296280
      responses:
        '204':
          description: Response
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: variables
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Delete an Organization Variable
      description: 'Deletes an organization variable using the variable name.


        Authenticated users must have collaborator access to a repository to create, update, or read variables.


        OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.'
      tags:
      - Variables
      operationId: deleteAnOrganizationVariable
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/variables#delete-an-organization-variable
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/variable-name'
      responses:
        '204':
          description: Response
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: variables
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/actions/variables/{name}/repositories:
    get:
      summary: GitHub List Selected Repositories for an Organization Variable
      description: 'Lists all repositories that can access an organization variable

        that is available to selected repositories.


        Authenticated users must have collaborator access to a repository to create, update, or read variables.


        OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.'
      tags:
      - Variables
      operationId: listSelectedRepositoriesForAnOrganizationVariable
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/variables#list-selected-repositories-for-an-organization-variable
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/variable-name'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/per-page'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                required:
                - total_count
                - repositories
                properties:
                  total_count:
                    type: integer
                  repositories:
                    type: array
                    items:
                      $ref: '#/components/schemas/minimal-repository'
              examples:
                default:
                  $ref: '#/components/examples/public-repository-paginated'
        '409':
          description: Response when the visibility of the variable is not set to `selected`
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: variables
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    put:
      summary: GitHub Set Selected Repositories for an Organization Variable
      description: 'Replaces all repositories for an organization variable that is available

        to selected repositories. Organization variables that are available to selected

        repositories have their `visibility` field set to `selected`.


        Authenticated users must have collaborator access to a repository to create, update, or read variables.


        OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.'
      tags:
      - Variables
      operationId: setSelectedRepositoriesForAnOrganizationVariable
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/variables#set-selected-repositories-for-an-organization-variable
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/variable-name'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                selected_repository_ids:
                  type: array
                  description: The IDs of the repositories that can access the organization variable.
                  items:
                    type: integer
              required:
              - selected_repository_ids
            examples:
              default:
                value:
                  selected_repository_ids:
                  - 64780797
      responses:
        '204':
          description: Response
        '409':
          description: Response when the visibility of the variable is not set to `selected`
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: variables
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/actions/variables/{name}/repositories/{repository_id}:
    put:
      summary: GitHub Add Selected Repository to an Organization Variable
      description: 'Adds a repository to an organization variable that is available to selected repositories.

        Organization variables that are available to selected repositories have their `visibility` field set to `selected`.


        Authenticated users must have collaborator access to a repository to create, update, or read secrets.


        OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.'
      tags:
      - Variables
      operationId: addSelectedRepositoryToAnOrganizationVariable
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/variables#add-selected-repository-to-an-organization-variable
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/variable-name'
      - name: repository_id
        in: path
        required: true
        schema:
          type: integer
        example: 42
      responses:
        '204':
          description: Response
        '409':
          description: Response when the visibility of the variable is not set to `selected`
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: variables
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Remove Selected Repository from an Organization Variable
      description: 'Removes a repository from an organization variable that is

        available to selected repositories. Organization variables that are available to

        selected repositories have their `visibility` field set to `selected`.


        Authenticated users must have collaborator access to a repository to create, update, or read variables.


        OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.'
      tags:
      - Variables
      operationId: removeSelectedRepositoryFromAnOrganizationVariable
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/variables#remove-selected-repository-from-an-organization-variable
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/variable-name'
      - name: repository_id
        in: path
        required: true
        schema:
          type: integer
        example: 42
      responses:
        '204':
          description: Response
        '409':
          description: Response when the visibility of the variable is not set to `selected`
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: variables
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/actions/organization-variables:
    get:
      summary: GitHub List Repository Organization Variables
      description: 'Lists all organization variables shared with a repository.


        Authenticated users must have collaborator access to a repository to create, update, or read variables.


        OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.'
      tags:
      - Variables
      operationId: listRepositoryOrganizationVariables
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/variables#list-repository-organization-variables
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/variables-per-page'
      - $ref: '#/components/parameters/page'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                required:
                - total_count
                - variables
                properties:
                  total_count:
                    type: integer
                  variables:
                    type: array
                    items:
                      $ref: '#/components/schemas/actions-variable'
              examples:
                default:
                  $ref: '#/components/examples/actions-variables-paginated'
          headers:
            Link:
              $ref: '#/components/headers/link'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: variables
      x-api-evangelist-certified: '2025-07-16'
      x-api-naftiko-published: '2025-07-25'
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/actions/variables:
    get:
      summary: GitHub List Repository Variables
      description: 'Lists all repository variables.


        Authenticated users must have collaborator access to a repository to create, update, or read variables.


        OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.'
      tags:
      - Variables
      operationId: listRepositoryVariables
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/variables#list-repository-variables
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/variables-per-page'
      - $ref: '#/components/parameters/page'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                required:
                - total_count
                - variables
                properties:
                  total_count:
                    type: integer
                  variables:
                    type: array
                    items:
                      $ref: '#/components/schemas/actions-variable'
              examples:
                default:
                  $ref: '#/components/examples/actions-variables-paginated'
          headers:
            Link:
              $ref: '#/components/headers/link'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: variables
      x-api-evangelist-certified: '2025-07-16'
      x-api-naftiko-published: '2025-07-25'
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: GitHub Create Repository Variable
      description: 'Creates a repository variable that you can reference in a GitHub Actions workflow.


        Authenticated users must have collaborator access to a repository to create, update, or read variables.


        OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.'
      tags:
      - Variables
      operationId: createRepositoryVariable
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/variables#create-a-repository-variable
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The name of the variable.
                value:
                  type: string
                  description: The value of the variable.
              required:
              - name
              - value
            examples:
              default:
                value:
                  name: USERNAME
                  value: octocat
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/empty-object_2'
              examples:
                default:
                  value: {}
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: variables
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/actions/variables/{name}:
    get:
      summary: GitHub Get Repository Variable
      description: 'Gets a specific variable in a repository.


        The authenticated user must have collaborator access to the repository to use this endpoint.


        OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.'
      tags:
      - Variables
      operationId: getRepositoryVariable
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/variables#get-a-repository-variable
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/variable-name'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/actions-variable'
              examples:
                default:
                  $ref: '#/components/examples/actions-variable'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: variables
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Update Repository Variable
      description: 'Updates a repository variable that you can reference in a GitHub Actions workflow.


        Authenticated users must have collaborator access to a repository to create, update, or read variables.


        OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.'
      tags:
      - Variables
      operationId: updateRepositoryVariable
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/variables#update-a-repository-variable
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/variable-name'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The name of the variable.
                value:
                  type: string
                  description: The value of the variable.
            examples:
              default:
                value:
                  name: USERNAME
                  value: octocat
      responses:
        '204':
          description: Response
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: variables
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Delete Repository Variable
      description: 'Deletes a repository variable using the variable name.


        Authenticated users must have collaborator access to a repository to create, update, or read variables.


        OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.'
      tags:
      - Variables
      operationId: deleteRepositoryVariable
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/variables#delete-a-repository-variable
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/variable-name'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '204':
          description: Response
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: variables
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/environments/{environment_name}/variables:
    get:
      summary: GitHub List Environment Variables
      description: 'Lists all environment variables.


        Authenticated users must have collaborator access to a repository to create, update, or read variables.


        OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.'
      tags:
      - Variables
      operationId: listEnvironmentVariables
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/variables#list-environment-variables
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/environment-name'
      - $ref: '#/components/parameters/variables-per-page'
      - $ref: '#/components/parameters/page'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                required:
                - total_count
                - variables
                properties:
                  total_count:
                    type: integer
                  variables:
                    type: array
                    items:
                      $ref: '#/components/schemas/actions-variable'
              examples:
                default:
                  $ref: '#/components/examples/actions-variables-paginated'
          headers:
            Link:
              $ref: '#/components/headers/link'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: vari

# --- truncated at 32 KB (669 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/openapi/github-variables-api-openapi.yml