All URIs are relative to https://your-api-subdomain.onelogin.com
Method | HTTP request | Description |
---|---|---|
createEnvironmentVariable | POST /api/2/hooks/envs | Create Environment Variable |
createHook | POST /api/2/hooks | Create Smart Hook |
deleteEnvironmentVariable | DELETE /api/2/hooks/envs/{envvar_id} | Delete Environment Variable |
deleteHook | DELETE /api/2/hooks/{hook_id} | Delete Smart Hook by ID |
getEnvironmentVariable | GET /api/2/hooks/envs/{envvar_id} | Get Environment Variable |
getHook | GET /api/2/hooks/{hook_id} | Get Smart Hook by ID |
getLogs | GET /api/2/hooks/{hook_id}/logs | Get Smart Hook Logs |
listEnvironmentVariables | GET /api/2/hooks/envs | List Environment Variables |
listHooks | GET /api/2/hooks | List all Smart Hooks |
updateEnvironmentVariable | PUT /api/2/hooks/envs/{envvar_id} | Update Environment Variable |
updateHook | PUT /api/2/hooks/{hook_id} | Update Smart Hook by ID |
HookEnvvar createEnvironmentVariable(hookEnvvar)
Create Environment Variable
Create Environment Variable
// 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.SmartHooksApi;
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");
SmartHooksApi apiInstance = new SmartHooksApi(defaultClient);
HookEnvvar hookEnvvar = new HookEnvvar(); // HookEnvvar |
try {
HookEnvvar result = apiInstance.createEnvironmentVariable(hookEnvvar);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SmartHooksApi#createEnvironmentVariable");
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 |
---|---|---|---|
hookEnvvar | HookEnvvar |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | CREATED | - |
401 | Unauthorized | - |
422 | Unprocessable Entity | - |
Hook createHook(hook)
Create Smart Hook
Create Smart Hook
// 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.SmartHooksApi;
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");
SmartHooksApi apiInstance = new SmartHooksApi(defaultClient);
Hook hook = new Hook(); // Hook |
try {
Hook result = apiInstance.createHook(hook);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SmartHooksApi#createHook");
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 |
---|---|---|---|
hook | Hook |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | CREATED | - |
401 | Unauthorized | - |
409 | Conflict | - |
422 | You function is not base64 encoded. | - |
deleteEnvironmentVariable(envvarId)
Delete Environment Variable
Delete Environment Variable
// 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.SmartHooksApi;
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");
SmartHooksApi apiInstance = new SmartHooksApi(defaultClient);
String envvarId = "envvarId_example"; // String | Set to the id of the Hook Environment Variable that you want to fetch.
try {
apiInstance.deleteEnvironmentVariable(envvarId);
} catch (ApiException e) {
System.err.println("Exception when calling SmartHooksApi#deleteEnvironmentVariable");
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 |
---|---|---|---|
envvarId | String | Set to the id of the Hook Environment Variable that you want to fetch. |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | Success. The environment variable has been deleted. No content is returned. | - |
401 | Unauthorized | - |
404 | Not Found | - |
deleteHook(hookId)
Delete Smart Hook by ID
Delete Smart Hook
// 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.SmartHooksApi;
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");
SmartHooksApi apiInstance = new SmartHooksApi(defaultClient);
String hookId = "hookId_example"; // String | Set to the id of the Hook that you want to return.
try {
apiInstance.deleteHook(hookId);
} catch (ApiException e) {
System.err.println("Exception when calling SmartHooksApi#deleteHook");
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 |
---|---|---|---|
hookId | String | Set to the id of the Hook that you want to return. |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
202 | Success. The hook function has been queued for deletion. This typically happens within seconds of making the request. | - |
401 | Unauthorized | - |
404 | Not Found | - |
HookEnvvar getEnvironmentVariable(envvarId)
Get Environment Variable
Get Environment Variable
// 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.SmartHooksApi;
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");
SmartHooksApi apiInstance = new SmartHooksApi(defaultClient);
String envvarId = "envvarId_example"; // String | Set to the id of the Hook Environment Variable that you want to fetch.
try {
HookEnvvar result = apiInstance.getEnvironmentVariable(envvarId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SmartHooksApi#getEnvironmentVariable");
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 |
---|---|---|---|
envvarId | String | Set to the id of the Hook Environment Variable that you want to fetch. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
401 | Unauthorized | - |
Hook getHook(hookId)
Get Smart Hook by ID
Get Smart Hook
// 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.SmartHooksApi;
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");
SmartHooksApi apiInstance = new SmartHooksApi(defaultClient);
String hookId = "hookId_example"; // String | Set to the id of the Hook that you want to return.
try {
Hook result = apiInstance.getHook(hookId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SmartHooksApi#getHook");
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 |
---|---|---|---|
hookId | String | Set to the id of the Hook that you want to return. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
401 | Unauthorized | - |
404 | Not Found | - |
List<HookLog> getLogs(hookId, limit, page, cursor, requestId, correlationId)
Get Smart Hook Logs
Get Smart Hook Logs
// 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.SmartHooksApi;
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");
SmartHooksApi apiInstance = new SmartHooksApi(defaultClient);
String hookId = "hookId_example"; // String | Set to the id of the Hook that you want to return.
Integer limit = 56; // Integer | How many items to return at one time (max 100)
Integer page = 56; // Integer | The page number of results to return.
String cursor = "cursor_example"; // String | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page.
String requestId = "requestId_example"; // String | Returns logs that contain this request_id.
String correlationId = "correlationId_example"; // String | Returns logs that contain this correlation_id.
try {
List<HookLog> result = apiInstance.getLogs(hookId, limit, page, cursor, requestId, correlationId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SmartHooksApi#getLogs");
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 |
---|---|---|---|
hookId | String | Set to the id of the Hook that you want to return. | |
limit | Integer | How many items to return at one time (max 100) | [optional] |
page | Integer | The page number of results to return. | [optional] |
cursor | String | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | [optional] |
requestId | String | Returns logs that contain this request_id. | [optional] |
correlationId | String | Returns logs that contain this correlation_id. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | * Current-Page - * Page-Items - * Total-Count - * Total-Pages - * Link - * Before-Cursor - * After-Cursor - |
401 | Unauthorized | - |
404 | Not Found | - |
List<HookEnvvar> listEnvironmentVariables(limit, page, cursor)
List Environment Variables
List Environment Variables
// 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.SmartHooksApi;
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");
SmartHooksApi apiInstance = new SmartHooksApi(defaultClient);
Integer limit = 56; // Integer | How many items to return at one time (max 100)
Integer page = 56; // Integer | The page number of results to return.
String cursor = "cursor_example"; // String | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page.
try {
List<HookEnvvar> result = apiInstance.listEnvironmentVariables(limit, page, cursor);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SmartHooksApi#listEnvironmentVariables");
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 |
---|---|---|---|
limit | Integer | How many items to return at one time (max 100) | [optional] |
page | Integer | The page number of results to return. | [optional] |
cursor | String | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | * Current-Page - * Page-Items - * Total-Count - * Total-Pages - * Link - * Before-Cursor - * After-Cursor - |
401 | Unauthorized | - |
List<Hook> listHooks(limit, page, cursor)
List all Smart Hooks
List Smart Hooks
// 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.SmartHooksApi;
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");
SmartHooksApi apiInstance = new SmartHooksApi(defaultClient);
Integer limit = 56; // Integer | How many items to return at one time (max 100)
Integer page = 56; // Integer | The page number of results to return.
String cursor = "cursor_example"; // String | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page.
try {
List<Hook> result = apiInstance.listHooks(limit, page, cursor);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SmartHooksApi#listHooks");
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 |
---|---|---|---|
limit | Integer | How many items to return at one time (max 100) | [optional] |
page | Integer | The page number of results to return. | [optional] |
cursor | String | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | * Current-Page - * Page-Items - * Total-Count - * Total-Pages - * Link - * Before-Cursor - * After-Cursor - |
401 | Unauthorized | - |
HookEnvvar updateEnvironmentVariable(envvarId, updateEnvironmentVariableRequest)
Update Environment Variable
Update Environment Variable
// 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.SmartHooksApi;
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");
SmartHooksApi apiInstance = new SmartHooksApi(defaultClient);
String envvarId = "envvarId_example"; // String | Set to the id of the Hook Environment Variable that you want to fetch.
UpdateEnvironmentVariableRequest updateEnvironmentVariableRequest = new UpdateEnvironmentVariableRequest(); // UpdateEnvironmentVariableRequest |
try {
HookEnvvar result = apiInstance.updateEnvironmentVariable(envvarId, updateEnvironmentVariableRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SmartHooksApi#updateEnvironmentVariable");
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 |
---|---|---|---|
envvarId | String | Set to the id of the Hook Environment Variable that you want to fetch. | |
updateEnvironmentVariableRequest | UpdateEnvironmentVariableRequest |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
401 | Unauthorized | - |
422 | Unprocessable Entity | - |
Hook updateHook(hookId, hook)
Update Smart Hook by ID
Update Smart Hook
// 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.SmartHooksApi;
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");
SmartHooksApi apiInstance = new SmartHooksApi(defaultClient);
String hookId = "hookId_example"; // String | Set to the id of the Hook that you want to return.
Hook hook = new Hook(); // Hook |
try {
Hook result = apiInstance.updateHook(hookId, hook);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SmartHooksApi#updateHook");
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 |
---|---|---|---|
hookId | String | Set to the id of the Hook that you want to return. | |
hook | Hook |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
401 | Unauthorized | - |
422 | You function is not base64 encoded. | - |