Skip to content

Commit

Permalink
[COST-3394] Add documentation for cost groups API (#4829)
Browse files Browse the repository at this point in the history
  • Loading branch information
samdoran committed Dec 21, 2023
1 parent 4ec522a commit 31eee19
Showing 1 changed file with 155 additions and 0 deletions.
155 changes: 155 additions & 0 deletions docs/specs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -5552,6 +5552,98 @@
}]
}
},
"/settings/cost-groups/": {
"get": {
"tags": [
"Settings",
"Cost Groups"
],
"summary": "Query which projects belong to which cost groups",
"operationId": "getSettingsCostGroups",
"parameters": [
{
"$ref": "#/components/parameters/QueryOffset"
},
{
"$ref": "#/components/parameters/QueryLimit"
},
{
"$ref": "#/components/parameters/QueryFilter"
}
],
"responses": {
"200": {
"description": "OpenShift projects and the current cost group",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CostGroupsResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"put": {
"tags": [
"Settings",
"Cost Groups"
],
"summary": "Add projects to a cost group",
"operationId": "putSettingsCostGroups",
"requestBody": {
"$ref": "#/components/requestBodies/CostGroupsBody"
},
"responses": {
"204": {
"description": "Cost groups updated"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"delete": {
"tags": [
"Settings",
"Cost Groups"
],
"summary": "Remove projects from a coust group",
"operationId": "deleteSettingsCostGroups",
"responses": {
"204": {
"description": "Cost groups updated"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/settings/tags/": {
"get": {
"tags": [
Expand Down Expand Up @@ -5993,6 +6085,39 @@
}
}
}
},
"CostGroupsBody": {
"description": "List of project name and cost group",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"project": {
"type": "string"
},
"group": {
"type": "string"
}
}
},
"example": [
{
"project": "accounting",
"group": "Platform"
},
{
"project": "infra",
"group": "Platform"
}
]
}
}
}
}
},
"securitySchemes": {
Expand All @@ -6003,6 +6128,36 @@
}
},
"schemas": {
"CostGroupsResponse": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"properties": {
"project": {
"type": "string"
},
"group": {
"type": "string"
},
"default": {
"type": "boolean"
},
"clusters": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"CostModel": {
"properties": {
"name": {
Expand Down

0 comments on commit 31eee19

Please sign in to comment.