メインコンテンツまでスキップ

保護されたリレー設定を生成する

POST /api/v1/relays/{id}/setup

公開された信頼情報と登録済みリレーの正確な ID を、明示的に選択したローカルリスナーとリソース制限とともに返します。設定は非公開のローカル JSON ファイルに保存してください。認証情報や秘密鍵は返しません。リレー認証情報は別に発行して配送してください。現在の expectedRevision が必要で、廃止済みリレーを拒否し、証明書信頼の読み込み後に認可を再検査します。ソフトウェアのインストール、ファイアウォールルール変更、転送有効化は行いません。

許可されるロール: admin.

認証​

以下の OpenAPI の選択肢は、受け付ける認証方式を示します。ブラウザーからの変更には、正規の Origin ヘッダーも必要です。

[
{
"organizationCredential": []
},
{
"browserSession": []
}
]

パラメーター​

[
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
]

リクエスト本文​

{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"expectedRevision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740990
},
"listenAddress": {
"type": "string",
"maxLength": 45
},
"listenPort": {
"type": "integer",
"minimum": 1024,
"maximum": 65535
},
"bootstrapListenPort": {
"type": "integer",
"minimum": 1024,
"maximum": 65535
},
"limits": {
"type": "object",
"properties": {
"connections": {
"type": "integer",
"minimum": 1,
"maximum": 256
},
"per_agent": {
"type": "integer",
"minimum": 1,
"maximum": 8
},
"seconds": {
"type": "integer",
"minimum": 1,
"maximum": 300
},
"bytes": {
"type": "integer",
"minimum": 1,
"maximum": 1073741824
}
},
"required": [
"connections",
"per_agent",
"seconds",
"bytes"
],
"additionalProperties": false
}
},
"required": [
"expectedRevision",
"listenAddress",
"listenPort",
"limits"
],
"additionalProperties": false
}
}
}
}

レスポンス​

{
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"relayRevision": {
"type": "integer",
"minimum": 0
},
"configuration": {
"$ref": "#/components/schemas/RelaySetupConfiguration"
}
},
"required": [
"relayRevision",
"configuration"
]
}
}
}
},
"400": {
"description": "Validation error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Missing/expired/revoked credential",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Insufficient role",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"409": {
"description": "State or idempotency conflict",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"413": {
"description": "Body too large",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"415": {
"description": "Unsupported media type",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"429": {
"description": "Request budget exhausted; respect Retry-After",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"headers": {
"Retry-After": {
"schema": {
"type": "integer",
"minimum": 1
},
"description": "Seconds until sufficient budget is expected; concurrent traffic may consume replenished capacity."
}
}
},
"500": {
"description": "Internal error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"503": {
"description": "Not configured",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}

#/components/schemas/Asset などの参照は、共有スキーマで解決されます。クライアント生成には OpenAPI コントラクトをダウンロードしてください。このページは生成されたもので、計画中のエンドポイントではなく、実装済みの開発 API を説明します。