GitHub Settings API

The Settings API from GitHub — 2 operation(s) for settings.

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-settings-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Github Settings API
  version: 1.1.4
  contact:
    name: Support
    url: https://support.github.com/contact?tags=dotcom-rest-api
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  description: 'Operations tagged Settings across 2 of this provider''s published API definitions: github-auth-api-openapi.yml, github-setup-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: '{protocol}://{hostname}/api/v3'
  variables:
    hostname:
      description: Self-hosted Enterprise Server hostname
      default: api.github.com
    protocol:
      description: Self-hosted Enterprise Server protocol
      default: https
tags:
- name: Settings
paths:
  /setup/api/settings/authorized-keys:
    get:
      summary: GitHub Get All Authorized Ssh Keys
      description: The GET endpoint at /setup/api/settings/authorized-keys in the GitHub Authorization API retrieves a complete list of all authorized SSH keys that have been configured for the system. This endpoint is typically used during setup or administrative operations to audit and review which SSH public keys have been granted access to the GitHub instance, allowing administrators to manage and verify authorized access points for secure shell connections.
      operationId: getAllAuthorizedSshKeys
      tags:
      - Settings
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/management-console#get-all-authorized-ssh-keys
      servers:
      - url: '{protocol}://{hostname}'
        variables:
          hostname:
            default: HOSTNAME
            description: Self-hosted Enterprise Server hostname
          protocol:
            default: http
            description: Self-hosted Enterprise Server protocol
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ssh-key'
              examples:
                default:
                  $ref: '#/components/examples/ssh-key-items'
        '401':
          description: Unauthorized
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: management-console
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    servers:
    - url: '{protocol}://{hostname}/api/v3'
      variables:
        hostname:
          description: Self-hosted Enterprise Server hostname
          default: api.github.com
        protocol:
          description: Self-hosted Enterprise Server protocol
          default: https
  /setup/api/settings:
    get:
      summary: GitHub Get Settings
      description: 'Gets the settings for your instance. To change settings, see the [Set settings endpoint](https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/management-console#set-settings).


        **Note:** You cannot retrieve the management console password with the Enterprise administration API.'
      operationId: getSettings
      tags:
      - Settings
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/management-console#get-settings
      servers:
      - url: '{protocol}://{hostname}'
        variables:
          hostname:
            default: HOSTNAME
            description: Self-hosted Enterprise Server hostname
          protocol:
            default: http
            description: Self-hosted Enterprise Server protocol
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/enterprise-settings'
              examples:
                default:
                  $ref: '#/components/examples/enterprise-settings'
        '401':
          description: Unauthorized
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: management-console
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    put:
      summary: GitHub Set Settings
      description: 'Applies settings on your instance. For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/management-console#get-settings).


        **Notes:**


        - The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode).

        - You cannot set the management console password with the Enterprise administration API. Use the `ghe-set-password` utility to change the management console password. For more information, see "[Command-line utilities](https://docs.github.com/enterprise-server@3.9/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-set-password)."'
      operationId: setSettings
      tags:
      - Settings
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/management-console#set-settings
      servers:
      - url: '{protocol}://{hostname}'
        variables:
          hostname:
            default: HOSTNAME
            description: Self-hosted Enterprise Server hostname
          protocol:
            default: http
            description: Self-hosted Enterprise Server protocol
      responses:
        '204':
          description: Response
        '401':
          description: Unauthorized
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                settings:
                  type: string
                  description: A JSON string with the new settings. Note that you only need to pass the specific settings you want to modify. For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.9/rest/enterprise-admin/management-console#get-settings).
              required:
              - settings
            examples:
              '204':
                value:
                  settings: '{ "enterprise": { "public_pages": true }}'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        category: enterprise-admin
        subcategory: management-console
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    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
components:
  examples:
    ssh-key-items:
      value:
      - key: ssh-rsa AAAAB3NzaC1yc2EAAAAB...
        pretty-print: ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64
      - key: ssh-rsa AAAAB3NzaC1yc2EAAAAB...
        pretty-print: ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64
      - key: ssh-rsa AAAAB3NzaC1yc2EAAAAB...
        pretty-print: ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64
    enterprise-settings:
      value:
        enterprise:
          private_mode: false
          public_pages: false
          subdomain_isolation: true
          signup_enabled: false
          github_hostname: ghe.local
          identicons_host: dotcom
          http_proxy: null
          auth_mode: default
          expire_sessions: false
          admin_password: null
          configuration_id: 1401777404
          configuration_run_count: 4
          avatar:
            enabled: false
            uri: ''
          customer:
            name: GitHub
            email: stannis@themannis.biz
            uuid: af6cac80-e4e1-012e-d822-1231380e52e9
            secret_key_data: '--BEGIN PGP PRIVATE KEY BLOCK--

              Version: GnuPG v1.4.10 (GNU/Linux)


              lQcYBE5TCgsBEACk4yHpUcapplebaumBMXYMiLF+nCQ0lxpx...

              --END PGP PRIVATE KEY BLOCK--

              '
            public_key_data: '--BEGIN PGP PUBLIC KEY BLOCK--

              Version: GnuPG v1.4.10 (GNU/Linux)


              mI0ETqzZYgEEALSe6snowdenXyqvLfSQ34HWD6C7....

              --END PGP PUBLIC KEY BLOCK--

              '
          license:
            seats: 0
            evaluation: false
            perpetual: false
            unlimited_seating: true
            support_key: ssh-rsa AAAAB3N....
            ssh_allowed: true
            cluster_support: false
            expire_at: '2016-04-27T00:00:00-07:00'
          github_ssl:
            enabled: false
            cert: null
            key: null
          ldap:
            host: null
            port: 0
            base: []
            uid: null
            bind_dn: null
            password: null
            method: Plain
            search_strategy: detect
            user_groups: []
            admin_group: null
            virtual_attribute_enabled: false
            recursive_group_search: false
            posix_support: true
            user_sync_emails: false
            user_sync_keys: false
            user_sync_interval: 4
            team_sync_interval: 4
            sync_enabled: false
            reconciliation:
              user: null
              org: null
            profile:
              uid: uid
              name: null
              mail: null
              key: null
          cas:
            url: null
          saml:
            sso_url: null
            certificate: null
            certificate_path: null
            issuer: null
            idp_initiated_sso: false
            disable_admin_demote: false
          github_oauth:
            client_id: '12313412'
            client_secret: kj123131132
            organization_name: Homestar Runners
            organization_team: homestarrunners/characters
          smtp:
            enabled: true
            address: smtp.example.com
            authentication: plain
            port: '1234'
            domain: blah
            username: foo
            user_name: mr_foo
            enable_starttls_auto: true
            password: bar
            discard-to-noreply-address: true
            support_address: enterprise@github.com
            support_address_type: email
            noreply_address: noreply@github.com
          ntp:
            primary_server: 0.pool.ntp.org
            secondary_server: 1.pool.ntp.org
          timezone: null
          snmp:
            enabled: false
            community: ''
          syslog:
            enabled: false
            server: null
            protocol_name: udp
          assets: null
          pages:
            enabled: true
          collectd:
            enabled: false
            server: null
            port: 0
            encryption: null
            username: null
            password: null
          mapping:
            enabled: true
            tileserver: null
            basemap: company.map-qsz2zrvs
            token: null
          load_balancer: null
        run_list:
        - recipe[enterprise-configure]
  schemas:
    ssh-key:
      type: object
      properties:
        key:
          type: string
          example: example_value
        pretty-print:
          type: string
          example: example_value
    enterprise-settings:
      type: object
      properties:
        enterprise:
          type: object
          properties:
            private_mode:
              type: boolean
            public_pages:
              type: boolean
            subdomain_isolation:
              type: boolean
            signup_enabled:
              type: boolean
            github_hostname:
              type: string
            identicons_host:
              type: string
            http_proxy:
              type:
              - string
              - 'null'
            auth_mode:
              type: string
            expire_sessions:
              type: boolean
            admin_password:
              type:
              - string
              - 'null'
            configuration_id:
              type: integer
            configuration_run_count:
              type: integer
            avatar:
              type: object
              properties:
                enabled:
                  type: boolean
                uri:
                  type: string
            customer:
              type: object
              properties:
                name:
                  type: string
                email:
                  type: string
                uuid:
                  type: string
                secret_key_data:
                  type: string
                public_key_data:
                  type: string
            license:
              type: object
              properties:
                seats:
                  type: integer
                evaluation:
                  type: boolean
                perpetual:
                  type: boolean
                unlimited_seating:
                  type: boolean
                support_key:
                  type: string
                ssh_allowed:
                  type: boolean
                cluster_support:
                  type: boolean
                expire_at:
                  type: string
            github_ssl:
              type: object
              properties:
                enabled:
                  type: boolean
                cert:
                  type:
                  - string
                  - 'null'
                key:
                  type:
                  - string
                  - 'null'
            ldap:
              type: object
              properties:
                host:
                  type:
                  - string
                  - 'null'
                port:
                  type: integer
                base:
                  type: array
                  items: {}
                uid:
                  type:
                  - string
                  - 'null'
                bind_dn:
                  type:
                  - string
                  - 'null'
                password:
                  type:
                  - string
                  - 'null'
                method:
                  type: string
                search_strategy:
                  type: string
                user_groups:
                  type: array
                  items: {}
                admin_group:
                  type:
                  - string
                  - 'null'
                virtual_attribute_enabled:
                  type: boolean
                recursive_group_search:
                  type: boolean
                posix_support:
                  type: boolean
                user_sync_emails:
                  type: boolean
                user_sync_keys:
                  type: boolean
                user_sync_interval:
                  type: integer
                team_sync_interval:
                  type: integer
                sync_enabled:
                  type: boolean
                reconciliation:
                  type: object
                  properties:
                    user:
                      type:
                      - string
                      - 'null'
                    org:
                      type:
                      - string
                      - 'null'
                profile:
                  type: object
                  properties:
                    uid:
                      type: string
                    name:
                      type:
                      - string
                      - 'null'
                    mail:
                      type:
                      - string
                      - 'null'
                    key:
                      type:
                      - string
                      - 'null'
            cas:
              type: object
              properties:
                url:
                  type:
                  - string
                  - 'null'
            saml:
              type: object
              properties:
                sso_url:
                  type:
                  - string
                  - 'null'
                certificate:
                  type:
                  - string
                  - 'null'
                certificate_path:
                  type:
                  - string
                  - 'null'
                issuer:
                  type:
                  - string
                  - 'null'
                idp_initiated_sso:
                  type: boolean
                disable_admin_demote:
                  type: boolean
            github_oauth:
              type: object
              properties:
                client_id:
                  type: string
                client_secret:
                  type: string
                organization_name:
                  type: string
                organization_team:
                  type: string
            smtp:
              type: object
              properties:
                enabled:
                  type: boolean
                address:
                  type: string
                authentication:
                  type: string
                port:
                  type: string
                domain:
                  type: string
                username:
                  type: string
                user_name:
                  type: string
                enable_starttls_auto:
                  type: boolean
                password:
                  type: string
                discard-to-noreply-address:
                  type: boolean
                support_address:
                  type: string
                support_address_type:
                  type: string
                noreply_address:
                  type: string
            ntp:
              type: object
              properties:
                primary_server:
                  type: string
                secondary_server:
                  type: string
            timezone:
              type:
              - string
              - 'null'
            snmp:
              type: object
              properties:
                enabled:
                  type: boolean
                community:
                  type: string
            syslog:
              type: object
              properties:
                enabled:
                  type: boolean
                server:
                  type:
                  - string
                  - 'null'
                protocol_name:
                  type: string
            assets:
              type:
              - string
              - 'null'
            pages:
              type: object
              properties:
                enabled:
                  type: boolean
            collectd:
              type: object
              properties:
                enabled:
                  type: boolean
                server:
                  type:
                  - string
                  - 'null'
                port:
                  type: integer
                encryption:
                  type:
                  - string
                  - 'null'
                username:
                  type:
                  - string
                  - 'null'
                password:
                  type:
                  - string
                  - 'null'
            mapping:
              type: object
              properties:
                enabled:
                  type: boolean
                tileserver:
                  type:
                  - string
                  - 'null'
                basemap:
                  type: string
                token:
                  type:
                  - string
                  - 'null'
            load_balancer:
              type:
              - string
              - 'null'
        run_list:
          type: array
          items:
            type: string
  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/
x-refined-from:
- github-auth-api-openapi.yml
- github-setup-openapi.yml