Skip to content

Update OpenAPI 3.1 Descriptions #5007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
196 changes: 190 additions & 6 deletions descriptions-next/ghec/dereferenced/ghec.2022-11-28.deref.json
Original file line number Diff line number Diff line change
Expand Up @@ -57246,6 +57246,162 @@
"category": "enterprise-admin",
"subcategory": "billing"
}
},
"post": {
"summary": "Create a new cost center",
"description": "Creates a new cost center for an enterprise. The authenticated user must be an enterprise admin.",
"tags": [
"billing"
],
"operationId": "billing/create-cost-center",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#create-a-new-cost-center"
},
"parameters": [
{
"name": "enterprise",
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the cost center (max length 255 characters)"
}
}
},
"examples": {
"example-1": {
"summary": "Example request to create a cost center",
"value": {
"name": "Engineering Team"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Cost center created successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the cost center"
},
"name": {
"type": "string",
"description": "Name of the cost center"
},
"resources": {
"type": "array",
"description": "List of resources assigned to this cost center",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Type of resource (User, Org, or Repo)"
},
"name": {
"type": "string",
"description": "Name/login of the resource"
}
}
}
}
}
},
"examples": {
"example-1": {
"summary": "Example response for a created cost center",
"value": {
"id": "abc123",
"name": "Engineering Team",
"resources": []
}
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"examples": {
"missing-name": {
"summary": "Missing name",
"value": {
"message": "Bad request: name is required."
}
},
"limit-reached": {
"summary": "Cost center limit reached",
"value": {
"message": "This enterprise is already at the cost center limit of 1000 active cost centers."
}
}
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"application/json": {
"examples": {
"duplicate-name": {
"summary": "Duplicate name",
"value": {
"message": "There's already a cost center created with that name."
}
}
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"examples": {
"internal-error": {
"summary": "Internal error",
"value": {
"message": "An internal server error occurred. Please try again later."
}
}
}
}
}
}
},
"x-github": {
"githubCloudOnly": true,
"enabledForGitHubApps": false,
"category": "enterprise-admin",
"subcategory": "billing"
}
}
},
"/enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id}": {
Expand Down Expand Up @@ -58077,15 +58233,15 @@
},
"/enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id}/resource": {
"post": {
"summary": "Add users to a cost center",
"description": "Adds users to a cost center.\n\nThe usage for the users will be charged to the cost center's budget. The authenticated user must be an enterprise admin in order to use this endpoint.",
"summary": "Add resources to a cost center",
"description": "Adds resources to a cost center.\n\nThe usage for the resources will be charged to the cost center's budget. The authenticated user must be an enterprise admin in order to use this endpoint.",
"tags": [
"billing"
],
"operationId": "billing/add-resource-to-cost-center",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#add-users-to-a-cost-center"
"url": "https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#add-resources-to-a-cost-center"
},
"parameters": [
{
Expand Down Expand Up @@ -58120,6 +58276,20 @@
"items": {
"type": "string"
}
},
"organizations": {
"description": "The organizations to add to the cost center.",
"type": "array",
"items": {
"type": "string"
}
},
"repositories": {
"description": "The repositories to add to the cost center.",
"type": "array",
"items": {
"type": "string"
}
}
},
"minProperties": 1
Expand Down Expand Up @@ -58335,15 +58505,15 @@
}
},
"delete": {
"summary": "Remove users from a cost center",
"description": "Remove users from a cost center.\n\nThe usage for the users will no longer be charged to the cost center's budget. The authenticated user must be an enterprise admin in order to use this endpoint.",
"summary": "Remove resources from a cost center",
"description": "Remove resources from a cost center.\n\nThe usage for the resources will no longer be charged to the cost center's budget. The authenticated user must be an enterprise admin in order to use this endpoint.",
"tags": [
"billing"
],
"operationId": "billing/remove-resource-from-cost-center",
"externalDocs": {
"description": "API method documentation",
"url": "https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#remove-users-from-a-cost-center"
"url": "https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#remove-resources-from-a-cost-center"
},
"parameters": [
{
Expand Down Expand Up @@ -58378,6 +58548,20 @@
"items": {
"type": "string"
}
},
"organizations": {
"description": "The organizations to remove from the cost center.",
"type": "array",
"items": {
"type": "string"
}
},
"repositories": {
"description": "The repositories to remove from the cost center.",
"type": "array",
"items": {
"type": "string"
}
}
},
"minProperties": 1
Expand Down
Loading