SDK reference · Python SDK

prov.webhooks.delete

prov.webhooks.delete in Python SDK.

Signature

prov.webhooks.delete(endpoint_id: str) -> Any

Parameters

endpoint_idstrRequired

Request fields

idstringpathRequired
The object's ID.

Returns

Any The deleted object.

HTTP operation

DELETE /v1/webhook_endpoints/{id}: Delete a webhook endpoint

Errors

Example

const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "url": "http://localhost:4242/webhooks",
    "event_types": [
      "mandate.approval.approved"
    ]
  }),
})).json();
const endpointId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/webhook_endpoints/${endpointId}`, {
  method: "DELETE",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.