# egoisdk.UsersApi All URIs are relative to *https://api.egoiapp.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**deleteUser**](UsersApi.md#deleteUser) | **DELETE** /users/{user_id} | Remove user [**getAllUsers**](UsersApi.md#getAllUsers) | **GET** /users | Get all users ## deleteUser > deleteUser(userId) Remove user Remove user information given its ID ### Example ```javascript import egoisdk from 'egoisdk'; let defaultClient = egoisdk.ApiClient.instance; // Configure API key authorization: Apikey let Apikey = defaultClient.authentications['Apikey']; Apikey.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Apikey.apiKeyPrefix = 'Token'; let apiInstance = new egoisdk.UsersApi(); let userId = 56; // Number | ID of the User apiInstance.deleteUser(userId, (error, data, response) => { if (error) { console.error(error); } else { console.log('API called successfully.'); } }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **userId** | **Number**| ID of the User | ### Return type null (empty response body) ### Authorization [Apikey](../README.md#Apikey) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## getAllUsers > UserCollection getAllUsers(opts) Get all users Returns all users ### Example ```javascript import egoisdk from 'egoisdk'; let defaultClient = egoisdk.ApiClient.instance; // Configure API key authorization: Apikey let Apikey = defaultClient.authentications['Apikey']; Apikey.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Apikey.apiKeyPrefix = 'Token'; let apiInstance = new egoisdk.UsersApi(); let opts = { 'username': "username_example", // String | Reference attribute to username user 'status': "status_example", // String | Status filter 'createdMin': new Date("2013-10-20T19:20:30+01:00"), // Date | Created initial date 'createdMax': new Date("2013-10-20T19:20:30+01:00"), // Date | Created finish 'updatedMin': new Date("2013-10-20T19:20:30+01:00"), // Date | Updated initial 'updatedMax': new Date("2013-10-20T19:20:30+01:00"), // Date | Updated finish 'offset': 56, // Number | Element offset (starting at zero for the first element) 'limit': 10, // Number | Number of items to return 'order': "'desc'", // String | Type of order 'orderBy': "'user_id'" // String | Reference attribute to order users }; apiInstance.getAllUsers(opts, (error, data, response) => { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **String**| Reference attribute to username user | [optional] **status** | **String**| Status filter | [optional] **createdMin** | **Date**| Created initial date | [optional] **createdMax** | **Date**| Created finish | [optional] **updatedMin** | **Date**| Updated initial | [optional] **updatedMax** | **Date**| Updated finish | [optional] **offset** | **Number**| Element offset (starting at zero for the first element) | [optional] **limit** | **Number**| Number of items to return | [optional] [default to 10] **order** | **String**| Type of order | [optional] [default to 'desc'] **orderBy** | **String**| Reference attribute to order users | [optional] [default to 'user_id'] ### Return type [**UserCollection**](UserCollection.md) ### Authorization [Apikey](../README.md#Apikey) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json