Skip to content
Open
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
349 changes: 346 additions & 3 deletions api-docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "REST API for Cosmos Cloud server management",
"title": "Cosmos Server API",
"contact": {},
"version": "0.22.0-unstable16"
"version": "0.22.9"
},
"paths": {
"/_logs": {
Expand Down Expand Up @@ -3995,6 +3995,310 @@
}
}
},
"/api/groups": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns all custom role groups (role ID >= 3)",
"tags": [
"groups"
],
"summary": "List all groups",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.APIResponse"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Creates a new custom role group with name and permissions (Pro feature)",
"tags": [
"groups"
],
"summary": "Create a new group",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/pro.CreateGroupRequest"
}
}
},
"description": "Group creation details",
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.APIResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
}
}
}
},
"/api/groups/{id}": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates an existing group's name or permissions (Pro feature)",
"tags": [
"groups"
],
"summary": "Update a group",
"parameters": [
{
"description": "Group ID",
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/pro.UpdateGroupRequest"
}
}
},
"description": "Fields to update",
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.APIResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Deletes a custom role group. Fails if users are still assigned to it. (Pro feature)",
"tags": [
"groups"
],
"summary": "Delete a group",
"parameters": [
{
"description": "Group ID",
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.APIResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
}
}
}
},
"/api/image/{name}": {
"get": {
"security": [
Expand Down Expand Up @@ -9899,8 +10203,7 @@
"type": "object",
"required": [
"deviceName",
"ip",
"nickname"
"ip"
],
"properties": {
"PublicHostname": {
Expand Down Expand Up @@ -11077,6 +11380,37 @@
"type": "integer",
"format": "uint32"
},
"pro.CreateGroupRequest": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/utils.Permission"
}
}
}
},
"pro.UpdateGroupRequest": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/utils.Permission"
}
}
}
},
"storage.FormatDiskJSON": {
"type": "object",
"required": [
Expand Down Expand Up @@ -11606,6 +11940,9 @@
"type": "string"
}
},
"NATSReplicas": {
"type": "integer"
},
"constellationHostname": {
"type": "string"
},
Expand Down Expand Up @@ -12039,6 +12376,12 @@
"target"
],
"properties": {
"AdditionalTargets": {
"type": "array",
"items": {
"type": "string"
}
},
"LBMode": {
"type": "string"
},
Expand Down
Loading