GitHub Custom API

The Custom API from GitHub — 7 operation(s) for custom.

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-custom-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: 1.1.4
  title: GitHub Application About Custom 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: Custom
paths:
  /organizations/{organization_id}/custom_roles:
    get:
      summary: GitHub Deprecated - List Custom Repository Roles in an Organization
      description: '**Note**: This operation is deprecated and will be removed in the future.

        Use the "[List custom repository roles](https://docs.github.com/enterprise-server@3.9/rest/orgs/custom-roles#list-custom-repository-roles-in-an-organization)" endpoint instead.


        List the custom repository roles available in this organization. For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-server@3.9/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."


        The authenticated user must be administrator of the organization or of a repository of the organization to use this endpoint.


        OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint.'
      tags:
      - Custom
      operationId: deprecatedListCustomRepositoryRolesInAnOrganization
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/orgs/custom-roles#deprecatedlist-custom-repository-roles-in-an-organization
      parameters:
      - name: organization_id
        description: The unique identifier of the organization.
        in: path
        required: true
        schema:
          type: string
        example: '12345678'
      responses:
        '200':
          description: Response - list of custom role names
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_count:
                    description: The number of custom roles in this organization
                    example: 3
                    type: integer
                  custom_roles:
                    type: array
                    items:
                      $ref: '#/components/schemas/organization-custom-repository-role'
              examples:
                default:
                  $ref: '#/components/examples/organization-custom-repository-role-example'
      x-github:
        githubCloudOnly: true
        enabledForGitHubApps: true
        removalDate: '2025-02-15'
        deprecationDate: '2023-02-15'
        category: orgs
        subcategory: custom-roles
      deprecated: true
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/actions/runners/{runner_id}/labels:
    post:
      summary: GitHub Add Custom Labels to Self-hosted Runner for an Organization
      description: 'Adds custom labels to a self-hosted runner configured in an organization.


        Authenticated users must have admin access to the organization to use this endpoint.


        OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.'
      tags:
      - Custom
      operationId: addCustomLabelsToSelfhostedRunnerForAnOrganization
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/self-hosted-runners#add-custom-labels-to-a-self-hosted-runner-for-an-organization
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/runner-id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - labels
              properties:
                labels:
                  type: array
                  minItems: 1
                  maxItems: 100
                  description: The names of the custom labels to add to the runner.
                  items:
                    type: string
            examples:
              default:
                value:
                  labels:
                  - gpu
                  - accelerated
      responses:
        '200':
          $ref: '#/components/responses/actions_runner_labels'
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/validation_failed_simple'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: self-hosted-runners
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    put:
      summary: GitHub Set Custom Labels for Self-hosted Runner for an Organization
      description: 'Remove all previous custom labels and set the new custom labels for a specific

        self-hosted runner configured in an organization.


        Authenticated users must have admin access to the organization to use this endpoint.


        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:
      - Custom
      operationId: setCustomLabelsForSelfhostedRunnerForAnOrganization
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/self-hosted-runners#set-custom-labels-for-a-self-hosted-runner-for-an-organization
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/runner-id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - labels
              properties:
                labels:
                  type: array
                  minItems: 0
                  maxItems: 100
                  description: The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels.
                  items:
                    type: string
            examples:
              default:
                value:
                  labels:
                  - gpu
                  - accelerated
      responses:
        '200':
          $ref: '#/components/responses/actions_runner_labels'
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/validation_failed_simple'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: self-hosted-runners
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Remove All Custom Labels from Self-hosted Runner for an Organization
      description: 'Remove all custom labels from a self-hosted runner configured in an

        organization. Returns the remaining read-only labels from the runner.


        Authenticated users must have admin access to the organization to use this endpoint.


        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:
      - Custom
      operationId: removeAllCustomLabelsFromSelfhostedRunnerForAnOrganization
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/self-hosted-runners#remove-all-custom-labels-from-a-self-hosted-runner-for-an-organization
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/runner-id'
      responses:
        '200':
          $ref: '#/components/responses/actions_runner_labels_readonly'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: self-hosted-runners
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/actions/runners/{runner_id}/labels/{name}:
    delete:
      summary: GitHub Remove Custom Label from Self-hosted Runner for an Organization
      description: 'Remove a custom label from a self-hosted runner configured

        in an organization. Returns the remaining labels from the runner.


        This endpoint returns a `404 Not Found` status if the custom label is not

        present on the runner.


        Authenticated users must have admin access to the organization to use this endpoint.


        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:
      - Custom
      operationId: removeCustomLabelFromSelfhostedRunnerForAnOrganization
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/self-hosted-runners#remove-a-custom-label-from-a-self-hosted-runner-for-an-organization
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/runner-id'
      - $ref: '#/components/parameters/runner-label-name'
      responses:
        '200':
          $ref: '#/components/responses/actions_runner_labels'
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/validation_failed_simple'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: self-hosted-runners
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/custom-repository-roles:
    get:
      summary: GitHub List Custom Repository Roles in an Organization
      description: 'List the custom repository roles available in this organization. For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-server@3.9/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."


        The authenticated user must be an administrator of the organization or of a repository of the organization to use this endpoint.


        OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint.'
      tags:
      - Custom
      operationId: listCustomRepositoryRolesInAnOrganization
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/orgs/custom-roles#list-custom-repository-roles-in-an-organization
      parameters:
      - $ref: '#/components/parameters/org'
      responses:
        '200':
          description: Response - list of custom role names
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_count:
                    description: The number of custom roles in this organization
                    example: 3
                    type: integer
                  custom_roles:
                    type: array
                    items:
                      $ref: '#/components/schemas/organization-custom-repository-role'
              examples:
                default:
                  $ref: '#/components/examples/organization-custom-repository-role-list-example'
      x-github:
        githubCloudOnly: true
        enabledForGitHubApps: true
        category: orgs
        subcategory: custom-roles
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: GitHub Create Custom Repository Role
      description: 'Creates a custom repository role that can be used by all repositories owned by the organization. For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-server@3.9/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."


        The authenticated user must be an administrator for the organization to use this endpoint.


        OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.'
      tags:
      - Custom
      operationId: createCustomRepositoryRole
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/orgs/custom-roles#create-a-custom-repository-role
      parameters:
      - $ref: '#/components/parameters/org'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/organization-custom-repository-role-create-schema'
            examples:
              default:
                value:
                  name: Labeler
                  description: A role for issue and pull request labelers
                  base_role: read
                  permissions:
                  - add_label
      responses:
        '201':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/organization-custom-repository-role'
              examples:
                default:
                  $ref: '#/components/examples/organization-custom-repository-role-example'
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: true
        enabledForGitHubApps: true
        category: orgs
        subcategory: custom-roles
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /orgs/{org}/custom-repository-roles/{role_id}:
    get:
      summary: GitHub Get Custom Repository Role
      description: 'Gets a custom repository role that is available to all repositories owned by the organization. For more information on custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-server@3.9/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."


        The authenticated user must be an administrator of the organization or of a repository of the organization to use this endpoint.


        OAuth app tokens and personal access tokens (classic) need the `admin:org` or `repo` scope to use this endpoint.'
      tags:
      - Custom
      operationId: getCustomRepositoryRole
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/orgs/custom-roles#get-a-custom-repository-role
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/role-id'
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/organization-custom-repository-role'
              examples:
                default:
                  $ref: '#/components/examples/organization-custom-repository-role-example'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: true
        enabledForGitHubApps: true
        category: orgs
        subcategory: custom-roles
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      summary: GitHub Update Custom Repository Role
      description: 'Updates a custom repository role that can be used by all repositories owned by the organization. For more information about custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-server@3.9/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."


        The authenticated user must be an administrator for the organization to use this endpoint.


        OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.'
      tags:
      - Custom
      operationId: updateCustomRepositoryRole
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/orgs/custom-roles#update-a-custom-repository-role
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/role-id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/organization-custom-repository-role-update-schema'
            examples:
              default:
                value:
                  name: Labeler
                  description: A role for issue and PR labelers
                  base_role: read
                  permissions:
                  - add_label
                  - remove_label
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/organization-custom-repository-role'
              examples:
                default:
                  $ref: '#/components/examples/organization-custom-repository-role-example'
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/validation_failed'
      x-github:
        githubCloudOnly: true
        enabledForGitHubApps: true
        category: orgs
        subcategory: custom-roles
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Delete Custom Repository Role
      description: 'Deletes a custom role from an organization. Once the custom role has been deleted, any

        user, team, or invitation with the deleted custom role will be reassigned the inherited role. For more information about custom repository roles, see "[About custom repository roles](https://docs.github.com/enterprise-server@3.9/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-repository-roles)."


        The authenticated user must be an administrator for the organization to use this endpoint.


        OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.'
      tags:
      - Custom
      operationId: deleteCustomRepositoryRole
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/orgs/custom-roles#delete-a-custom-repository-role
      parameters:
      - $ref: '#/components/parameters/org'
      - $ref: '#/components/parameters/role-id'
      responses:
        '204':
          description: Response
      x-github:
        githubCloudOnly: true
        enabledForGitHubApps: true
        category: orgs
        subcategory: custom-roles
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/actions/runners/{runner_id}/labels:
    post:
      summary: GitHub Add Custom Labels to Self-hosted Runner for Repository
      description: 'Adds custom labels to a self-hosted runner configured in a repository.


        Authenticated users must have admin access to the organization to use this endpoint.


        OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.'
      tags:
      - Custom
      operationId: addCustomLabelsToSelfhostedRunnerForRepository
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/self-hosted-runners#add-custom-labels-to-a-self-hosted-runner-for-a-repository
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/runner-id'
      - 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
              required:
              - labels
              properties:
                labels:
                  type: array
                  minItems: 1
                  maxItems: 100
                  description: The names of the custom labels to add to the runner.
                  items:
                    type: string
            examples:
              default:
                value:
                  labels:
                  - gpu
                  - accelerated
      responses:
        '200':
          $ref: '#/components/responses/actions_runner_labels'
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/validation_failed_simple'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: self-hosted-runners
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    put:
      summary: GitHub Set Custom Labels for Self-hosted Runner for Repository
      description: 'Remove all previous custom labels and set the new custom labels for a specific

        self-hosted runner configured in a repository.


        Authenticated users must have admin 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:
      - Custom
      operationId: setCustomLabelsForSelfhostedRunnerForRepository
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/self-hosted-runners#set-custom-labels-for-a-self-hosted-runner-for-a-repository
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/runner-id'
      - 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
              required:
              - labels
              properties:
                labels:
                  type: array
                  maxItems: 100
                  description: The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels.
                  items:
                    type: string
            examples:
              default:
                value:
                  labels:
                  - gpu
                  - accelerated
      responses:
        '200':
          $ref: '#/components/responses/actions_runner_labels'
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/validation_failed_simple'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: self-hosted-runners
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: GitHub Remove All Custom Labels from Self-hosted Runner for Repository
      description: 'Remove all custom labels from a self-hosted runner configured in a

        repository. Returns the remaining read-only labels from the runner.


        Authenticated users must have admin 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:
      - Custom
      operationId: removeAllCustomLabelsFromSelfhostedRunnerForRepository
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/self-hosted-runners#remove-all-custom-labels-from-a-self-hosted-runner-for-a-repository
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/runner-id'
      - 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':
          $ref: '#/components/responses/actions_runner_labels_readonly'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: self-hosted-runners
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}:
    delete:
      summary: GitHub Remove Custom Label from Self-hosted Runner for Repository
      description: 'Remove a custom label from a self-hosted runner configured

        in a repository. Returns the remaining labels from the runner.


        This endpoint returns a `404 Not Found` status if the custom label is not

        present on the runner.


        Authenticated users must have admin 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:
      - Custom
      operationId: removeCustomLabelFromSelfhostedRunnerForRepository
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/actions/self-hosted-runners#remove-a-custom-label-from-a-self-hosted-runner-for-a-repository
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/runner-id'
      - $ref: '#/components/parameters/runner-label-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':
          $ref: '#/components/responses/actions_runner_labels'
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/validation_failed_simple'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: actions
        subcategory: self-hosted-runners
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  responses:
    not_found:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/basic-error'
    actions_runner_labels:
      description: Response
      content:
        application/json:
          schema:
            type: object
            required:
            - total_count
            - labels
            properties:
              total_count:
                type: integer
              labels:
                type: array
                items:
                  $ref: '#/components/schemas/runner-label'
          examples:
            default:
              $ref: '#/components/examples/runner-labels'
    actions_runner_labels_readonly:
      description: Response
      content:
        application/json:
          schema:
            type: object
            required:
            - total_count
            - labels
            properties:
              total_count:
                type: integer
              labels:
                type: array
                items:
                  $ref: '#/components/schemas/runner-label'
          examples:
            default:
              $ref: '#/components/examples/runner-labels-readonly'
    validation_failed_simple:
      description: Validation failed, or the endpoint has been spammed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/validation-error-simple'
    validation_failed:
      description: Validation failed, or the endpoint has been spammed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/validation-error'
  examples:
    organization-custom-repository-role-example:
      value:
        id: 8030
        name: Security Engineer
        description: Able to contribute code and maintain the security pipeline
        base_role: maintain
        permissions:
        - delete_alerts_code_scanning
        organization:
          login: github
          id: 1
          node_id: MDEyOk9yZ2FuaXphdGlvbjE=
          url: https://api.github.com/orgs/github
          repos_url: https://api.github.com/orgs/github/repos
          events_url: https://api.github.com/orgs/github/events
          hooks_url: https://api.github.com/orgs/github/hooks
          issues_url: https://api.github.com/orgs/github/issues
          members_url: https://api.github.com/orgs/github/members{/member}
          public_members_url: https://api.github.com/orgs/github/public_members{/member}
          avatar_url: https://github.com/images/error/octocat_happy.gif
          description: A great organization
        created_at: '2022-07-04T22:19:11Z'
        updated_at: '2022-07-04T22:20:11Z'
    runner-labels:
      value:
        total_count: 4
        labels:
        - id: 5
          name: self-hosted
          type: read-only
        - id: 7
          name: X64
          type: read-only
        - id: 20
          name: macOS
          type: read-only
        - id: 21
          name: no-gpu
          type: custom
    runner-labels-readonly:
      value:
        total_count: 3
        labels:
        - id: 5
          name: self-hosted
          type: read-only
        - id: 7
          name: X64
          type: read-only
        - id: 20
          name: macOS
          type: read-only
    organization-custom-repository-role-list-example:
      value:
        total_count: 2
        custom_roles:
        - id: 8030
          name: Security Engineer
          description: Able to contribute cod

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