GET /api/groups/{GroupID}/members

Returns information about the members of the specified group. The information is returned in JSON format.

Authorization Roles/Permissions: Must be logged in. Group member, group leader, Admin, Site Admin, or Business Admin

This topic includes the following sections:

HTTP Method

GET

URL

https://{hostname}/api/groups/{GroupID}/members

Sample Request

The example below shows a request for the group members for the specified group.

Sample Request URL

https://{hostname}/api/groups/group19212.acmepaymentscorp/members

Sample request headers

Accept: application/vnd.soa.v71+xml

Sample request body

Not applicable.

Request Headers

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

Header Description
Accept

application/vnd.soa.v71+json, application/vnd.soa.v71+xml

application/vnd.soa.v72+json, application/vnd.soa.v72+xml

application/vnd.soa.v80+json, application/vnd.soa.v80+xml

application/vnd.soa.v81+json, application/vnd.soa.v81+xml

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
GroupID Path string Required The unique ID for a specific group.

Response

If successful, this operation returns HTTP status code 200, with information about the group members in JSON or XML format.

Sample Response

The sample response below shows information about the members of the specified group. In this example, two members are in Pending status, meaning they have been invited but have not yet accepted.

Sample response headers: application/vnd.soa.v71+json

Status Code: 200 OK
Content-Type: application/vnd.soa.v71+json
Date: Fri, 29 Apr 2016 13:42:59 GMT

Sample response body: application/vnd.soa.v71+json

[
  {
    "role":"com.soa.group.membership.role.admin",
    "Email":"saoirse@acmepaymentscorp.com",
    "UserID":"e4542c76-cb39-4af4-84fd-a8e85ffb652c.acmepaymentscorp",
    "FirstName":"Jane",
    "LastName":"Mead",
    "State":"com.soa.group.membership.state.approved",
    "UserName":"JaneMead",
    "IdentityName":"JaneMead",
    "DomainName":"Local Domain",
    "Image":{
      "Url":"http://acmepaymentscorp.com/api/users/avatar/_V_5wI7SKSjKMXvHlakks84g",
      "Link":"../acmepaymentscorp#/user/e4542c76-cb39-4af4-84fd-a8e85ffb652c.acmepaymentscorp/details"
    }
  },
  {
    "role":"com.soa.group.membership.role.admin",
    "Email":"siochain@acmepaymentscorp.com",
    "UserID":"6582b088-d990-4870-8cc7-95a340170589.acmepaymentscorp",
    "FirstName":"Philip",
    "LastName":"Pirrip",
    "State":"com.soa.group.membership.state.pending",
    "UserName":"PhilipPirrip",
    "IdentityName":"PhilipPirrip",
    "DomainName":"Local Domain",
    "Image":{
      "Url":"http://acmepaymentscorp.com/api/users/avatar/_V_5wI7SKSjKMXvHlakks84g",
      "Link":"../acmepaymentscorp#/user/6582b088-d990-4870-8cc7-95a340170589.acmepaymentscorp/details"
    }
  },
  {
    "role":"com.soa.group.membership.role.admin",
    "Email":"saoirse@yahoo.com",
    "UserID":"41c04963-f17d-4b5e-a19c-ab0fa22adfb1.acmepaymentscorp",
    "FirstName":"Jonathan",
    "LastName":"Swift",
    "State":"com.soa.group.membership.state.pending",
    "UserName":"JonathanSwift",
    "IdentityName":"JonathanSwift",
    "DomainName":"Local Domain",
    "Image":{
      "Url":"http://acmepaymentscorp.com/api/users/avatar/_V_5wI7SKSjKMXvHlakks84g",
      "Link":"../acmepaymentscorp#/user/41c04963-f17d-4b5e-a19c-ab0fa22adfb1.acmepaymentscorp/details"
    }
  }
]

Sample response headers: application/vnd.soa.v71+json

Status Code: 200 OK
Content-Type: application/vnd.soa.v71+xml
Date: Fri, 29 Apr 2016 13:44:43 GMT

Sample response body: application/vnd.soa.v71+json

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Memberships>
  <Membership xmlns="http://soa.com/xsd/group/1.0" xmlns:ns2="http://soa.com/xsd/user/1.0" 
xmlns:ns3="http://soa.com/xsd/dnmodel/1.0" xmlns:ns4="http://soa.com/xsd/resource/1.0">
    <Email>saoirse@acmepaymentscorp.com</Email>
    <ns2:UserID>e4542c76-cb39-4af4-84fd-a8e85ffb652c.acmepaymentscorp</ns2:UserID>
    <FirstName>Jane</FirstName>
    <LastName>Mead</LastName>
    <State>com.soa.group.membership.state.approved</State>
    <role>com.soa.group.membership.role.admin</role>
    <UserName>JaneMead</UserName>
    <IdentityName>JaneMead</IdentityName>
    <DomainName>Local Domain</DomainName>
    <ns3:Image>
      <ns3:Url>http://acmepaymentscorp.com/api/users/avatar/_V_5wI7SKSjKMXvHlakks84g</ns3:Url>
      <ns3:Link>../acmepaymentscorp#/user/e4542c76-cb39-4af4-84fd-a8e85ffb652c.acmepaymentscorp/details</ns3:Link>
    </ns3:Image>
  </Membership>
  <Membership xmlns="http://soa.com/xsd/group/1.0" xmlns:ns2="http://soa.com/xsd/user/1.0" xmlns:ns3="http://soa.com/xsd/dnmodel/1.0" xmlns:ns4="http://soa.com/xsd/resource/1.0">
    <Email>siochain@acmepaymentscorp.com</Email>
    <ns2:UserID>6582b088-d990-4870-8cc7-95a340170589.acmepaymentscorp</ns2:UserID>
    <FirstName>Philip</FirstName>
    <LastName>Pirrip</LastName>
    <State>com.soa.group.membership.state.pending</State>
    <role>com.soa.group.membership.role.admin</role>
    <UserName>PhilipPirrip</UserName>
    <IdentityName>PhilipPirrip</IdentityName>
    <DomainName>Local Domain</DomainName>
    <ns3:Image>
      <ns3:Url>http://acmepaymentscorp.com/api/users/avatar/_V_5wI7SKSjKMXvHlakks84g</ns3:Url>
      <ns3:Link>../acmepaymentscorp#/user/6582b088-d990-4870-8cc7-95a340170589.acmepaymentscorp/details</ns3:Link>
    </ns3:Image>
  </Membership>
  <Membership xmlns="http://soa.com/xsd/group/1.0" xmlns:ns2="http://soa.com/xsd/user/1.0" xmlns:ns3="http://soa.com/xsd/dnmodel/1.0" xmlns:ns4="http://soa.com/xsd/resource/1.0">
    <Email>saoirse@yahoo.com</Email>
    <ns2:UserID>41c04963-f17d-4b5e-a19c-ab0fa22adfb1.acmepaymentscorp</ns2:UserID>
    <FirstName>Jonathan</FirstName>
    <LastName>Swift</LastName>
    <State>com.soa.group.membership.state.pending</State>
    <role>com.soa.group.membership.role.admin</role>
    <UserName>JonathanSwift</UserName>
    <IdentityName>JonathanSwift</IdentityName>
    <DomainName>Local Domain</DomainName>
    <ns3:Image>
      <ns3:Url>http://acmepaymentscorp.com/api/users/avatar/_V_5wI7SKSjKMXvHlakks84g</ns3:Url>
      <ns3:Link>../acmepaymentscorp#/user/41c04963-f17d-4b5e-a19c-ab0fa22adfb1.acmepaymentscorp/details</ns3:Link>
    </ns3:Image>
  </Membership>
</Memberships>

Response Headers

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

Header Description
Content-Type

application/vnd.soa.v71+json, application/vnd.soa.v71+xml

application/vnd.soa.v72+json, application/vnd.soa.v72+xml

application/vnd.soa.v80+json, application/vnd.soa.v80+xml

application/vnd.soa.v81+json, application/vnd.soa.v81+xml

Response Body

Name Type Description
Membership[ ] Membership

Contains information about a user's membership in a group.

One or more.

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
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.
405 Method Not Allowed. You might get this if there is an error in the URL, or if you used the wrong HTTP verb.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.