GitHub Label API

The Label API from GitHub — 1 operation(s) for label.

Documentation

📖
Documentation
https://docs.github.com/en/rest/apps
📖
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-label-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.1.4
  title: github-repo-actions-api Label API
  description: 'Use the REST API to create, manage and control the workflow of public and

    private GitHub repositories.'
  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
servers:
- url: '{protocol}://{hostname}'
  variables:
    hostname:
      description: Self-hosted Enterprise Server hostname
      default: api.github.com
    protocol:
      description: Self-hosted Enterprise Server protocol
      default: https
tags:
- name: Label
paths:
  /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:
      - Label
      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:
    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'
    validation_failed_simple:
      description: Validation failed, or the endpoint has been spammed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/validation-error-simple'
    not_found:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/basic-error'
  parameters:
    runner-label-name:
      name: name
      description: The name of a self-hosted runner's custom label.
      in: path
      required: true
      schema:
        type: string
    owner:
      name: owner
      description: The account owner of the repository. The name is not case sensitive.
      in: path
      required: true
      schema:
        type: string
    runner-id:
      name: runner_id
      description: Unique identifier of the self-hosted runner.
      in: path
      required: true
      schema:
        type: integer
    repo:
      name: repo
      description: The name of the repository without the `.git` extension. The name is not case sensitive.
      in: path
      required: true
      schema:
        type: string
  examples:
    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
  schemas:
    runner-label:
      title: Self hosted runner label
      description: label for a self hosted runner
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier of the label.
          example: 42
        name:
          type: string
          description: Name of the label.
          example: octocat
        type:
          type: string
          description: The type of label. Read-only labels are applied automatically when the runner is configured.
          enum:
          - read-only
          - custom
          example: read-only
      required:
      - name
    validation-error-simple:
      title: Validation Error Simple
      description: Validation Error Simple
      type: object
      required:
      - message
      - documentation_url
      properties:
        message:
          type: string
          example: Example body text
        documentation_url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
        errors:
          type: array
          items:
            type: string
    basic-error:
      title: Basic Error
      description: Basic Error
      type: object
      properties:
        message:
          type: string
          example: Example body text
        documentation_url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
        url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
        status:
          type: string
          example: open
  securitySchemes:
    bearerHttpAuthentication:
      description: Bearer Token
      type: http
      scheme: Bearer
externalDocs:
  description: GitHub Enterprise Developer Docs
  url: https://docs.github.com/enterprise-server@3.9/rest/