Farzad Soltani
08/08/2023, 8:13 AM/api/check
endpoint:
{
"principal": {
"id": "user_1", // the user ID
"roles": ["user"], // list of roles from user's profile
"attr": {} // a map of attributes about the user - not used yet
},
"resource": {
"kind": "contact", // the type of the resources
"instances": { // a map of the resource instance(s) being checked
"contact_1": { // key is the ID of the resource instance
"attr": {} // a map of attributes about the resource - not used yet
}
}
},
"actions": ["read"] // the list of actions to be done on the resource
}
This is pointing users to the deprecated version of the endpoint and doesn't work with the new endpoint. An example of a valid payload would be something like this:
{
"principal": {
"id": "user_1",
"roles": [
"user"
],
"attr": {}
},
"resources": [
{
"actions": [
"read",
"write"
],
"resource": {
"id": "XX125",
"kind": "contact"
}
}
]
}
If my point is valid, I can open an issue and PR to fix this section.oguzhan