# List group members GET https://content-gateway-example.com/v1/groups/{groupId}/members List direct members (users or groups) of a group. No recursion supported. Reference: https://docs.moveworks.com/api-reference/content-gateway/list-group-members ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: List group members version: endpoint_.listGroupMembers paths: /groups/{groupId}/members: get: operationId: list-group-members summary: List group members description: >- List direct members (users or groups) of a group. No recursion supported. tags: - [] parameters: - name: groupId in: path required: true schema: type: string - name: $top in: query description: Number of items to return per page (default pagination) required: false schema: type: integer - name: $skiptoken in: query description: >- Used when the query parameters can be memoized into an encoded string containing filtering and pagination parameters. If the endpoint supports memoized paging, the first call can use $top and $skip, while @odata.nextLink will return with $skiptoken. If memoized querying is not supported, $top and $skip should be sufficient. required: false schema: type: string - name: $filter in: query required: false schema: type: string - name: $select in: query required: false schema: type: string responses: '200': description: Group members list response content: application/json: schema: $ref: '#/components/schemas/GroupMemberCollection' '400': description: Bad Request - The request was invalid or cannot be served. content: {} '401': description: Unauthorized - The request requires user authentication. content: {} '403': description: >- Forbidden - The server understood the request but refuses to authorize it. content: {} '404': description: Not Found - The requested resource could not be found. content: {} '429': description: Too Many Requests - Rate limit exceeded. content: {} '500': description: >- Internal Server Error - The server encountered an unexpected condition. content: {} '503': description: >- Service Unavailable - The server is currently unable to handle the request. content: {} components: schemas: GroupMember: type: object properties: type: type: string description: 'Entity type. Enum: USER | GROUP' id: type: string description: ID of the member (user or group). name: type: string description: Name of the member (optional). GroupMemberCollection: type: object properties: '@odata.context': type: string value: type: array items: $ref: '#/components/schemas/GroupMember' '@odata.nextLink': type: string ``` ## SDK Code Examples ```python import requests url = "https://content-gateway-example.com/v1/groups/groupId/members" response = requests.get(url) print(response.json()) ``` ```javascript const url = 'https://content-gateway-example.com/v1/groups/groupId/members'; const options = {method: 'GET'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://content-gateway-example.com/v1/groups/groupId/members" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://content-gateway-example.com/v1/groups/groupId/members") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://content-gateway-example.com/v1/groups/groupId/members") .asString(); ``` ```php request('GET', 'https://content-gateway-example.com/v1/groups/groupId/members'); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://content-gateway-example.com/v1/groups/groupId/members"); var request = new RestRequest(Method.GET); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let request = NSMutableURLRequest(url: NSURL(string: "https://content-gateway-example.com/v1/groups/groupId/members")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```