Skip to content

Commit 0947e19

Browse files
Update OpenAPI 3.0 Descriptions
1 parent 527d41e commit 0947e19

File tree

8 files changed

+1256
-56
lines changed

8 files changed

+1256
-56
lines changed

descriptions/ghec/dereferenced/ghec.2022-11-28.deref.json

Lines changed: 190 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52361,6 +52361,162 @@
5236152361
"category": "enterprise-admin",
5236252362
"subcategory": "billing"
5236352363
}
52364+
},
52365+
"post": {
52366+
"summary": "Create a new cost center",
52367+
"description": "Creates a new cost center for an enterprise. The authenticated user must be an enterprise admin.",
52368+
"tags": [
52369+
"billing"
52370+
],
52371+
"operationId": "billing/create-cost-center",
52372+
"externalDocs": {
52373+
"description": "API method documentation",
52374+
"url": "https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#create-a-new-cost-center"
52375+
},
52376+
"parameters": [
52377+
{
52378+
"name": "enterprise",
52379+
"description": "The slug version of the enterprise name. You can also substitute this value with the enterprise id.",
52380+
"in": "path",
52381+
"required": true,
52382+
"schema": {
52383+
"type": "string"
52384+
}
52385+
}
52386+
],
52387+
"requestBody": {
52388+
"required": true,
52389+
"content": {
52390+
"application/json": {
52391+
"schema": {
52392+
"type": "object",
52393+
"required": [
52394+
"name"
52395+
],
52396+
"properties": {
52397+
"name": {
52398+
"type": "string",
52399+
"description": "The name of the cost center (max length 255 characters)"
52400+
}
52401+
}
52402+
},
52403+
"examples": {
52404+
"example-1": {
52405+
"summary": "Example request to create a cost center",
52406+
"value": {
52407+
"name": "Engineering Team"
52408+
}
52409+
}
52410+
}
52411+
}
52412+
}
52413+
},
52414+
"responses": {
52415+
"200": {
52416+
"description": "Cost center created successfully",
52417+
"content": {
52418+
"application/json": {
52419+
"schema": {
52420+
"type": "object",
52421+
"properties": {
52422+
"id": {
52423+
"type": "string",
52424+
"description": "Unique identifier for the cost center"
52425+
},
52426+
"name": {
52427+
"type": "string",
52428+
"description": "Name of the cost center"
52429+
},
52430+
"resources": {
52431+
"type": "array",
52432+
"description": "List of resources assigned to this cost center",
52433+
"items": {
52434+
"type": "object",
52435+
"properties": {
52436+
"type": {
52437+
"type": "string",
52438+
"description": "Type of resource (User, Org, or Repo)"
52439+
},
52440+
"name": {
52441+
"type": "string",
52442+
"description": "Name/login of the resource"
52443+
}
52444+
}
52445+
}
52446+
}
52447+
}
52448+
},
52449+
"examples": {
52450+
"example-1": {
52451+
"summary": "Example response for a created cost center",
52452+
"value": {
52453+
"id": "abc123",
52454+
"name": "Engineering Team",
52455+
"resources": []
52456+
}
52457+
}
52458+
}
52459+
}
52460+
}
52461+
},
52462+
"400": {
52463+
"description": "Bad request",
52464+
"content": {
52465+
"application/json": {
52466+
"examples": {
52467+
"missing-name": {
52468+
"summary": "Missing name",
52469+
"value": {
52470+
"message": "Bad request: name is required."
52471+
}
52472+
},
52473+
"limit-reached": {
52474+
"summary": "Cost center limit reached",
52475+
"value": {
52476+
"message": "This enterprise is already at the cost center limit of 1000 active cost centers."
52477+
}
52478+
}
52479+
}
52480+
}
52481+
}
52482+
},
52483+
"409": {
52484+
"description": "Conflict",
52485+
"content": {
52486+
"application/json": {
52487+
"examples": {
52488+
"duplicate-name": {
52489+
"summary": "Duplicate name",
52490+
"value": {
52491+
"message": "There's already a cost center created with that name."
52492+
}
52493+
}
52494+
}
52495+
}
52496+
}
52497+
},
52498+
"500": {
52499+
"description": "Internal server error",
52500+
"content": {
52501+
"application/json": {
52502+
"examples": {
52503+
"internal-error": {
52504+
"summary": "Internal error",
52505+
"value": {
52506+
"message": "An internal server error occurred. Please try again later."
52507+
}
52508+
}
52509+
}
52510+
}
52511+
}
52512+
}
52513+
},
52514+
"x-github": {
52515+
"githubCloudOnly": true,
52516+
"enabledForGitHubApps": false,
52517+
"category": "enterprise-admin",
52518+
"subcategory": "billing"
52519+
}
5236452520
}
5236552521
},
5236652522
"/enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id}": {
@@ -53168,15 +53324,15 @@
5316853324
},
5316953325
"/enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id}/resource": {
5317053326
"post": {
53171-
"summary": "Add users to a cost center",
53172-
"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.",
53327+
"summary": "Add resources to a cost center",
53328+
"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.",
5317353329
"tags": [
5317453330
"billing"
5317553331
],
5317653332
"operationId": "billing/add-resource-to-cost-center",
5317753333
"externalDocs": {
5317853334
"description": "API method documentation",
53179-
"url": "https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#add-users-to-a-cost-center"
53335+
"url": "https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#add-resources-to-a-cost-center"
5318053336
},
5318153337
"parameters": [
5318253338
{
@@ -53211,6 +53367,20 @@
5321153367
"items": {
5321253368
"type": "string"
5321353369
}
53370+
},
53371+
"organizations": {
53372+
"description": "The organizations to add to the cost center.",
53373+
"type": "array",
53374+
"items": {
53375+
"type": "string"
53376+
}
53377+
},
53378+
"repositories": {
53379+
"description": "The repositories to add to the cost center.",
53380+
"type": "array",
53381+
"items": {
53382+
"type": "string"
53383+
}
5321453384
}
5321553385
},
5321653386
"minProperties": 1
@@ -53418,15 +53588,15 @@
5341853588
}
5341953589
},
5342053590
"delete": {
53421-
"summary": "Remove users from a cost center",
53422-
"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.",
53591+
"summary": "Remove resources from a cost center",
53592+
"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.",
5342353593
"tags": [
5342453594
"billing"
5342553595
],
5342653596
"operationId": "billing/remove-resource-from-cost-center",
5342753597
"externalDocs": {
5342853598
"description": "API method documentation",
53429-
"url": "https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#remove-users-from-a-cost-center"
53599+
"url": "https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/billing#remove-resources-from-a-cost-center"
5343053600
},
5343153601
"parameters": [
5343253602
{
@@ -53461,6 +53631,20 @@
5346153631
"items": {
5346253632
"type": "string"
5346353633
}
53634+
},
53635+
"organizations": {
53636+
"description": "The organizations to remove from the cost center.",
53637+
"type": "array",
53638+
"items": {
53639+
"type": "string"
53640+
}
53641+
},
53642+
"repositories": {
53643+
"description": "The repositories to remove from the cost center.",
53644+
"type": "array",
53645+
"items": {
53646+
"type": "string"
53647+
}
5346453648
}
5346553649
},
5346653650
"minProperties": 1

0 commit comments

Comments
 (0)