@github/openapi
Version:
OpenAPI schema for GitHub's REST API
1,381 lines (1,380 loc) • 6.87 MB
JSON
{
"openapi": "3.0.2",
"info": {
"version": "ghe-2.21",
"title": "GitHub Enterprise REST API v2.21",
"description": "This describes the resources that make up the official GitHub Enterprise Server REST API v3. If you have any problems or requests, please contact [GitHub Enterprise Support](https://enterprise.github.com/support).",
"license": {
"name": "GitHub Enterprise License Agreement",
"url": "https://enterprise.github.com/license"
},
"termsOfService": "https://docs.github.com/en/articles/github-terms-of-service"
},
"servers": [
{
"url": "http://{hostname}",
"variables": {
"hostname": {
"description": "Self-hosted Enterprise Server or Enterprise Cloud hostname",
"default": "HOSTNAME"
}
}
}
],
"externalDocs": {
"description": "GitHub Enterprise Developer Docs",
"url": "https://developer.github.com/enterprise/2.21/v3/"
},
"paths": {
"/admin/hooks": {
"get": {
"summary": "List global webhooks",
"description": "",
"operationId": "enterprise-admin/list-global-webhooks",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://developer.github.com/enterprise/2.21/v3/enterprise-admin/global_webhooks/#list-global-webhooks"
},
"parameters": [
{
"name": "accept",
"description": "This API is under preview and subject to change.",
"in": "header",
"schema": {
"type": "string",
"default": "application/vnd.github.superpro-preview+json"
},
"required": true
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
}
},
{
"name": "page",
"description": "Page number of the results to fetch.",
"in": "query",
"schema": {
"type": "integer",
"default": 1
}
}
],
"responses": {
"200": {
"description": "response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "number"
},
"name": {
"type": "string"
},
"active": {
"type": "boolean"
},
"events": {
"type": "array",
"items": {
"type": "string"
}
},
"config": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"content_type": {
"type": "string"
},
"insecure_ssl": {
"type": "string"
},
"secret": {
"type": "string"
}
}
},
"updated_at": {
"type": "string"
},
"created_at": {
"type": "string"
},
"url": {
"type": "string"
},
"ping_url": {
"type": "string"
}
}
}
},
"examples": {
"default": {
"value": [
{
"type": "Global",
"id": 1,
"name": "web",
"active": true,
"events": [
"organization",
"user"
],
"config": {
"url": "https://example.com",
"content_type": "json",
"insecure_ssl": "0",
"secret": "********"
},
"updated_at": "2017-12-07T00:14:59Z",
"created_at": "2017-12-07T00:14:59Z",
"url": "https://api.github.com/admin/hooks/1",
"ping_url": "https://api.github.com/admin/hooks/1/pings"
}
]
}
}
}
},
"headers": {
"Link": {
"example": "<https://api.github.com/resource?page=2>; rel=\"next\", <https://api.github.com/resource?page=5>; rel=\"last\"",
"schema": {
"type": "string"
}
}
}
}
},
"x-github": {
"enabledForApps": false,
"githubCloudOnly": false,
"previews": [
{
"required": true,
"name": "superpro",
"note": "The [Global Webhooks API](https://developer.github.com/enterprise/2.21/v3/enterprise-admin/global_webhooks/) is currently available for developers to preview. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/enterprise/2.21/v3/media) in the `Accept` header:\n```shell\napplication/vnd.github.superpro-preview+json\n```"
}
],
"category": "enterprise-admin",
"subcategory": "global-webhooks"
},
"x-githubBreakingChanges": [
{
"type": "operation",
"date": "2020-06-05",
"note": "\"enterprise-admin/list-global-hooks\" operation ID is now \"enterprise-admin/list-global-webhooks\"",
"before": {
"operationId": "enterprise-admin/list-global-hooks"
},
"after": {
"operationId": "enterprise-admin/list-global-webhooks"
}
}
]
},
"post": {
"summary": "Create a global webhook",
"description": "",
"operationId": "enterprise-admin/create-global-webhook",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://developer.github.com/enterprise/2.21/v3/enterprise-admin/global_webhooks/#create-a-global-webhook"
},
"parameters": [
{
"name": "accept",
"description": "This API is under preview and subject to change.",
"in": "header",
"schema": {
"type": "string",
"default": "application/vnd.github.superpro-preview+json"
},
"required": true
}
],
"responses": {
"201": {
"description": "response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "number"
},
"name": {
"type": "string"
},
"active": {
"type": "boolean"
},
"events": {
"type": "array",
"items": {
"type": "string"
}
},
"config": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"content_type": {
"type": "string"
},
"insecure_ssl": {
"type": "string"
},
"secret": {
"type": "string"
}
}
},
"updated_at": {
"type": "string"
},
"created_at": {
"type": "string"
},
"url": {
"type": "string"
},
"ping_url": {
"type": "string"
}
}
},
"examples": {
"default": {
"value": {
"type": "Global",
"id": 1,
"name": "web",
"active": true,
"events": [
"organization",
"user"
],
"config": {
"url": "https://example.com",
"content_type": "json",
"insecure_ssl": "0",
"secret": "********"
},
"updated_at": "2017-12-07T00:14:59Z",
"created_at": "2017-12-07T00:14:59Z",
"url": "https://api.github.com/admin/hooks/1",
"ping_url": "https://api.github.com/admin/hooks/1/pings"
}
}
}
}
}
}
},
"x-github": {
"enabledForApps": false,
"githubCloudOnly": false,
"previews": [
{
"required": true,
"name": "superpro",
"note": "The [Global Webhooks API](https://developer.github.com/enterprise/2.21/v3/enterprise-admin/global_webhooks/) is currently available for developers to preview. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/enterprise/2.21/v3/media) in the `Accept` header:\n```shell\napplication/vnd.github.superpro-preview+json\n```"
}
],
"category": "enterprise-admin",
"subcategory": "global-webhooks"
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Must be passed as \"web\"."
},
"config": {
"type": "object",
"description": "Key/value pairs to provide settings for this webhook.",
"properties": {
"url": {
"type": "string",
"description": "The URL to which the payloads will be delivered."
},
"content_type": {
"type": "string",
"description": "The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`."
},
"secret": {
"type": "string",
"description": "If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://developer.github.com/enterprise/2.21/webhooks/event-payloads/#delivery-headers) header."
},
"insecure_ssl": {
"type": "string",
"description": "Determines whether the SSL certificate of the host for `url` will be verified when delivering payloads. Supported values include `0` (verification is performed) and `1` (verification is not performed). The default is `0`. **We strongly recommend not setting this to `1` as you are subject to man-in-the-middle and other attacks.**"
}
},
"required": [
"url"
]
},
"events": {
"type": "array",
"description": "The [events](https://developer.github.com/enterprise/2.21/webhooks/event-payloads) that trigger this webhook. A global webhook can be triggered by `user` and `organization` events. Default: `user` and `organization`.",
"items": {
"type": "string"
}
},
"active": {
"type": "boolean",
"description": "Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.",
"default": true
}
},
"required": [
"name",
"config"
]
},
"example": {
"name": "web",
"events": [
"organization",
"user"
],
"config": {
"url": "https://example.com/webhook",
"content_type": "json",
"secret": "secret"
}
}
}
}
},
"x-githubBreakingChanges": [
{
"type": "operation",
"date": "2020-06-05",
"note": "\"enterprise-admin/create-global-hooks\" operation ID is now \"enterprise-admin/create-global-webhooks\"",
"before": {
"operationId": "enterprise-admin/create-global-hooks"
},
"after": {
"operationId": "enterprise-admin/create-global-webhooks"
}
}
]
}
},
"/admin/hooks/{hook_id}": {
"get": {
"summary": "Get a global webhook",
"description": "",
"operationId": "enterprise-admin/get-global-webhook",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://developer.github.com/enterprise/2.21/v3/enterprise-admin/global_webhooks/#get-a-global-webhook"
},
"parameters": [
{
"name": "accept",
"description": "This API is under preview and subject to change.",
"in": "header",
"schema": {
"type": "string",
"default": "application/vnd.github.superpro-preview+json"
},
"required": true
},
{
"name": "hook_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "number"
},
"name": {
"type": "string"
},
"active": {
"type": "boolean"
},
"events": {
"type": "array",
"items": {
"type": "string"
}
},
"config": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"content_type": {
"type": "string"
},
"insecure_ssl": {
"type": "string"
},
"secret": {
"type": "string"
}
}
},
"updated_at": {
"type": "string"
},
"created_at": {
"type": "string"
},
"url": {
"type": "string"
},
"ping_url": {
"type": "string"
}
}
},
"examples": {
"default": {
"value": {
"type": "Global",
"id": 1,
"name": "web",
"active": true,
"events": [
"organization",
"user"
],
"config": {
"url": "https://example.com",
"content_type": "json",
"insecure_ssl": "0",
"secret": "********"
},
"updated_at": "2017-12-07T00:14:59Z",
"created_at": "2017-12-07T00:14:59Z",
"url": "https://api.github.com/admin/hooks/1",
"ping_url": "https://api.github.com/admin/hooks/1/pings"
}
}
}
}
}
}
},
"x-github": {
"enabledForApps": false,
"githubCloudOnly": false,
"previews": [
{
"required": true,
"name": "superpro",
"note": "The [Global Webhooks API](https://developer.github.com/enterprise/2.21/v3/enterprise-admin/global_webhooks/) is currently available for developers to preview. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/enterprise/2.21/v3/media) in the `Accept` header:\n```shell\napplication/vnd.github.superpro-preview+json\n```"
}
],
"category": "enterprise-admin",
"subcategory": "global-webhooks"
},
"x-githubBreakingChanges": [
{
"type": "operation",
"date": "2020-06-05",
"note": "\"enterprise-admin/get-global-hook\" operation ID is now \"enterprise-admin/get-global-webhook\"",
"before": {
"operationId": "enterprise-admin/get-global-hook"
},
"after": {
"operationId": "enterprise-admin/get-global-webhook"
}
}
]
},
"patch": {
"summary": "Update a global webhook",
"description": "Parameters that are not provided will be overwritten with the default value or removed if no default exists.",
"operationId": "enterprise-admin/update-global-webhook",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://developer.github.com/enterprise/2.21/v3/enterprise-admin/global_webhooks/#update-a-global-webhook"
},
"parameters": [
{
"name": "accept",
"description": "This API is under preview and subject to change.",
"in": "header",
"schema": {
"type": "string",
"default": "application/vnd.github.superpro-preview+json"
},
"required": true
},
{
"name": "hook_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"id": {
"type": "number"
},
"name": {
"type": "string"
},
"active": {
"type": "boolean"
},
"events": {
"type": "array",
"items": {
"type": "string"
}
},
"config": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"content_type": {
"type": "string"
},
"insecure_ssl": {
"type": "string"
}
}
},
"updated_at": {
"type": "string"
},
"created_at": {
"type": "string"
},
"url": {
"type": "string"
},
"ping_url": {
"type": "string"
}
}
},
"examples": {
"default": {
"value": {
"type": "Global",
"id": 1,
"name": "web",
"active": true,
"events": [
"organization"
],
"config": {
"url": "https://example.com",
"content_type": "form",
"insecure_ssl": "0"
},
"updated_at": "2017-12-07T00:14:59Z",
"created_at": "2017-12-07T00:14:59Z",
"url": "https://api.github.com/admin/hooks/1",
"ping_url": "https://api.github.com/admin/hooks/1/pings"
}
}
}
}
}
}
},
"x-github": {
"enabledForApps": false,
"githubCloudOnly": false,
"previews": [
{
"required": true,
"name": "superpro",
"note": "The [Global Webhooks API](https://developer.github.com/enterprise/2.21/v3/enterprise-admin/global_webhooks/) is currently available for developers to preview. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/enterprise/2.21/v3/media) in the `Accept` header:\n```shell\napplication/vnd.github.superpro-preview+json\n```"
}
],
"category": "enterprise-admin",
"subcategory": "global-webhooks"
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"config": {
"type": "object",
"description": "Key/value pairs to provide settings for this webhook.",
"properties": {
"url": {
"type": "string",
"description": "The URL to which the payloads will be delivered."
},
"content_type": {
"type": "string",
"description": "The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`."
},
"secret": {
"type": "string",
"description": "If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://developer.github.com/enterprise/2.21/webhooks/event-payloads/#delivery-headers) header."
},
"insecure_ssl": {
"type": "string",
"description": "Determines whether the SSL certificate of the host for `url` will be verified when delivering payloads. Supported values include `0` (verification is performed) and `1` (verification is not performed). The default is `0`. **We strongly recommend not setting this to `1` as you are subject to man-in-the-middle and other attacks.**"
}
},
"required": [
"url"
]
},
"events": {
"type": "array",
"description": "The [events](https://developer.github.com/enterprise/2.21/webhooks/event-payloads) that trigger this webhook. A global webhook can be triggered by `user` and `organization` events. Default: `user` and `organization`.",
"items": {
"type": "string"
}
},
"active": {
"type": "boolean",
"description": "Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.",
"default": true
}
}
},
"example": {
"events": [
"organization"
],
"config": {
"url": "https://example.com/webhook"
}
}
}
}
},
"x-githubBreakingChanges": [
{
"type": "operation",
"date": "2020-06-05",
"note": "\"enterprise-admin/update-global-hook\" operation ID is now \"enterprise-admin/update-global-webhook\"",
"before": {
"operationId": "enterprise-admin/update-global-hook"
},
"after": {
"operationId": "enterprise-admin/update-global-webhook"
}
}
]
},
"delete": {
"summary": "Delete a global webhook",
"description": "",
"operationId": "enterprise-admin/delete-global-webhook",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://developer.github.com/enterprise/2.21/v3/enterprise-admin/global_webhooks/#delete-a-global-webhook"
},
"parameters": [
{
"name": "accept",
"description": "This API is under preview and subject to change.",
"in": "header",
"schema": {
"type": "string",
"default": "application/vnd.github.superpro-preview+json"
},
"required": true
},
{
"name": "hook_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"204": {
"description": "Empty response"
}
},
"x-github": {
"enabledForApps": false,
"githubCloudOnly": false,
"previews": [
{
"required": true,
"name": "superpro",
"note": "The [Global Webhooks API](https://developer.github.com/enterprise/2.21/v3/enterprise-admin/global_webhooks/) is currently available for developers to preview. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/enterprise/2.21/v3/media) in the `Accept` header:\n```shell\napplication/vnd.github.superpro-preview+json\n```"
}
],
"category": "enterprise-admin",
"subcategory": "global-webhooks"
},
"x-githubBreakingChanges": [
{
"type": "operation",
"date": "2020-06-05",
"note": "\"enterprise-admin/delete-global-hook\" operation ID is now \"enterprise-admin/delete-global-webhook\"",
"before": {
"operationId": "enterprise-admin/delete-global-hook"
},
"after": {
"operationId": "enterprise-admin/delete-global-webhook"
}
}
]
}
},
"/admin/hooks/{hook_id}/pings": {
"post": {
"summary": "Ping a global webhook",
"description": "This will trigger a [ping event](https://developer.github.com/enterprise/2.21/webhooks/#ping-event) to be sent to the webhook.",
"operationId": "enterprise-admin/ping-global-webhook",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://developer.github.com/enterprise/2.21/v3/enterprise-admin/global_webhooks/#ping-a-global-webhook"
},
"parameters": [
{
"name": "accept",
"description": "This API is under preview and subject to change.",
"in": "header",
"schema": {
"type": "string",
"default": "application/vnd.github.superpro-preview+json"
},
"required": true
},
{
"name": "hook_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"204": {
"description": "Empty response"
}
},
"x-github": {
"enabledForApps": false,
"githubCloudOnly": false,
"previews": [
{
"required": true,
"name": "superpro",
"note": "The [Global Webhooks API](https://developer.github.com/enterprise/2.21/v3/enterprise-admin/global_webhooks/) is currently available for developers to preview. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/enterprise/2.21/v3/media) in the `Accept` header:\n```shell\napplication/vnd.github.superpro-preview+json\n```"
}
],
"category": "enterprise-admin",
"subcategory": "global-webhooks"
},
"x-githubBreakingChanges": [
{
"type": "operation",
"date": "2020-06-05",
"note": "\"enterprise-admin/ping-global-hook\" operation ID is now \"enterprise-admin/ping-global-webhook\"",
"before": {
"operationId": "enterprise-admin/ping-global-hook"
},
"after": {
"operationId": "enterprise-admin/ping-global-webhook"
}
}
]
}
},
"/admin/keys": {
"get": {
"summary": "List public keys",
"description": "",
"operationId": "enterprise-admin/list-public-keys",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://developer.github.com/enterprise/2.21/v3/enterprise-admin/users/#list-public-keys"
},
"parameters": [
{
"name": "accept",
"description": "Setting to `application/vnd.github.v3+json` is recommended",
"in": "header",
"schema": {
"type": "string",
"default": "application/vnd.github.v3+json"
}
},
{
"name": "per_page",
"description": "Results per page (max 100)",
"in": "query",
"schema": {
"type": "integer",
"default": 30
}
},
{
"name": "page",
"description": "Page number of the results to fetch.",
"in": "query",
"schema": {
"type": "integer",
"default": 1
}
}
],
"responses": {
"200": {
"description": "response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key_id": {
"type": "string"
},
"key": {
"type": "string"
},
"user_id": {
"nullable": true,
"type": "number"
},
"repository_id": {
"nullable": true,
"type": "number"
},
"url": {
"type": "string"
}
}
}
},
"examples": {
"default": {
"value": [
{
"key_id": "012345678912345678",
"key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234",
"user_id": 232,
"repository_id": null
},
{
"key_id": "012345678912345678",
"key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234",
"user_id": null,
"repository_id": 2333,
"id": "2",
"url": "https://api.github.com/repos/octocat/Hello-World/keys/2"
}
]
}
}
}
},
"headers": {
"Link": {
"example": "<https://api.github.com/resource?page=2>; rel=\"next\", <https://api.github.com/resource?page=5>; rel=\"last\"",
"schema": {
"type": "string"
}
}
}
}
},
"x-github": {
"enabledForApps": false,
"githubCloudOnly": false,
"previews": [],
"category": "enterprise-admin",
"subcategory": "users"
}
}
},
"/admin/keys/{key_ids}": {
"delete": {
"summary": "Delete a public key",
"description": "",
"operationId": "enterprise-admin/delete-public-key",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://developer.github.com/enterprise/2.21/v3/enterprise-admin/users/#delete-a-public-key"
},
"parameters": [
{
"name": "accept",
"description": "Setting to `application/vnd.github.v3+json` is recommended",
"in": "header",
"schema": {
"type": "string",
"default": "application/vnd.github.v3+json"
}
},
{
"name": "key_ids",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"description": "Empty response"
}
},
"x-github": {
"enabledForApps": false,
"githubCloudOnly": false,
"previews": [],
"category": "enterprise-admin",
"subcategory": "users"
}
}
},
"/admin/ldap/teams/{team_id}/mapping": {
"patch": {
"summary": "Update LDAP mapping for a team",
"description": "Updates the [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. [LDAP synchronization](https://docs.github.com/enterprise/admin/guides/user-management/using-ldap/#enabling-ldap-sync) must be enabled to map LDAP entries to a team. Use the [Create a team](https://developer.github.com/enterprise/2.21/v3/teams/#create-a-team) endpoint to create a team with LDAP mapping.\n\nYou can also update the LDAP mapping of a child team.",
"operationId": "enterprise-admin/update-ldap-mapping-for-team",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://developer.github.com/enterprise/2.21/v3/enterprise-admin/ldap/#update-ldap-mapping-for-a-team"
},
"parameters": [
{
"name": "accept",
"description": "Setting to `application/vnd.github.v3+json` is recommended",
"in": "header",
"schema": {
"type": "string",
"default": "application/vnd.github.v3+json"
}
},
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ldap_dn": {
"type": "string"
},
"id": {
"type": "number"
},
"node_id": {
"type": "string"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string"
},
"description": {
"type": "string"
},
"privacy": {
"type": "string"
},
"permission": {
"type": "string"
},
"members_url": {
"type": "string"
},
"repositories_url": {
"type": "string"
},
"parent": {
"nullable": true
}
}
},
"examples": {
"default": {
"value": {
"ldap_dn": "cn=Enterprise Ops,ou=teams,dc=github,dc=com",
"id": 1,
"node_id": "MDQ6VGVhbTE=",
"url": "https://api.github.com/teams/1",
"html_url": "https://api.github.com/teams/justice-league",
"name": "Justice League",
"slug": "justice-league",
"description": "A great team.",
"privacy": "closed",
"permission": "admin",
"members_url": "https://api.github.com/teams/1/members{/member}",
"repositories_url": "https://api.github.com/teams/1/repos",
"parent": null
}
}
}
}
}
}
},
"x-github": {
"enabledForApps": false,
"githubCloudOnly": false,
"previews": [],
"category": "enterprise-admin",
"subcategory": "ldap"
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ldap_dn": {
"type": "string",
"description": "The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team."
}
}
},
"example": {
"ldap_dn": "cn=Enterprise Ops,ou=teams,dc=github,dc=com"
}
}
}
}
}
},
"/admin/ldap/teams/{team_id}/sync": {
"post": {
"summary": "Sync LDAP mapping for a team",
"description": "Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready.",
"operationId": "enterprise-admin/sync-ldap-mapping-for-team",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://developer.github.com/enterprise/2.21/v3/enterprise-admin/ldap/#sync-ldap-mapping-for-a-team"
},
"parameters": [
{
"name": "accept",
"description": "Setting to `application/vnd.github.v3+json` is recommended",
"in": "header",
"schema": {
"type": "string",
"default": "application/vnd.github.v3+json"
}
},
{
"name": "team_id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"201": {
"description": "response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string"
}
}
},
"example": {
"status": "queued"
}
}
}
}
},
"x-github": {
"enabledForApps": false,
"githubCloudOnly": false,
"previews": [],
"category": "enterprise-admin",
"subcategory": "ldap"
}
}
},
"/admin/ldap/users/{username}/mapping": {
"patch": {
"summary": "Update LDAP mapping for a user",
"description": "",
"operationId": "enterprise-admin/update-ldap-mapping-for-user",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",
"url": "https://developer.github.com/enterprise/2.21/v3/enterprise-admin/ldap/#update-ldap-mapping-for-a-user"
},
"parameters": [
{
"name": "accept",
"description": "Setting to `application/vnd.github.v3+json` is recommended",
"in": "header",
"schema": {
"type": "string",
"default": "application/vnd.github.v3+json"
}
},
{
"name": "username",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ldap_dn": {
"type": "string"
},
"login": {
"type": "string"
},
"id": {
"type": "number"
},
"node_id": {
"type": "string"
},
"avatar_url": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"url": {
"type": "string"
},
"html_url": {
"type": "string"
},
"followers_url": {
"type": "string"
},
"following_url": {
"type": "string"
},
"gists_url": {
"type": "string"
},
"starred_url": {
"type": "string"
},
"subscriptions_url": {
"type": "string"
},
"organizations_url": {
"type": "string"
},
"repos_url": {
"type": "string"
},
"events_url": {
"type": "string"
},
"received_events_url": {
"type": "string"
},
"type": {
"type": "string"
},
"site_admin": {
"type": "boolean"
}
}
},
"examples": {
"default": {
"value": {
"ldap_dn": "uid=asdf,ou=users,dc=github,dc=com",
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
}
}
}
}
}
}
},
"x-github": {
"enabledForApps": false,
"githubCloudOnly": false,
"previews": [],
"category": "enterprise-admin",
"subcategory": "ldap"
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ldap_dn": {
"type": "string",
"description": "The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team."
}
}
},
"example": {
"ldap_dn": "uid=asdf,ou=users,dc=github,dc=com"
}
}
}
}
}
},
"/admin/ldap/users/{username}/sync": {
"post": {
"summary": "Sync LDAP mapping for a user",
"description": "Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready.",
"operationId": "enterprise-admin/sync-ldap-mapping-for-user",
"tags": [
"enterprise-admin"
],
"externalDocs": {
"description": "API method documentation",