Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

RESTful API Metadata Role Default Home Page Values

BradleyHanna
Contributor III

1)  The RESTful API does not explain how null values are handled by the Update Role method.  When I run an update request on the Metadata Role segment my role's Default Home Page values are cleared, among others.  (I can merge my role updates with the roles current values to get around the other fields being cleared.)  I do not see how to maintain the Default Home Page values during an update.

 

How are the Default Home Page values set using the API Create/Update Method?

 

2)  The API does not include an example of Access Role Tasks.  It states "AccessRoleTasks(permissions)" in the update example.  Does this mean we can set page Access Rights using this member?  I do not see a flag for those values in the metadata for a role.

 

What are Access Role Tasks?

 

How do you retrieve a role's current Access Role Tasks?

17 REPLIES 17

BradleyHanna
Contributor III

When I run POST(get override) "api/core/system/role/permission/3" in the Archer API Templates application, I get 6886 items returned.  When I run this through my C# client program, I get only 29 results.  For some reason, it appears to be paging my results, though I have not added $top or $skip to my request body.

 

Any other ideas?  Why would it be paging?  I have not had this issue when retrieving all groups or all roles.  I would like to avoid writing the looping algorithm to handle the paging.

 

This is my body:

            string bodyData =
@"{" +
" 'Value':'?$select=TaskName,TaskId&$orderby=TaskName'" +
"}";

 

I am using the .net HttpClient class which does not have properties for paging results, and again I have not had this issue with groups, group hierarchy etc.  I was able to retrieve > 300 group hierarchy items no problem.

Here is something else interesting.  When I use $top=1000 I still get only 29 items.  I have tried this with multiple role Ids and still only get 29 items.  Any ideas?

BradleyHanna
Contributor III

This is a user privileges issue.  The user sending the request only holds the Access Control Administrator permissions.

 

Which permissions will provide the access to all AccessRoleTasks?

Well, I am not sure on exact role, as I am not aware on what privilege you need to grant, but sysadmin would always help unless it is security concern

That's what I ended up doing, but I would like to have only users in the Access Control Administrator role do these requests.  I haven't found a role task in the rights list that has system wide permission for that API path.

You may try the Default Administrator for example, but some things are really only possible for sysadmin.

Default Admin still returns only a subset based on its permissions.

Yeah, then you have to stick to sysadmin, I believe.