List ACL by Folder
Overview
This operation returns permissions for all users and roles for all named resources in the specified folders and their subfolders. The permissions for the subfolders are also returned in the response.For each resource, the response contains the users and roles that have any permission on the resource and for each user or role, it contains the specific permissions applied.
- For named tables, the permissions can be EXECUTE, CREATE, MODIFY, or DELETE
- For repository folders, permissions can be READ or WRITE
- For other names resources permissions can be EXECUTE
ACL Authorization Flow
The user making this request will only be able to list permissions on resources within the repository folders (or subfolders) on which they have WRITE permissions.
HTTP GET URL Format
The following format is used for HTTP GET requests to list ACL by folders:
HTTP GET http://<server>:<port>/rest/Spatial/AccessControlService/acl/folders/repositoryFolderPath
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
repositoryFolderPath | String | Yes | Specifies the path of the repository folder for which ACLs to be returned. |
HTTP POST URL Format
The following format is used for HTTP POST requests to list ACL by folders:
HTTP POST http://<server>:<port>/rest/Spatial/AccessControlService/acl/folders/
HTTP POST URL Format
The following format is used for HTTP POST requests:
HTTP POST URL: /acl/folders
POST DATA:
{
"resources":[
"/Samples/NamedTiles/",
"/Samples/NamedMaps/"
],
"resourceType":[
"RepositoryFolder"
]
}
POST HEADER: Content-Type:application/json
- Repository folder should have a trailing slash in the POST request, otherwise an error is returned.
Returns
Returns permissions for all users and for all named resources in the specified folders and their subfolders.
Example for GET
Request URL
http://<server>:<port>/rest/Spatial/AccessControlService/acl/folders/Samples
Response
{ "resourceAclList":[ { "name":"/Samples/NamedTiles/", "resourceType":"RepositoryFolder", "users":[ { "name":"user1", "permissions":[ "READ", "WRITE" ] } ], "roles":[ { "name":"role1", "permissions":[ "READ", "WRITE" ] } ] }, { "name":"/Samples/", "resourceType":"RepositoryFolder", "users":[ { "name":"user1", "permissions":[ "READ", "WRITE" ] } ], "roles":[ { "name":"role1", "permissions":[ "READ", "WRITE" ] } ] }, { "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/folders
Request Body
{ "resources":[ "/Samples", "/InvalidFolder" ] }
Response
{ "resourceAclList":[ { "name":"/InvalidFolder/", "resourceType":"RepositoryFolder", "error":"RepositoryEx_PathNotFound: Path was not found - /InvalidFolder/" }, { "name":"/Samples/NamedTiles/", "resourceType":"RepositoryFolder", "users":[ { "name":"user1", "permissions":[ "READ", "WRITE" ] } ], "roles":[ { "name":"role1", "permissions":[ "READ", "WRITE" ] } ] }, { "name":"/Samples/", "resourceType":"RepositoryFolder", "users":[ { "name":"user1", "permissions":[ "READ", "WRITE" ] } ], "roles":[ { "name":"role1", "permissions":[ "READ", "WRITE" ] } ] }, { "name":"/Samples/NamedTiles/WorldTile", "resourceType":"NamedTile", "users":[ { "name":"user1", "permissions":[ "EXECUTE" ] } ], "roles":[ { "name":"role1", "permissions":[ "EXECUTE" ] } ] } ] }