...
The Authorisations API can be used to view and manage Authorisation objects.
The complete up-to-date API documentation is accessible from the Management API documentation. This article describes some of the basic features with examples.
Creating an Authorisation
A new Authorisation can be created by a client or an user with the required permission to create Authorisations.
...
Paste code macro | ||||
---|---|---|---|---|
| ||||
{ "id": "628b875329795876273eb847", "type": "file_for_permit", "validFrom": "2022-05-23T13:03:21.711Z", "validTo": "2022-06-23T13:03:21.711Z", "revoked": false, "meta": { "created": "2022-05-23T13:08:35.680093Z", "lastModified": "2022-05-23T13:08:35.680093Z" }, "nsCode": "root", "creator": { "type": "ManagementApiClient", "id": "1248769513590337" }, "subject": { "type": "User", "value": "58cfb7353874e103fc81ec5f" }, "object": { "type": "User", "value": "5a325c543874e16a85710c5e" }, "effectiveValidTo": "2022-06-23T13:03:21.711Z", "active": true } |
Listing Authorisations delegated to an User
In this example we list the active Authorisations which have been delegated to a specific User.
...
Paste code macro | ||||
---|---|---|---|---|
| ||||
{ "totalResults": 1, "startIndex": 0, "itemsPerPage": 20, "resources": [ { "id": "628b875329795876273eb847", "type": "file_for_permit", "validFrom": "2022-05-23T13:03:21.711Z", "validTo": "2022-06-23T13:03:21.711Z", "revoked": false, "meta": { "created": "2022-05-23T13:08:35.680Z", "lastModified": "2022-05-23T13:08:35.680Z" }, "nsCode": "root", "creator": { "type": "ManagementApiClient", "id": "1248769513590337" }, "subject": { "type": "User", "value": "58cfb7353874e103fc81ec5f" }, "object": { "type": "User", "value": "5a325c543874e16a85710c5e" }, "effectiveValidTo": "2022-06-23T13:03:21.711Z", "active": true } ] } |
Revoking an Authorisation
In this example we revoke the Authorisation which was created previously. We also give a reason for the revocation.
...