Skip to content
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

[COST-3394] Add documentation for cost groups API #4829

Merged
merged 3 commits into from
Dec 21, 2023
Merged
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
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