License sync improvements (#29546)
This commit is contained in:
@@ -271175,6 +271175,334 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"license": [
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
"verb": "get",
|
||||
"requestPath": "/enterprises/{enterprise}/consumed-licenses",
|
||||
"title": "List enterprise consumed licenses",
|
||||
"category": "enterprise-admin",
|
||||
"subcategory": "license",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "enterprise",
|
||||
"description": "<p>The slug version of the enterprise name. You can also substitute this value with the enterprise id.</p>",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "per_page",
|
||||
"description": "<p>The number of results per page (max 100).</p>",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"default": 30
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "page",
|
||||
"description": "<p>Page number of the results to fetch.</p>",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"default": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"bodyParameters": [],
|
||||
"enabledForGitHubApps": false,
|
||||
"codeExamples": [
|
||||
{
|
||||
"key": "default",
|
||||
"request": {
|
||||
"description": "Example",
|
||||
"acceptHeader": "application/vnd.github.v3+json",
|
||||
"parameters": {
|
||||
"enterprise": "ENTERPRISE"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"statusCode": "200",
|
||||
"contentType": "application/json",
|
||||
"description": "<p>Consumed Licenses Response</p>",
|
||||
"example": {
|
||||
"total_seats_consumed": 5000,
|
||||
"total_seats_purchased": 4500,
|
||||
"users": [
|
||||
{
|
||||
"enterprise_server_emails": [
|
||||
"monalisa@github.com"
|
||||
],
|
||||
"github_com_login": "monalisa",
|
||||
"github_com_name": "Mona Lisa",
|
||||
"github_com_profile": "https://github.com/monalisa",
|
||||
"license_type": "enterprise",
|
||||
"github_com_member_roles": [
|
||||
"org1:Owner",
|
||||
"org2:Owner"
|
||||
],
|
||||
"github_com_enterprise_role": "owner",
|
||||
"visual_studio_subscription_user": false,
|
||||
"github_com_verified_domain_emails": [
|
||||
"monalisa@github.com"
|
||||
],
|
||||
"github_com_saml_name_id": "monalisa",
|
||||
"enterprise_server_user": true,
|
||||
"github_com_user": true,
|
||||
"total_user_accounts": 3,
|
||||
"enterprise_server_user_ids": [
|
||||
"example_host_name.com:123",
|
||||
"example_host_name_2:222"
|
||||
],
|
||||
"github_com_orgs_with_pending_invites": [
|
||||
"org1",
|
||||
"org2"
|
||||
],
|
||||
"visual_studio_subscription_email": ""
|
||||
},
|
||||
{
|
||||
"enterprise_server_emails": [
|
||||
"deleonjavier@example.com"
|
||||
],
|
||||
"github_com_login": "",
|
||||
"github_com_name": "",
|
||||
"github_com_profile": "",
|
||||
"license_type": "enterprise",
|
||||
"github_com_member_roles": [],
|
||||
"github_com_enterprise_role": "",
|
||||
"visual_studio_subscription_user": false,
|
||||
"github_com_verified_domain_emails": [],
|
||||
"github_com_saml_name_id": "",
|
||||
"enterprise_server_user": true,
|
||||
"github_com_user": false,
|
||||
"total_user_accounts": 1,
|
||||
"enterprise_server_user_ids": [
|
||||
"example_host_name:123"
|
||||
],
|
||||
"github_com_orgs_with_pending_invites": [],
|
||||
"visual_studio_subscription_email": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"schema": {
|
||||
"title": "Enterprise Consumed Licenses",
|
||||
"description": "A breakdown of the licenses consumed by an enterprise.",
|
||||
"properties": {
|
||||
"total_seats_consumed": {
|
||||
"type": "integer"
|
||||
},
|
||||
"total_seats_purchased": {
|
||||
"type": "integer"
|
||||
},
|
||||
"users": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"github_com_login": {
|
||||
"type": "string"
|
||||
},
|
||||
"github_com_name": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"github_com_profile": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"license_type": {
|
||||
"type": "string"
|
||||
},
|
||||
"github_com_member_roles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"github_com_enterprise_role": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"visual_studio_subscription_user": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"github_com_verified_domain_emails": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"github_com_saml_name_id": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"enterprise_server_user": {
|
||||
"type": [
|
||||
"boolean",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"enterprise_server_emails": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"github_com_user": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"total_user_accounts": {
|
||||
"type": "integer"
|
||||
},
|
||||
"enterprise_server_user_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"github_com_orgs_with_pending_invites": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"visual_studio_subscription_email": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Lists the license consumption information for all users, including those from connected servers, associated with an enterprise.\nTo use this endpoint, you must be an enterprise admin, and you must use an access\ntoken with the <code>read:enterprise</code> scope.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"description": "<p>Consumed Licenses Response</p>"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
"verb": "get",
|
||||
"requestPath": "/enterprises/{enterprise}/license-sync-status",
|
||||
"title": "Get a license sync status",
|
||||
"category": "enterprise-admin",
|
||||
"subcategory": "license",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "enterprise",
|
||||
"description": "<p>The slug version of the enterprise name. You can also substitute this value with the enterprise id.</p>",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"bodyParameters": [],
|
||||
"enabledForGitHubApps": false,
|
||||
"codeExamples": [
|
||||
{
|
||||
"key": "default",
|
||||
"request": {
|
||||
"description": "Example",
|
||||
"acceptHeader": "application/vnd.github.v3+json",
|
||||
"parameters": {
|
||||
"enterprise": "ENTERPRISE"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"statusCode": "200",
|
||||
"contentType": "application/json",
|
||||
"description": "<p>License Sync Status Response</p>",
|
||||
"example": {
|
||||
"server_instances": [
|
||||
{
|
||||
"server_id": "deadbeef1",
|
||||
"hostname": "github.example.com",
|
||||
"last_sync": {
|
||||
"date": "2020-01-01T00:00:00Z",
|
||||
"status": "success",
|
||||
"error": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"server_id": "filetoffish1",
|
||||
"hostname": "github2.example.com",
|
||||
"last_sync": {
|
||||
"date": "2020-01-01T00:00:00Z",
|
||||
"status": "success",
|
||||
"error": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"schema": {
|
||||
"title": "License Sync Status",
|
||||
"description": "Information about the status of a license sync job for an enterprise.",
|
||||
"properties": {
|
||||
"server_instances": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"server_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"hostname": {
|
||||
"type": "string"
|
||||
},
|
||||
"last_sync": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"date": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"error": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"previews": [],
|
||||
"descriptionHTML": "<p>Gets information about the status of a license sync job for an enterprise.\nTo use this endpoint, you must be an enterprise admin, and you must use an access\ntoken with the <code>read:enterprise</code> scope.</p>",
|
||||
"statusCodes": [
|
||||
{
|
||||
"httpStatusCode": "200",
|
||||
"description": "<p>License Sync Status Response</p>"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"scim": [
|
||||
{
|
||||
"serverUrl": "https://api.github.com",
|
||||
|
||||
Reference in New Issue
Block a user