Endpoint | Description | Type |
/users | Return all users | GET |
Return user by a public key | GET | |
Return all groups of a user | GET |
GET /users
Name | Type | Description | Required |
page | int | The number of the page that will be returned. | No |
limit | int | The number of resources per page. | No |
publicKey | string | String by which should search for resources (allows wildcard %) | No |
curl https://api.protokol.com/api/guardian/users
{"meta": {"totalCountIsEstimate": false,"count": 1,"pageCount": 1,"totalCount": 1,"next": null,"previous": null,"self": "/guardian/users?publicKey=032%25&page=1&limit=100","first": "/guardian/users?publicKey=032%25&page=1&limit=100","last": "/guardian/users?publicKey=032%25&page=1&limit=100"},"data": [{"publicKey": "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37","groups": ["group name"],"allow": [{"transactionType": 0,"transactionTypeGroup": 9002}],"deny": []}]}
GET /users/{id}
Name | Type | Description | Required |
id | string | Public Key of the user | Yes |
curl https://api.protokol.com/api/guardian/users/03c11f2a1fc02c88cd9b8db5272cba390bdb9ce3e1d58355de1b7a24c673e06ebc
{"data": {"publicKey": "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37","groups": ["group name"],"permissions": [{"kind": 1,"types": [{"transactionType": 1,"transactionTypeGroup": 9002}]}]}}
GET /users/{id}/groups
Name | Type | Description | Required |
id | string | Public Key of the user | Yes |
curl https://api.protokol.com/api/guardian/users/03c11f2a1fc02c88cd9b8db5272cba390bdb9ce3e1d58355de1b7a24c673e06ebc/groups
{"data": [{"name": "group name","priority": 1,"active": true,"default": true,"allow": [{"transactionType": 1,"transactionTypeGroup": 9002}],"deny": []}]}