Skip to content

Get allowed actions

Return actions allowed to the user on one or more resources.

GET/permissions/allowed-actions

Query parameters

NameTypeDescriptionRequired
userId
string
Id of the target user or me for the current user
resourceType
| "ACCOUNT"
| "ENTITY"
| "GROUP"
| "POLICY"
| "WHITELIST"
| "TRADELINK_CUSTODIAN"
| "TRADELINK_ENTITY"
| "TRADELINK_PLEDGE"
| "WORKSPACE"
| "WORKSPACE_RULE"
resourceId
string

Response schema

{
// User ID
userId: string;
// Allowed actions on resource
allowedActions: Array<
| "READ"
| "EDIT"
| "SEND"
| "STAKE"
| "DEPLOY_CONTRACT"
| "EXECUTE_CONTRACT"
| "ACTIVATE_TOKEN"
| "RECEIVE"
| "SIGN_MESSAGE"
| "SIGN_DIGESTS"
| "TRADELINK_PLEDGE"
| "TRADELINK_REPLEDGE"
| "TRADELINK_FORCE_UNPLEDGE"
| "TRADELINK_SETTLE"
| "TRADELINK_WITHDRAW"
| "TRADELINK_ARBITRATE"
| "CREATE_ACCOUNT_WITH_POLICY"
>
;
}

Examples

bash
curl \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {jwt}" \
  "$API_BASE_URL/permissions/allowed-actions"
ts
const url = "<base-url>/permissions/allowed-actions";

const headers = {
  "Content-Type": "application/json",
  Authorization: "Bearer <jwt>"
};

fetch(url, { headers }).then(res => {
  console.log(res)
});
python
import requests

url = "<base-url>/permissions/allowed-actions"

headers = {
  "Content-Type": "application/json",
  "Authorization": "Bearer <jwt>"
}

print(requests.get(url, headers=headers))