Skip to content

Commit 97a8528

Browse files
add capability api example (#153)
1 parent 42c3b5a commit 97a8528

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

readme/terminusx-db/reference-guides/http-api.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,17 @@ POST http://localhost:6363/api/capabilities
235235

236236
```jsx
237237
{ "operation" : Operation,
238-
"scope" : Resource,
239-
"user" : User,
240-
"roles" : Roles }
238+
"scope" : ResourceId,
239+
"user" : UserId,
240+
"roles" : [RolesId] }
241+
```
242+
243+
See the example below
244+
```jsx
245+
{ "operation" : "grant",
246+
"scope" : "Organization/myteam",
247+
"user" : "User/myUser",
248+
"roles" : ["Role/reader"] }
241249
```
242250

243251
Either add or remove the capability for user `User` over resource `Resource` with role `Role`, depending on the `Operation` which is one of `"revoke"` or `"grant"`.

0 commit comments

Comments
 (0)