सामग्री पर जाएँ
The Consortium

Risks Index APIOperational

POST_v1_webhooks_id_rotate

Rotate the signing secret

Request

आज़माएँ

Planned: it answers with a typed refusal · No credits

https://api.risksindex.com

POST/v1/webhooks/{id}/rotate

curl -s -X POST "https://api.risksindex.com/v1/webhooks/<id>/rotate" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: <a-unique-key-per-attempt>" \
  -d '{}'
const res = await fetch("https://api.risksindex.com/v1/webhooks/<id>/rotate", { method: "POST", headers: { "Content-Type": "application/json", "Idempotency-Key": "<a-unique-key-per-attempt>" }, body: "{}" });
const { data, meta } = await res.json();
import json, urllib.request

req = urllib.request.Request("https://api.risksindex.com/v1/webhooks/<id>/rotate", data="{}".encode(), method="POST", headers={"Content-Type": "application/json", "Idempotency-Key": "<a-unique-key-per-attempt>"})
with urllib.request.urlopen(req) as res:
    answer = json.load(res)

200 OKapplication/json

{
  "provenance": [
    {
      "repository": "string",
      "commit": "string",
      "path": "string",
      "sha256": "string",
      "licence": "string"
    }
  ]
}

A new secret, answered once; the old one overlaps briefly. Off (503 WEBHOOKS_OFF) until INDEX_API_DATABASE_URL is set; the change feed at /v1/changes carries the same changes. Availability: Planned (answers a typed problem response until built).

Parameters

Parameters

  • idrequired

    path · string

    Webhook id (uuid)

  • Idempotency-Keyoptional

    header · string

    Optional. A value of your own (a UUID is fine) that makes this write safe to retry: the same caller, key and request within 24 hours gets the first answer again, with the header Idempotent-Replayed: true, and the work is not done twice. It applies to a request that carries a credential.

Answers

Responses

  • 200

    An OGC API document (raw OGC shape, not the envelope)

  • 400Problem, RFC 9457

    Bad body. Codes: BAD_BODY, BAD_QUERY, BAD_WEBHOOK

  • 401Problem, RFC 9457

    Authentication required. Codes: AUTH_REQUIRED, TOKEN_INVALID

  • 403Problem, RFC 9457

    Insufficient scope. Codes: INSUFFICIENT_SCOPE

  • 404Problem, RFC 9457

    Not found. Codes: NOT_FOUND, WEBHOOK_NOT_FOUND

  • 409Problem, RFC 9457

    Webhook exists. Codes: WEBHOOK_EXISTS, WEBHOOK_LIMIT

  • 413Problem, RFC 9457

    Body too large. Codes: BODY_TOO_LARGE

  • 414

  • 422Problem, RFC 9457

    Receiver not validated. Codes: WEBHOOK_NOT_VALIDATED, WEBHOOK_URL_REFUSED

  • 429Problem, RFC 9457

    Rate limited. Codes: RATE_LIMITED

  • 500Problem, RFC 9457

    Internal error. Codes: INTERNAL

  • 503Problem, RFC 9457

    Webhooks off. Codes: WEBHOOKS_OFF

शुरू करें

Get a key with a free account, or choose who the account is for, its seats and any council, and see your workstation first.