Relay
Create relay
Register a new relay with optional label, provider, and tags. Admin only.
Authorization
bearerAuthorizationBearer token
User session token. Obtained from POST /api/auth/login.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://loading/api/relays" \ -H "Content-Type: application/json" \ -d '{}'{
"data": {
"id": 1,
"label": "EU-West #1",
"provider": "docker",
"provider_id": "a1b2c3d4e5f6",
"max_link": 3,
"tags": [
"eu",
"fast"
],
"connected": true,
"runner": {
"provider_id": "a1b2c3d4e5f6",
"status": "running",
"started_at": 1704067200000,
"meta": {
"image": "nox-relay:latest",
"name": "relay_1_a1b2"
}
},
"created_at": "2024-01-01T00:00:00.000Z",
"status": {
"instances": 2,
"max_instances": 32,
"clients": 10,
"engine": "unity",
"version": "1.0.0",
"protocol": 1,
"uptime": 3600,
"ping": 42,
"specs": {
"processor": 0.12,
"memory": 256,
"upload": 10,
"download": 20
}
},
"lifecycle": {
"type": "persistent"
}
},
"error": null,
"time": 1680000000000,
"request": "/api/endpoint"
}{
"data": null,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found.",
"status": 404
},
"time": 1680000000000,
"request": "/api/endpoint"
}{
"data": null,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found.",
"status": 404
},
"time": 1680000000000,
"request": "/api/endpoint"
}{
"data": null,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found.",
"status": 404
},
"time": 1680000000000,
"request": "/api/endpoint"
}