All URIs are relative to https://api.egoiapp.com
Method | HTTP request | Description |
---|---|---|
deleteUser | DELETE /users/{user_id} | Remove user |
getAllUsers | GET /users | Get all users |
deleteUser(userId)
Remove user
Remove user information given its ID
// Import classes:
import org.egoi.client.ApiClient;
import org.egoi.client.ApiException;
import org.egoi.client.Configuration;
import org.egoi.client.auth.*;
import org.egoi.client.models.*;
import org.egoi.client.api.UsersApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.egoiapp.com");
// Configure API key authorization: Apikey
ApiKeyAuth Apikey = (ApiKeyAuth) defaultClient.getAuthentication("Apikey");
Apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Apikey.setApiKeyPrefix("Token");
UsersApi apiInstance = new UsersApi(defaultClient);
Integer userId = 56; // Integer | ID of the User
try {
apiInstance.deleteUser(userId);
} catch (ApiException e) {
System.err.println("Exception when calling UsersApi#deleteUser");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
userId | Integer | ID of the User |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Not Found | - |
408 | Request Timeout | - |
409 | Conflict | - |
429 | Too Many Requests | - |
500 | Internal Server Error | - |
503 | Service Unavailable | - |
UserCollection getAllUsers(username, status, createdMin, createdMax, updatedMin, updatedMax, offset, limit, order, orderBy)
Get all users
Returns all users
// Import classes:
import org.egoi.client.ApiClient;
import org.egoi.client.ApiException;
import org.egoi.client.Configuration;
import org.egoi.client.auth.*;
import org.egoi.client.models.*;
import org.egoi.client.api.UsersApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.egoiapp.com");
// Configure API key authorization: Apikey
ApiKeyAuth Apikey = (ApiKeyAuth) defaultClient.getAuthentication("Apikey");
Apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Apikey.setApiKeyPrefix("Token");
UsersApi apiInstance = new UsersApi(defaultClient);
String username = "username_example"; // String | Reference attribute to username user
String status = "status_example"; // String | Status filter
OffsetDateTime createdMin = new OffsetDateTime(); // OffsetDateTime | Created initial date
OffsetDateTime createdMax = new OffsetDateTime(); // OffsetDateTime | Created finish
OffsetDateTime updatedMin = new OffsetDateTime(); // OffsetDateTime | Updated initial
OffsetDateTime updatedMax = new OffsetDateTime(); // OffsetDateTime | Updated finish
Integer offset = 56; // Integer | Element offset (starting at zero for the first element)
Integer limit = 10; // Integer | Number of items to return
String order = "desc"; // String | Type of order
String orderBy = "user_id"; // String | Reference attribute to order users
try {
UserCollection result = apiInstance.getAllUsers(username, status, createdMin, createdMax, updatedMin, updatedMax, offset, limit, order, orderBy);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsersApi#getAllUsers");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
username | String | Reference attribute to username user | [optional] |
status | String | Status filter | [optional] [enum: active, inactive] |
createdMin | OffsetDateTime | Created initial date | [optional] |
createdMax | OffsetDateTime | Created finish | [optional] |
updatedMin | OffsetDateTime | Updated initial | [optional] |
updatedMax | OffsetDateTime | Updated finish | [optional] |
offset | Integer | Element offset (starting at zero for the first element) | [optional] |
limit | Integer | Number of items to return | [optional] [default to 10] |
order | String | Type of order | [optional] [default to desc] [enum: asc, desc] |
orderBy | String | Reference attribute to order users | [optional] [default to user_id] [enum: user_id, username] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
401 | Unauthorized | - |
403 | Forbidden | - |
408 | Request Timeout | - |
422 | Unprocessable Entity | - |
429 | Too Many Requests | - |
500 | Internal Server Error | - |
503 | Service Unavailable | - |