Permissions
Get All permissions for the user#
Endpoints#
GET datasourcesvc/api/v1/permissionsRequest#
Request body#
| Parameter | Type | Description | Required |
|---|---|---|---|
_namespace | String | Project namespace | Required |
_resourceDesc._irn | String | Pass an IRN. | Required |
_user._id | String | User's ID | Required |
_user._type | String | User type | Required |
_resourceDesc._criteria.<attribute> | String | Enter the attribute you want to query, followed by its value, for example: _resourceDesc._criteria.usertype=myUserType. | Optional |
patternmatch | String | Pattern match | Optional |
Request body example#
"_namespaces":"auto1397_SZMSSX5T""_resourceDesc._irn":"datasourcesvc:orchestrator:1e3fd8f5-9a19-4216-bfb3-308a479b545f""_user._id":"0defc4aa-9274-4042-816d-cf542b20a7c0""_user._type":"user"Response#
Codes#
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request |
404 | Not Found |
Response#
{ "_offset":0, "_pageSize":1, "_total":1, "_list":[ { "_namespace":"auto1397_SZMSSX5T", "_user":{ "_id":"0defc4aa-9274-4042-816d-cf542b20a7c0", "_type":"user" }, "_actions":["READ"], "_id":"95ba9971-0f73-46a2-81f2-1f63a40e7954", "_resourceDesc":{ "_irn":"datasourcesvc:orchestrator:1e3fd8f5-9a19-4216-bfb3-308a479b545f", "_criteria":{} } } ]}Add or Edit Permissions#
Endpoints#
PUT datasourcesvc/api/v1/permissionsRequest#
Body parameters#
The req.body is an array of objects containing the following fields:
| Parameter | Type | Description | Required |
|---|---|---|---|
id_namespace | String | Project namespace | Required |
_resourceDesc | Object | Resource description | Required |
_resourceDesc.irn | String | IRN | Required |
_actions | Array of String | Permission actions | Required |
_user._type | String | User Type | Required |
_user._id | String | User's id | Required |
Example:
[ { "_actions":["READ"], "_namespace":"auto1239_jTYdmJZw", "_resourceDesc":{ "_irn":"datasourcesvc:orchestrator:b3dd31b4-4725-4455-912c-615cb3452fdf", "_criteria":{} }, "_user":{ "_type":"user", "_id":"728c8f3e-de67-4d12-9797-3b00a1bc77c2" } }]Response#
Codes#
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request |
404 | Not Found |
Response#
{ "_offset":0, "_list":{ "_success":[ { "_namespace":"auto1239_jTYdmJZw", "_user":{ "_id":"728c8f3e-de67-4d12-9797-3b00a1bc77c2", "_type":"user" }, "_actions":["READ"], "_status":200, "_id":"69216694-c891-433d-bbb5-8f209a5d227d", "_resourceDesc":{ "_irn":"datasourcesvc:orchestrator:b3dd31b4-4725-4455-912c-615cb3452fdf", "_criteria":{} } } ], "_failures":[] }}Delete a Permission#
Endpoints#
DELETE /datasourcesvc/api/v1/permissions/{id}Request#
Body parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
id | String | The permission's id. | Required |
Response#
Codes#
| Code | Description |
|---|---|
204 | No Content |
404 | Not Found |
Response data#
None