SDK reference · Python SDK
prov.mandate.grants.list
prov.mandate.grants.list in Python SDK.
Signature
prov.mandate.grants.list(**query: Any = …) -> AnyParameters
**queryAny
Request fields
qstringquery- Search text. Matches when the grant's ID, its agent's ID, its agent session, its purpose or its run's ID contains it, ignoring case. At most 200 characters.
statusarray of enumsquery- Only grants in these statuses. One value, or several separated by commas.
agent_idstringquery- Only grants this registered agent holds.
sortenumquery- The order of the list:
created,spent(this budget window) orends(when the grant expires), with-in front for descending. Newest first when omitted. A grant with no budget sorts last byspent. Anext_cursorcarries its order; pass it back with the samesort. One ofcreated,-created,spent,-spent,ends,-ends.
Returns
Any The account's mandates, each with its remaining budget.
HTTP operation
GET /v1/mandate/grants: List mandates
Errors
Example
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/grants`, {
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.get(f"{api}/v1/mandate/grants", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()