# List Users GET https://api.moveworks.ai/export/v1/records/users Retrieve all users ingested into Moveworks. Reference: https://docs.moveworks.com/api-reference/data-api/list-users ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: List Users version: endpoint_.listUsers paths: /users: get: operationId: list-users summary: List Users description: Retrieve all users ingested into Moveworks. tags: - [] parameters: - name: $filter in: query description: >- Filter users by a condition. This API supports the standard odata query language on all string and integer attributes required: false schema: type: string - name: $select in: query description: Select which properties to include in the response for users. required: false schema: type: string - name: $orderby in: query description: Order users by specific fields. required: false schema: type: string - name: $top in: query description: Specify the number of user results to return. required: false schema: type: integer - name: $skip in: query description: Skip the first n user results. required: false schema: type: integer - name: Authorization in: header required: true schema: type: string responses: '200': description: Successfully retrieved list of plugins calls content: application/json: schema: $ref: '#/components/schemas/users' '400': description: Bad request error content: {} '403': description: Forbidden error content: {} '404': description: URL not found error content: {} '429': description: Rate limiting exceeding error content: {} '500': description: Internal server error content: {} components: schemas: UserobjectExternalIdsItems: type: object properties: connector_name: type: string description: Name of the connector created in Moveworks Setup external_id: type: string format: uuid description: External ID from the source system source: type: string description: Identifier for the source system. userobject: type: object properties: id: type: string description: User record id generated and stored in Moveworks for the end user email_addr: type: string description: >- Email of the end user stored in Moveworks. This field is ingested from your systems and reflect the value present in your systems. access_to_bot: type: boolean description: >- Denotes if the end user has access to Moveworks Assistant or not. This is evaluated through the bot access rule configured in Moveworks Setup. first_name: type: string description: >- First name of the end user. This field is ingested from your systems and reflect the value present in your systems. last_name: type: string description: >- Last name of the end user.This field is ingested from your systems and reflect the value present in your systems. user_preferred_language: type: string description: >- User preferred language set from the end user. EN-US is the default value for this field first_interaction_time: type: string format: date-time description: Time stamp for the first interaction for the end user. latest_interaction_time: type: string format: date-time description: Time stamp for the latest interaction of the end user. external_ids: type: array items: $ref: '#/components/schemas/UserobjectExternalIdsItems' last_updated_time: type: string format: date-time description: Last updated time for the user entry. users: type: object properties: '@odata.context': type: string description: URL to the metadata of the response. '@odata.nextLink': type: string description: URL to fetch the next set of results. value: type: array items: $ref: '#/components/schemas/userobject' ``` ## SDK Code Examples ```python import requests url = "https://api.moveworks.ai/export/v1/records/users" headers = {"Authorization": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.moveworks.ai/export/v1/records/users'; const options = {method: 'GET', headers: {Authorization: ''}}; 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://api.moveworks.ai/export/v1/records/users" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "") 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://api.moveworks.ai/export/v1/records/users") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = '' 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://api.moveworks.ai/export/v1/records/users") .header("Authorization", "") .asString(); ``` ```php request('GET', 'https://api.moveworks.ai/export/v1/records/users', [ 'headers' => [ 'Authorization' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.moveworks.ai/export/v1/records/users"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.moveworks.ai/export/v1/records/users")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers 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() ```