Creative Webhooks

Webhook 署名シークレットをローテーション

新しい whsec_ 署名シークレットを発行し、全文を一度だけ返します。旧シークレットは 24 時間後の rotation.previous_valid_until まで併用され、その間の配信は新旧両方で署名します。期限までに受信側を新しいシークレットへ切り替えます。期限内に再度ローテーションすると、直前のシークレットだけが併用対象になります。

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

Authorizations

Satisfy one of these options:

  • bearerAuth
  • x-api-key
  • Session cookie

Authentication details

bearer
Authorization

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

Response

application/json

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

Headers

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>",    "rotation": null  }}
dataobjectrequired

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

data.scopestringrequired

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

data.versionintegerrequired

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

data.fingerprintstringrequired

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

data.secretstringrequired

通知の署名検証に使う秘密値。サーバーで保管し、ログやクライアントに出さないでください。

data.rotationWebhookSigningRotation | nullrequired

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

data.rotation.previous_versioninteger | nullrequired

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

data.rotation.previous_fingerprintstring | nullrequired

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

data.rotation.previous_valid_untilstring | nullrequiredformat:date-time

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