Skip to content

Every grant over the account, live and revoked: the operator's, or the account owner's (REQ-RC-7).

GET
/v1/accounts/{account}/grants
curl --request GET \
--url https://example.com/v1/accounts/example/grants \
--header 'Authorization: Bearer <token>'
account
required
string

A did:aledgent identifier.

The answer, from one consistent view (REQ-QR-2).

Media typeapplication/json

grants(account) (REQ-RC-7): every grant whose subject is the account, live and revoked.

object
account
required

The account, did:-shaped.

string
items
required

Its grants, in identifier order.

Array<object>

One grant over an account, as grants(account) shows it (REQ-RC-7).

object
grant
required

The grant, did:-shaped.

string
granted_at
required

When it was granted.

integer format: uint64
grantor
required

Who granted it.

string
revoked

When it was revoked, if it was.

integer | null format: uint64
terms
required

What it says: kind, holder, subject, operations, bounds, expiry.

object
assets

The assets it is limited to.

Array<string> | null
counterparties

The counterparties it is limited to.

Array<string> | null
expires

When it stops working.

integer | null format: uint64
kind
required
One of:

Granted by a holder, or narrowed from such a grant.

string
Allowed value: delegated
ops
required

What it may be used for.

Array
parent

The grant it narrows.

string | null
per_operation

The most one operation may move, in minor units.

string | null
per_window
Any of:

A per-window bound.

object
length
required

The window’s length, in milliseconds.

integer format: uint64
limit
required

The most that may move in one window, in minor units.

string
principal
required

Who will hold it.

string
subject
required
One of:

One ledger account.

object
account
required
string
Example
{
"items": [
{
"terms": {
"kind": "delegated",
"ops": [
"transfer"
],
"subject": "delegated_accounts"
}
}
]
}

Refused, with the named condition. The status is the alternative’s x-http-status.

Media typeapplication/json
One of:
ERR-NotAuthorised
object
description
required
Allowed value: The initiating principal holds no authority that covers this operation, account, asset or bound
error
required
Allowed value: ERR-NotAuthorised
Example
{
"description": "The initiating principal holds no authority that covers this operation, account, asset or bound",
"error": "ERR-NotAuthorised"
}

Refused, with the named condition. The status is the alternative’s x-http-status.

Media typeapplication/json
One of:
ERR-NotAuthorised
object
description
required
Allowed value: The initiating principal holds no authority that covers this operation, account, asset or bound
error
required
Allowed value: ERR-NotAuthorised
Example
{
"description": "The initiating principal holds no authority that covers this operation, account, asset or bound",
"error": "ERR-NotAuthorised"
}
Retry-After
integer

On ERR-DecisionUnavailable (503): seconds to wait before retrying with the same client key (DEC-27 (g)).