List ACL by Resource
Overview
This operation returns permissions for the specified named resources for all users and roles. The resource list can include folders or named resource paths. For each of the resources, the response contains the users or roles that have any permission on the resource.
- For named tables, the permissions can be EXECUTE, CREATE, MODIFY, or DELETE
- For repository folders, permissions can be any of READ or WRITE
- For other named resources, permissions can be EXECUTE
Note: The following points must be considered while making a request:
- Repository folder should have a trailing slash in the POST request otherwise an error is returned.
- Named resource path should not have a trailing slash otherwise an error is returned.
ACL Authorization Flow
The user making this request will only be able to list permissions on resources within the repository folders (or subfolders) they have WRITE permission on.
HTTP GET URL Format
The following format is used for HTTP GET requests to list the ACL by resources:
HTTP GET http://<server>:<port>/rest/Spatial/AccessControlService/acl/resources/resourceName
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
resourceName | String | Yes | Specifies the full path to one or more named resources. The resource can be a folder or resource path. |
HTTP POST URL Format
The following format is used for HTTP POST requests:
HTTP POST URL: /acl/resources
POST BODY: {
"resources":[
"/Samples/NamedTiles/WorldTile",
"/Samples/NamedMaps/WorldMap"
]
}
POST HEADER: Content-Type:application/json
Returns
Returns permissions for all users and roles for the specified resource list.
Example for GET
Request URL
http://<server>:<port>/rest/Spatial/AccessControlService/acl/resources/Samples/NamedTiles/WorldTile
Response
{ "resourceAclList":[ { "name":"/Samples/NamedTiles/WorldTile", "resourceType":"NamedTile", "users":[ { "name":"user1", "permissions":[ "EXECUTE" ] } ], "roles":[ { "name":"role1", "permissions":[ "EXECUTE" ] } ] } ] }
Example for POST
Request URL
http://<server>:<port>/rest/Spatial/AccessControlService/acl/resources
Request Body
{ "resources":[ "/Samples/NamedTiles/WorldTile", "/Samples/NamedMaps/WorldMap" ] }
Response
{ "resourceAclList":[ { "name":"/Samples/NamedTiles/WorldTile", "resourceType":"NamedTile", "users":[ { "name":"user1", "permissions":[ "EXECUTE" ] } ], "roles":[ { "name":"role1", "permissions":[ "EXECUTE" ] } ] }, { "name":"/Samples/NamedMaps/WorldMap", "resourceType":"NamedMapAndView", "users":[ { "name":"user1", "permissions":[ "EXECUTE" ] } ], "roles":[ { "name":"role1", "permissions":[ "EXECUTE" ] } ] } ] }