Appearance
Find allowed resources
Return resources on which the user is allowed to perform the requested action.
| GET | /permissions/resources |
Query parameters
| Name | Type | Description | Required |
|---|---|---|---|
userId | string | Id of the target user or me for the current user | |
resourceType | | "Account" | "Entity" | "Group" | "Policy" | "Whitelist" | "TradelinkCustodian" | "TradelinkEntity" | "TradelinkPledge" | "User" | "UserRegistration" | "Workspace" | "WorkspaceRule" | ||
action | | "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" | Allowed action on the resource | ✅ |
Response schema
{
// User ID
userId: string;// The requested action
action: string;resources: Array<{}>;
}// Type of the resource
resourceType: | "Account"
| "Entity"
| "Group"
| "Policy"
| "Whitelist"
| "TradelinkCustodian"
| "TradelinkEntity"
| "TradelinkPledge"
| "User"
| "UserRegistration"
| "Workspace"
| "WorkspaceRule"
;// ID of resource on which the action is allowed
resourceId: string;Examples
bash
curl \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {jwt}" \
"$API_BASE_URL/permissions/resources"ts
const url = "<base-url>/permissions/resources";
const headers = {
"Content-Type": "application/json",
Authorization: "Bearer <jwt>"
};
fetch(url, { headers }).then(res => {
console.log(res)
});python
import requests
url = "<base-url>/permissions/resources"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer <jwt>"
}
print(requests.get(url, headers=headers))