Webhook

Webhook 署名シークレットを取得

Webhook 検証用の whsec_ 署名シークレットの世代と指紋を取得します。シークレットはワークスペースごとに 1 つで、作成後の最初の取得とローテーションの応答だけが secret を全文で返し、以降の取得では null を返します。値を失った場合はローテーションします。シークレットをログへ出力しないでください。

GET
/v1/creative/webhooks/signing-secret
Alpha
curl --request GET 'https://api.orchestor.io/v1/creative/webhooks/signing-secret' \  --header "Authorization: Bearer $ORCHESTOR_API_KEY"
{  "data": {    "scope": "workspace",    "version": 1,    "fingerprint": "sha256:0123456789abcdef",    "secret": "<WEBHOOK_SIGNING_SECRET>"  }}

認証

次のいずれかの条件を満たしてください。

  • bearerAuth
  • x-api-key
  • Session cookie

認証の詳細

bearer
Authorization

外部 API キー。session は受け付けません。apiKey と同時に送ると 401 です。

レスポンス

application/json

署名検証用シークレットと世代情報。secret はサーバー側で保管し、ローテーション時は rotation の旧世代有効期限を確認します。

ヘッダー

x-orchestor-request-idstringheader

HTTP リクエストの相関 ID。ジョブの request_id とは別の値。

ratelimit-limitintegerheader

現在の期間で許可されるリクエスト数。

ratelimit-remainingintegerheader

現在の期間で残っているリクエスト数。

ratelimit-resetintegerheader

制限がリセットされるまでの秒数。

retry-afterintegerheader

再試行までの待機秒数。

{  "data": {    "scope": "workspace",    "version": 1,    "fingerprint": "sha256:0123456789abcdef",    "secret": "<WEBHOOK_SIGNING_SECRET>"  }}
dataobject必須

この操作が返す結果。形状は以下の子フィールドを参照してください。

data.scopestring必須

署名シークレットが適用されるワークスペースの範囲。

data.versioninteger必須

署名シークレットの世代番号。

data.fingerprintstring必須

署名シークレットを識別する指紋。値をログに残す際は secret の代わりに使います。

data.secretstring | null必須

通知の署名検証に使う whsec_ で始まる秘密値。作成後の最初の取得だけが返し、以降は null です。サーバーで保管し、ログやクライアントに出さないでください。

data.rotationWebhookSigningRotation | null

ローテーション中の旧シークレットの世代と有効期限。

data.rotation.previous_versioninteger | null必須

併用できる旧シークレットの世代。旧世代がなければ null。

data.rotation.previous_fingerprintstring | null必須

併用できる旧シークレットの指紋。旧世代がなければ null。

data.rotation.previous_valid_untilstring | null必須形式:date-time

旧シークレットの有効期限。期限後は新しい世代だけで検証します。