SDK reference · Python SDK

prov.trace.disclosure.approve

prov.trace.disclosure.approve in Python SDK.

Signature

prov.trace.disclosure.approve(request_id: str, ttl_days: Optional[int] = …) -> Any

Parameters

request_idstrRequired
ttl_daysOptional[int]

Request fields

Idempotency-Keystringheader
Retry a create safely: the same key + request returns the stored response (24 h, per caller).
idstringpathRequired
The object's ID.
ttl_daysinteger
Default: your account's default_ttl_days.

Returns

Any The request, now granted, with when the grant ends.

HTTP operation

POST /v1/trace/disclosure_requests/{id}/approve: Grant a disclosure request

Errors

Example

const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/trace/disclosure_requests/dsr_01M5Q2KD3N7V4Y9W1XQ2B8R6TS/approve`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "ttl_days": 3 }),
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.