GET /api/resources/{ResourceID}/roles/{RoleName}/members

Returns information about the users and groups assigned to a role.

Authorization Roles/Permissions: Must have permission to read the resource. Generally, a Business Admin, Site Admin, and the user having read access to the tenant business and organization.

This topic includes the following sections:

HTTP Method

GET

URL

https://{hostname}/api/resources/{ResourceID}/roles/{RoleName}/members

Sample Request

The example below shows a request for the list of users and groups assigned to a specific role.

Sample Request URL

https://{hostname}/api/resources/tenantbusiness.acmepaymentscorp/roles/API Administrator/members

Sample request headers

Accept: application/json
Content-Type: application/json
Connection: Keep-Alive
X-Csrf-Token_acmepaymentscorp: TokenID%3D8ed70a13-8469-11e8-b37a-b155e4eabeb8%2CexpirationTime%3D153...

Sample request body

Not applicable.

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept

application/json

Content-Type

application/json

Cookie AtmoAuthToken_{fedmemberid}={cookie value, which usually starts with TokenID}—The platform cookie. This is the Akana API Platform authorization token, and must be sent with every API request that requires login. For more information and an example, see Session cookies.
X-Csrf-Token_{fedmemberID} The CSRF prevention header; may or may not be required, depending on platform settings. See CSRF Prevention on the Platform. By default, the CSRF header is not required for GET operations and is required for all others, with a few exceptions relating to user login.

Request Parameters

Parameter Parm Type Data Type Required Description
ResourceID Path string Required

The unique ID for a specific resource. In this context, it is the BusinessID of a tenant or its child organization.

RoleName Path String Required The name of a security role defined in the API platform.

Response

If successful, this operation returns HTTP status code 200, and the specified user is assigned to the specified role.

Sample Response

The sample response below shows successful completion of this operation.

Sample response headers: application/json

Content-Type: application/json
Accept: application/json
Date Mon, 02 Aug 2023 18:48:28 GMT

Sample response body: application/json

[
    {
        "roleName": "API Administrator",
        "resourceID": "tenantbusiness.acmepaymentscorp",
        "users": [
          {
            "userID": "731e7dfd-ecb8-471a-b1eb-58a99a74ee10.acmepaymentscorp",
            "userName": "jswift",
            "domainName": "Local Domain", 
            "fullName": "Jonathan Swift"
          },
          {
            "userID" : "99868f5e-fdfc-41de-948a-ea98e982f4fa.acmepaymentscorp",
            "userName" : "all-admin-direct-ldap-user",
            "domainName" : "LDAP",
            "fullName" : "Mark Douglas"
          }
    ],
        "groups": [
          {
            "groupName": "CustomRole",
            "domainName": "LDAP"
          },
          {
            "groupName": "CustomRole",
            "domainName": "SAML"
          }
    ],
    {
    "Link": {
      "rel": "self",
      "href": "http://acmepaymentscorp.com/api/resources/tenantbusiness.acmepaymentscorp/roles/API Administrator/members"
    }
 }
]

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type

application/json

Response Body

Name Description
roleName The name of a security role defined in the API platform.
resourceID The unique ID for a specific resource.
userID The user ID of a user on the platform.
userName The username for the group member.
domainName The domain name indicates the name of the domain the user signed in with.
fullName The full name of a user.
groupName The name of a group.

Error Codes/Messages

If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.

Item Value
400 Bad request: Returned if the client sends a malformed request; for example, invalid parameters or body content. For example, you might get this response if you didn't include the required headers.
401 Unauthorized. For example, you would get this response if you didn't include the custom X-Csrf-Token_{fedmemberID} header in the request, when it was required by the platform settings; or if you included an invalid or expired value for this header. You would also get this response for any operation that requires login (almost all) if the login cookie was missing.
404 The resource could not be found.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.