Assign Process Permission Groups

Assigns a set of child groups to a named process permission on a parent group.

 /groups/{groupName}/processpermission/{processPermissionName} endpoint description
Description

Assigns a set of child groups to a named process permission on a parent group.

URL
  • /groups/{groupName}/processpermission/{processPermissionName}

  • /groups/query/processpermission?groupName={groupName}&processPermissionName={processPermissionName}

Method POST
Parameters
  • groupName

  • processPermissionName

  • groups

Review the parameter definitions and examples of how to use the processPermissionName endpoint in JQuery and C# calls.

Parameters

 /groups/{groupName}/processpermission/{processPermissionName} endpoint parameters
Variable Name Type Description Required
groupName String The parent group to assign to True (URL)
processPermissionName String The process permission to assign to True (URL)
groups String array The child groups to assign to the process permission True

Examples

JQuery Call

Copy Code
$.ajax({
    url: baseUrl + '/groups/Command/processpermission/Approve Resource Requests',
    contentType: 'application/json',
    data: JSON.stringify({ 'groups': ['Logistics', 'Finance'] }),
    type: 'POST'
});

C# Call

Copy Code
public void AssignProcessPermissions(Cookie cookie)
{
    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(baseUrl + "/groups/Command/processpermission/Approve Resource Requests");
    request.Method = "POST";
    request.ContentType = "application/json";
    CookieContainer cookieJar = new CookieContainer();
    cookieJar.Add(cookie);
    request.CookieContainer = cookieJar;
    byte[] bytes = Encoding.UTF8.GetBytes(new JavaScriptSerializer().Serialize(new { groups = new[] { "Logistics", "Finance" } }));
    request.ContentLength = bytes.Length;
    using (Stream s = request.GetRequestStream()) { s.Write(bytes, 0, bytes.Length); }
    request.GetResponse();
}

Errors

401, 400 (blank/unknown group or process permission, or insufficient permissions), 500.