All URIs are relative to https://your-api-subdomain.onelogin.com
Method | HTTP request | Description |
---|---|---|
getGroupById | GET /api/1/groups/{group_id} | Get Group by ID |
getGroups | GET /api/1/groups | Get Groups |
GetGroups200Response getGroupById(groupId)
Get Group by ID
Get Group By ID
// Import classes:
import com.onelogin.client.ApiClient;
import com.onelogin.client.ApiException;
import com.onelogin.client.Configuration;
import com.onelogin.client.auth.*;
import com.onelogin.client.models.*;
import com.onelogin.client.api.GroupsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://your-api-subdomain.onelogin.com");
// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
GroupsApi apiInstance = new GroupsApi(defaultClient);
String groupId = "groupId_example"; // String |
try {
GetGroups200Response result = apiInstance.getGroupById(groupId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling GroupsApi#getGroupById");
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 |
---|---|---|---|
groupId | String |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
400 | Bad Request | - |
401 | Unauthorized | - |
404 | Not Found | - |
GetGroups200Response getGroups()
Get Groups
Get Groups
// Import classes:
import com.onelogin.client.ApiClient;
import com.onelogin.client.ApiException;
import com.onelogin.client.Configuration;
import com.onelogin.client.auth.*;
import com.onelogin.client.models.*;
import com.onelogin.client.api.GroupsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://your-api-subdomain.onelogin.com");
// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
GroupsApi apiInstance = new GroupsApi(defaultClient);
try {
GetGroups200Response result = apiInstance.getGroups();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling GroupsApi#getGroups");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
400 | Bad Request | - |
401 | Unauthorized | - |