Skip to main content

List Grants

List every Grant in the realm, without naming a User or Principal.

The Admin API is for your back-office tooling, and its caller is always a machine-to-machine client. Unlike the Consent API's List User Grants and List Principal Grants, this operation is ungrounded: the path names only the Realm, and the collection reaches every Grant in it. It needs the biza-au:haas:admin:read scope (see Admin API scopes).

You can narrow the results with optional query parameters:

  • principalId: only Grants held against this Principal.
  • userId: only Grants held against this User.
  • status: only Grants in the given status (ACTIVE, EXPIRED or REVOKED). Repeat the parameter to ask for more than one, for example status=ACTIVE&status=EXPIRED. Without it, Grants in every status are returned.

Every Grant in the collection has the Grant Type CDR_SHARING_ARRANGEMENT_V1. Machine-to-machine Grants and consumer dashboard logins are a different kind of authorisation artefact: they are not in the collection, and totalRecords never counts them, so paging to the end always yields exactly totalRecords Grants.

Results are paged with page (from 1) and page-size (default 25, at most 1000). Follow the links in the response to move between pages rather than building the URLs yourself, and treat a missing last link as normal.

Read a Grant's state from status, not from expiryTime: a revoked Grant keeps the expiry it was created with.

Admin API​

List Grants​

From the HaaS Admin API 0.0.1-alpha.18. See the full reference.

Loading...