0.37.0
This commit is contained in:
1 parent
ad0ff60632
commit
6b59434ffa
60 files changed
+7418
-732
No files matched your search
+678
-6
@@ -2,7 +2,7 @@
|
||||
"openapi": "3.0.3",
|
||||
"info": {
|
||||
"title": "RustProxy Administration API",
|
||||
"version": "0.36.13",
|
||||
"version": "0.37.0",
|
||||
"description": "Administration API for the active panel origin. Sign in through the panel; the same-origin HttpOnly cookie authenticates all private operations. Mutations also require the exact Origin, X-RustProxy-Request: 1 and a session-bound X-CSRF-Token. Loopback HTTP is the default; Settings can enable HTTPS before using a non-loopback administration bind. This document contains no live configuration or credentials. Object schemas marked extensible are summaries: full configuration validation is authoritative in Rust. The API also permits explicitly scoped GeneralApiBearer tokens on a narrow route allowlist, with RO/RW and source CIDR checks; API-token management and Prometheus-token management are browser-session-only."
|
||||
},
|
||||
"servers": [
|
||||
@@ -1703,6 +1703,67 @@
|
||||
},
|
||||
"description": "Configured Docker runtime pool IDs mapped to their primary proxied hostname."
|
||||
},
|
||||
"docker": {
|
||||
"type": "object",
|
||||
"nullable": true,
|
||||
"description": "Compact Docker agent summary for the optional Overview Docker cards (null without agents). Also included in the live view.",
|
||||
"properties": {
|
||||
"agents": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"observed": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"ok": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"checked_at_unix_ms": {
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
"services": {
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
},
|
||||
"published_pool_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"missing_services": {
|
||||
"type": "integer"
|
||||
},
|
||||
"system": {
|
||||
"nullable": true,
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/DockerSystemInfo"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"alerts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/DockerAlert"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"software_update": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3136,7 +3197,13 @@
|
||||
"hostname": {
|
||||
"type": "string",
|
||||
"maxLength": 253,
|
||||
"description": "Primary Docker vhost name. A single DNS label is expanded under the agent base_domain; an FQDN is used as-is."
|
||||
"description": "Primary Docker vhost name. A single DNS label is expanded under the assignment's master domain; an FQDN is used as-is (the panel requires it to be inside the agent domains)."
|
||||
},
|
||||
"domain": {
|
||||
"type": "string",
|
||||
"maxLength": 253,
|
||||
"nullable": true,
|
||||
"description": "Master domain of this assignment; must be one of the agent domains. Defaults to the first agent domain."
|
||||
},
|
||||
"aliases": {
|
||||
"type": "array",
|
||||
@@ -3144,7 +3211,7 @@
|
||||
"type": "string",
|
||||
"maxLength": 253
|
||||
},
|
||||
"description": "Additional labels or FQDN aliases for the same dynamic vhost."
|
||||
"description": "Additional labels or FQDN aliases for the same dynamic vhost. Labels are expanded under the master domain."
|
||||
},
|
||||
"target_ip": {
|
||||
"type": "string",
|
||||
@@ -3302,9 +3369,20 @@
|
||||
"maxLength": 512,
|
||||
"description": "Bearer token shared only with this Docker agent."
|
||||
},
|
||||
"domains": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"maxItems": 16,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"maxLength": 253
|
||||
},
|
||||
"description": "DNS suffixes assigned to this agent (since 0.37.0), such as docker1.lab.local or example.com. The first entry is the default master domain of new assignments. Short Docker vhost names and aliases are expanded below the assignment's master domain."
|
||||
},
|
||||
"base_domain": {
|
||||
"type": "string",
|
||||
"description": "Per-agent DNS suffix such as docker1.lab.local. Short Docker vhost names are expanded below this domain; full FQDNs may use any operator-controlled domain."
|
||||
"deprecated": true,
|
||||
"description": "Legacy single DNS suffix (before 0.37.0). Accepted on input and migrated into domains; no longer written."
|
||||
},
|
||||
"default_target_ip": {
|
||||
"type": "string",
|
||||
@@ -3339,11 +3417,21 @@
|
||||
"default": 30,
|
||||
"description": "How often RustProxy polls this agent for Docker inventory. Manual refresh bypasses this interval."
|
||||
},
|
||||
"certificate_ids": {
|
||||
"type": "array",
|
||||
"maxItems": 32,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"maxLength": 64
|
||||
},
|
||||
"description": "Certificates RustProxy may use for this agent's vhosts. Empty means automatic selection (global SNI / default certificate). Otherwise each generated vhost uses the listed certificate covering all its names (exact names win, then the narrowest certificate); when none covers them the generic SNI/default certificate is used, unless the assignment forces a mismatch (then the first listed certificate)."
|
||||
},
|
||||
"certificate_id": {
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"maxLength": 64,
|
||||
"description": "Optional configured TLS certificate assigned to every generated vhost for this Docker agent."
|
||||
"description": "Legacy single certificate (before 0.37.0). Accepted on input and migrated into certificate_ids; no longer written.",
|
||||
"deprecated": true
|
||||
},
|
||||
"acl_profile_id": {
|
||||
"type": "string",
|
||||
@@ -3359,6 +3447,11 @@
|
||||
"maxLength": 64
|
||||
},
|
||||
"description": "Up to 8 additional reusable ACL profiles. Explicit IP denies and country blocks beat all allows; otherwise explicit allows combine as OR; unmatched defaults require unanimous allow. Legacy acl_profile_id is still honored. Inline and global policies remain cumulative."
|
||||
},
|
||||
"label_publish": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Publish containers with the rustproxy.enable=true label automatically (rustproxy.host, domain, aliases, scheme, port, force_ssl, websockets, cache, compression, preserve_host). Names must stay inside the agent domains and must not collide with existing hosts; an explicit assignment for the same service always wins."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -3366,7 +3459,6 @@
|
||||
"name",
|
||||
"endpoint",
|
||||
"token",
|
||||
"base_domain",
|
||||
"listener_ids"
|
||||
]
|
||||
},
|
||||
@@ -3380,6 +3472,9 @@
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/DockerAgent"
|
||||
}
|
||||
},
|
||||
"alerts": {
|
||||
"$ref": "#/components/schemas/DockerAlertSettings"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3416,6 +3511,21 @@
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/DockerBinding"
|
||||
}
|
||||
},
|
||||
"labels": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "rustproxy.* container labels (agent 1.1.0+, only with ?system=1)."
|
||||
},
|
||||
"container": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/DockerContainerState"
|
||||
}
|
||||
],
|
||||
"description": "Container state, health, restarts, CPU and memory (agent 1.1.0+)."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -3467,6 +3577,14 @@
|
||||
"certificate_sha256": {
|
||||
"type": "string",
|
||||
"description": "SHA-256 fingerprint of the certificate used by the agent HTTPS listener. Empty only when the agent is intentionally running without TLS."
|
||||
},
|
||||
"system": {
|
||||
"nullable": true,
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/DockerSystemInfo"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -3505,6 +3623,10 @@
|
||||
}
|
||||
],
|
||||
"nullable": true
|
||||
},
|
||||
"last_ok_unix_ms": {
|
||||
"type": "integer",
|
||||
"nullable": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -3534,6 +3656,29 @@
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/DockerPoolRoute"
|
||||
}
|
||||
},
|
||||
"alerts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/DockerAlert"
|
||||
}
|
||||
},
|
||||
"label_issues": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"agent_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"service_key": {
|
||||
"type": "string"
|
||||
},
|
||||
"error": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -3678,6 +3823,22 @@
|
||||
},
|
||||
"pool_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"source": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"labels"
|
||||
],
|
||||
"description": "Present for services published from container labels."
|
||||
},
|
||||
"assignment": {
|
||||
"$ref": "#/components/schemas/DockerAssignment"
|
||||
},
|
||||
"hosts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -3945,6 +4106,30 @@
|
||||
"stream_traffic",
|
||||
"stream_sessions",
|
||||
"stream_backend_health",
|
||||
"docker_agents",
|
||||
"docker_apps",
|
||||
"docker_requests",
|
||||
"docker_host_network",
|
||||
"docker_host_load",
|
||||
"docker_containers",
|
||||
"docker_agents_2",
|
||||
"docker_apps_2",
|
||||
"docker_requests_2",
|
||||
"docker_host_network_2",
|
||||
"docker_host_load_2",
|
||||
"docker_containers_2",
|
||||
"docker_agents_3",
|
||||
"docker_apps_3",
|
||||
"docker_requests_3",
|
||||
"docker_host_network_3",
|
||||
"docker_host_load_3",
|
||||
"docker_containers_3",
|
||||
"docker_agents_4",
|
||||
"docker_apps_4",
|
||||
"docker_requests_4",
|
||||
"docker_host_network_4",
|
||||
"docker_host_load_4",
|
||||
"docker_containers_4",
|
||||
"backend_health",
|
||||
"backend_activity",
|
||||
"backend_errors",
|
||||
@@ -4033,6 +4218,30 @@
|
||||
"stream_traffic",
|
||||
"stream_sessions",
|
||||
"stream_backend_health",
|
||||
"docker_agents",
|
||||
"docker_apps",
|
||||
"docker_requests",
|
||||
"docker_host_network",
|
||||
"docker_host_load",
|
||||
"docker_containers",
|
||||
"docker_agents_2",
|
||||
"docker_apps_2",
|
||||
"docker_requests_2",
|
||||
"docker_host_network_2",
|
||||
"docker_host_load_2",
|
||||
"docker_containers_2",
|
||||
"docker_agents_3",
|
||||
"docker_apps_3",
|
||||
"docker_requests_3",
|
||||
"docker_host_network_3",
|
||||
"docker_host_load_3",
|
||||
"docker_containers_3",
|
||||
"docker_agents_4",
|
||||
"docker_apps_4",
|
||||
"docker_requests_4",
|
||||
"docker_host_network_4",
|
||||
"docker_host_load_4",
|
||||
"docker_containers_4",
|
||||
"backend_health",
|
||||
"backend_activity",
|
||||
"backend_errors",
|
||||
@@ -4148,6 +4357,30 @@
|
||||
"stream_traffic",
|
||||
"stream_sessions",
|
||||
"stream_backend_health",
|
||||
"docker_agents",
|
||||
"docker_apps",
|
||||
"docker_requests",
|
||||
"docker_host_network",
|
||||
"docker_host_load",
|
||||
"docker_containers",
|
||||
"docker_agents_2",
|
||||
"docker_apps_2",
|
||||
"docker_requests_2",
|
||||
"docker_host_network_2",
|
||||
"docker_host_load_2",
|
||||
"docker_containers_2",
|
||||
"docker_agents_3",
|
||||
"docker_apps_3",
|
||||
"docker_requests_3",
|
||||
"docker_host_network_3",
|
||||
"docker_host_load_3",
|
||||
"docker_containers_3",
|
||||
"docker_agents_4",
|
||||
"docker_apps_4",
|
||||
"docker_requests_4",
|
||||
"docker_host_network_4",
|
||||
"docker_host_load_4",
|
||||
"docker_containers_4",
|
||||
"backend_health",
|
||||
"backend_activity",
|
||||
"backend_errors",
|
||||
@@ -4224,6 +4457,30 @@
|
||||
"stream_traffic",
|
||||
"stream_sessions",
|
||||
"stream_backend_health",
|
||||
"docker_agents",
|
||||
"docker_apps",
|
||||
"docker_requests",
|
||||
"docker_host_network",
|
||||
"docker_host_load",
|
||||
"docker_containers",
|
||||
"docker_agents_2",
|
||||
"docker_apps_2",
|
||||
"docker_requests_2",
|
||||
"docker_host_network_2",
|
||||
"docker_host_load_2",
|
||||
"docker_containers_2",
|
||||
"docker_agents_3",
|
||||
"docker_apps_3",
|
||||
"docker_requests_3",
|
||||
"docker_host_network_3",
|
||||
"docker_host_load_3",
|
||||
"docker_containers_3",
|
||||
"docker_agents_4",
|
||||
"docker_apps_4",
|
||||
"docker_requests_4",
|
||||
"docker_host_network_4",
|
||||
"docker_host_load_4",
|
||||
"docker_containers_4",
|
||||
"backend_health",
|
||||
"backend_activity",
|
||||
"backend_errors",
|
||||
@@ -4514,6 +4771,14 @@
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Account-scoped Stored Logs sort direction."
|
||||
},
|
||||
"docker_widget_agents": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"maxLength": 64
|
||||
},
|
||||
"description": "Account-scoped agent shown by each optional Docker Overview card (card ID → Docker agent ID). A missing card uses all agents."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -8077,6 +8342,213 @@
|
||||
"section",
|
||||
"value"
|
||||
]
|
||||
},
|
||||
"DockerSystemInfo": {
|
||||
"type": "object",
|
||||
"description": "Optional host diagnostics reported by Docker agent 1.1.0+ when RustProxy 0.37.0+ requests /v1/inventory?system=1. Every field is optional; unknown fields are ignored.",
|
||||
"properties": {
|
||||
"os": {
|
||||
"type": "string"
|
||||
},
|
||||
"kernel": {
|
||||
"type": "string"
|
||||
},
|
||||
"arch": {
|
||||
"type": "string"
|
||||
},
|
||||
"runtime": {
|
||||
"type": "string",
|
||||
"description": "docker or podman"
|
||||
},
|
||||
"runtime_version": {
|
||||
"type": "string"
|
||||
},
|
||||
"uptime_seconds": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"load1": {
|
||||
"type": "number"
|
||||
},
|
||||
"load5": {
|
||||
"type": "number"
|
||||
},
|
||||
"load15": {
|
||||
"type": "number"
|
||||
},
|
||||
"cpu_count": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"cpu_percent": {
|
||||
"type": "number",
|
||||
"description": "Host CPU usage between two inventory requests (0-100)."
|
||||
},
|
||||
"memory_total_bytes": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"memory_available_bytes": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"swap_total_bytes": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"swap_free_bytes": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"disk_total_bytes": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "Container data directory filesystem (or /)."
|
||||
},
|
||||
"disk_free_bytes": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"network_rx_bytes": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "Host interfaces without loopback and container/virtual links."
|
||||
},
|
||||
"network_tx_bytes": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"network_rx_bytes_per_second": {
|
||||
"type": "number"
|
||||
},
|
||||
"network_tx_bytes_per_second": {
|
||||
"type": "number"
|
||||
},
|
||||
"containers_running": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"containers_total": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"images": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"DockerAlertSettings": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"disk_percent": {
|
||||
"type": "integer",
|
||||
"minimum": 50,
|
||||
"maximum": 100,
|
||||
"default": 90
|
||||
},
|
||||
"memory_percent": {
|
||||
"type": "integer",
|
||||
"minimum": 50,
|
||||
"maximum": 100,
|
||||
"default": 95
|
||||
},
|
||||
"load_per_cpu": {
|
||||
"type": "number",
|
||||
"minimum": 0.1,
|
||||
"maximum": 64,
|
||||
"default": 2.0,
|
||||
"description": "5-minute load average divided by logical CPUs."
|
||||
},
|
||||
"service_missing": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"container_unhealthy": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"DockerAlert": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"severity": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"warning",
|
||||
"error"
|
||||
]
|
||||
},
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"agent_offline",
|
||||
"disk_high",
|
||||
"memory_high",
|
||||
"load_high",
|
||||
"service_missing",
|
||||
"container_unhealthy",
|
||||
"label_invalid"
|
||||
]
|
||||
},
|
||||
"agent_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"agent_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"service": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "number"
|
||||
},
|
||||
"threshold": {
|
||||
"type": "number"
|
||||
},
|
||||
"since_unix_ms": {
|
||||
"type": "integer"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"DockerContainerState": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"state": {
|
||||
"type": "string"
|
||||
},
|
||||
"health": {
|
||||
"type": "string",
|
||||
"description": "healthy, unhealthy, starting, none (no HEALTHCHECK defined) or empty when unknown."
|
||||
},
|
||||
"restart_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"cpu_percent": {
|
||||
"type": "number"
|
||||
},
|
||||
"memory_bytes": {
|
||||
"type": "integer"
|
||||
},
|
||||
"memory_limit_bytes": {
|
||||
"type": "integer"
|
||||
},
|
||||
"started_at": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -14702,6 +15174,206 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/docker/test": {
|
||||
"post": {
|
||||
"summary": "Test a Docker agent connection before saving",
|
||||
"tags": [
|
||||
"Docker"
|
||||
],
|
||||
"operationId": "post_api_docker_test",
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"endpoint",
|
||||
"token"
|
||||
],
|
||||
"properties": {
|
||||
"endpoint": {
|
||||
"type": "string"
|
||||
},
|
||||
"token": {
|
||||
"type": "string"
|
||||
},
|
||||
"tls_fingerprint_sha256": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Result of one inventory request; ok=false carries the error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ok": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"elapsed_ms": {
|
||||
"type": "integer"
|
||||
},
|
||||
"agent_version": {
|
||||
"type": "string"
|
||||
},
|
||||
"hostname": {
|
||||
"type": "string"
|
||||
},
|
||||
"services": {
|
||||
"type": "integer"
|
||||
},
|
||||
"certificate_sha256": {
|
||||
"type": "string"
|
||||
},
|
||||
"runtime": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"error": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Authentication required or revoked",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Host, origin or CSRF validation failed",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Invalid request",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/docker/enroll": {
|
||||
"post": {
|
||||
"summary": "Redeem a one-time Docker agent provisioning code",
|
||||
"tags": [
|
||||
"Docker"
|
||||
],
|
||||
"operationId": "post_api_docker_enroll",
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"endpoint",
|
||||
"tls_fingerprint_sha256",
|
||||
"enrollment_token"
|
||||
],
|
||||
"properties": {
|
||||
"endpoint": {
|
||||
"type": "string",
|
||||
"description": "https:// endpoint from the RPDA1 v2 code"
|
||||
},
|
||||
"tls_fingerprint_sha256": {
|
||||
"type": "string"
|
||||
},
|
||||
"enrollment_token": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Permanent agent token",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"token": {
|
||||
"type": "string",
|
||||
"description": "Permanent Bearer token returned by the agent over the pinned TLS connection."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Authentication required or revoked",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Host, origin or CSRF validation failed",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Invalid request",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"502": {
|
||||
"description": "The agent rejected the code (expired, used or wrong) or could not be reached",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": []
|
||||
|
||||
Reference in new issue
Block a user