Initial Labels Page & API

This commit is contained in:
allanice001
2025-09-03 17:09:39 +01:00
parent 26aef56d1d
commit b99a0684fd
20 changed files with 834 additions and 109 deletions

View File

@@ -949,6 +949,233 @@
}
}
},
"/api/v1/labels/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns one label. Add `include=node_pools` to include node groups.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"labels"
],
"summary": "Get label by ID (org scoped)",
"parameters": [
{
"type": "string",
"description": "Organization UUID",
"name": "X-Org-ID",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Label ID (UUID)",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Optional: node_pools",
"name": "include",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/labels.labelResponse"
}
},
"400": {
"description": "invalid id",
"schema": {
"type": "string"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"type": "string"
}
},
"403": {
"description": "organization required",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "fetch failed",
"schema": {
"type": "string"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Permanently deletes the label.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"labels"
],
"summary": "Delete label (org scoped)",
"parameters": [
{
"type": "string",
"description": "Organization UUID",
"name": "X-Org-ID",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Label ID (UUID)",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content",
"schema": {
"type": "string"
}
},
"400": {
"description": "invalid id",
"schema": {
"type": "string"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"type": "string"
}
},
"403": {
"description": "organization required",
"schema": {
"type": "string"
}
},
"500": {
"description": "delete failed",
"schema": {
"type": "string"
}
}
}
},
"patch": {
"security": [
{
"BearerAuth": []
}
],
"description": "Partially update label fields.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"labels"
],
"summary": "Update label (org scoped)",
"parameters": [
{
"type": "string",
"description": "Organization UUID",
"name": "X-Org-ID",
"in": "header",
"required": true
},
{
"type": "string",
"description": "Label ID (UUID)",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Fields to update",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/labels.updateLabelRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/labels.labelResponse"
}
},
"400": {
"description": "invalid id / invalid json",
"schema": {
"type": "string"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"type": "string"
}
},
"403": {
"description": "organization required",
"schema": {
"type": "string"
}
},
"404": {
"description": "not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "update failed",
"schema": {
"type": "string"
}
}
}
}
},
"/api/v1/node-pools": {
"get": {
"security": [
@@ -3643,6 +3870,17 @@
}
}
},
"labels.updateLabelRequest": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"models.Member": {
"type": "object",
"properties": {