Package com.okta.sdk.resource.api
Class EventHookApi
java.lang.Object
com.okta.sdk.resource.api.EventHookApi
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2024-09-23T16:19:57.008753975Z[Etc/UTC]",
comments="Generator version: 7.8.0")
public class EventHookApi
extends Object
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionactivateEventHook
(String eventHookId) Activate an Event Hook Activates the event hook that matches the provided `id`activateEventHook
(String eventHookId, Map<String, String> additionalHeaders) Activate an Event Hook Activates the event hook that matches the provided `id`createEventHook
(EventHook eventHook) Create an Event Hook Creates a new event hook for your organization in `ACTIVE` status.createEventHook
(EventHook eventHook, Map<String, String> additionalHeaders) Create an Event Hook Creates a new event hook for your organization in `ACTIVE` status.deactivateEventHook
(String eventHookId) Deactivate an Event Hook Deactivates the event hook that matches the provided `id`deactivateEventHook
(String eventHookId, Map<String, String> additionalHeaders) Deactivate an Event Hook Deactivates the event hook that matches the provided `id`void
deleteEventHook
(String eventHookId) Delete an Event Hook Deletes the event hook that matches the provided `id`.void
deleteEventHook
(String eventHookId, Map<String, String> additionalHeaders) Delete an Event Hook Deletes the event hook that matches the provided `id`.getEventHook
(String eventHookId) Retrieve an Event Hook Retrieves an event hookgetEventHook
(String eventHookId, Map<String, String> additionalHeaders) Retrieve an Event Hook Retrieves an event hookprotected static com.fasterxml.jackson.databind.ObjectMapper
List all Event Hooks Lists all event hookslistEventHooks
(Map<String, String> additionalHeaders) List all Event Hooks Lists all event hooksreplaceEventHook
(String eventHookId, EventHook eventHook) Replace an Event Hook Replaces an event hook.Replace an Event Hook Replaces an event hook.void
setApiClient
(ApiClient apiClient) verifyEventHook
(String eventHookId) Verify an Event Hook Verifies that the event hook matches the provided `eventHookId`.verifyEventHook
(String eventHookId, Map<String, String> additionalHeaders) Verify an Event Hook Verifies that the event hook matches the provided `eventHookId`.
-
Constructor Details
-
EventHookApi
public EventHookApi() -
EventHookApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
activateEventHook
Activate an Event Hook Activates the event hook that matches the provided `id`- Parameters:
eventHookId
- `id` of the Event Hook (required)- Returns:
- EventHook
- Throws:
ApiException
- if fails to make API call
-
activateEventHook
public EventHook activateEventHook(String eventHookId, Map<String, String> additionalHeaders) throws ApiExceptionActivate an Event Hook Activates the event hook that matches the provided `id`- Parameters:
eventHookId
- `id` of the Event Hook (required)additionalHeaders
- additionalHeaders for this call- Returns:
- EventHook
- Throws:
ApiException
- if fails to make API call
-
createEventHook
Create an Event Hook Creates a new event hook for your organization in `ACTIVE` status. You pass an event hook object in the JSON payload of your request. That object represents the set of required information about the event hook you're registering, including: * The URI of your external service * The [events](https://developer.okta.com/docs/reference/api/event-types/) in Okta you want to subscribe to * An optional event hook filter that can reduce the number of event hook calls. This is a self-service Early Access (EA) feature. See [Create an event hook filter](https://developer.okta.com/docs/concepts/event-hooks/#create-an-event-hook-filter). Additionally, you can specify a secret API key for Okta to pass to your external service endpoint for security verification. Note that the API key you set here is unrelated to the Okta API token you must supply when making calls to Okta APIs. Optionally, you can specify extra headers that Okta passes to your external service with each call. Your external service must use a valid HTTPS endpoint.- Parameters:
eventHook
- (required)- Returns:
- EventHook
- Throws:
ApiException
- if fails to make API call
-
createEventHook
public EventHook createEventHook(EventHook eventHook, Map<String, String> additionalHeaders) throws ApiExceptionCreate an Event Hook Creates a new event hook for your organization in `ACTIVE` status. You pass an event hook object in the JSON payload of your request. That object represents the set of required information about the event hook you're registering, including: * The URI of your external service * The [events](https://developer.okta.com/docs/reference/api/event-types/) in Okta you want to subscribe to * An optional event hook filter that can reduce the number of event hook calls. This is a self-service Early Access (EA) feature. See [Create an event hook filter](https://developer.okta.com/docs/concepts/event-hooks/#create-an-event-hook-filter). Additionally, you can specify a secret API key for Okta to pass to your external service endpoint for security verification. Note that the API key you set here is unrelated to the Okta API token you must supply when making calls to Okta APIs. Optionally, you can specify extra headers that Okta passes to your external service with each call. Your external service must use a valid HTTPS endpoint.- Parameters:
eventHook
- (required)additionalHeaders
- additionalHeaders for this call- Returns:
- EventHook
- Throws:
ApiException
- if fails to make API call
-
deactivateEventHook
Deactivate an Event Hook Deactivates the event hook that matches the provided `id`- Parameters:
eventHookId
- `id` of the Event Hook (required)- Returns:
- EventHook
- Throws:
ApiException
- if fails to make API call
-
deactivateEventHook
public EventHook deactivateEventHook(String eventHookId, Map<String, String> additionalHeaders) throws ApiExceptionDeactivate an Event Hook Deactivates the event hook that matches the provided `id`- Parameters:
eventHookId
- `id` of the Event Hook (required)additionalHeaders
- additionalHeaders for this call- Returns:
- EventHook
- Throws:
ApiException
- if fails to make API call
-
deleteEventHook
Delete an Event Hook Deletes the event hook that matches the provided `id`. After deletion, the event hook is unrecoverable. As a safety precaution, you can only delete event hooks with a status of `INACTIVE`.- Parameters:
eventHookId
- `id` of the Event Hook (required)- Throws:
ApiException
- if fails to make API call
-
deleteEventHook
public void deleteEventHook(String eventHookId, Map<String, String> additionalHeaders) throws ApiExceptionDelete an Event Hook Deletes the event hook that matches the provided `id`. After deletion, the event hook is unrecoverable. As a safety precaution, you can only delete event hooks with a status of `INACTIVE`.- Parameters:
eventHookId
- `id` of the Event Hook (required)additionalHeaders
- additionalHeaders for this call- Throws:
ApiException
- if fails to make API call
-
getEventHook
Retrieve an Event Hook Retrieves an event hook- Parameters:
eventHookId
- `id` of the Event Hook (required)- Returns:
- EventHook
- Throws:
ApiException
- if fails to make API call
-
getEventHook
public EventHook getEventHook(String eventHookId, Map<String, String> additionalHeaders) throws ApiExceptionRetrieve an Event Hook Retrieves an event hook- Parameters:
eventHookId
- `id` of the Event Hook (required)additionalHeaders
- additionalHeaders for this call- Returns:
- EventHook
- Throws:
ApiException
- if fails to make API call
-
listEventHooks
List all Event Hooks Lists all event hooks- Returns:
- List<EventHook>
- Throws:
ApiException
- if fails to make API call
-
listEventHooks
List all Event Hooks Lists all event hooks- Parameters:
additionalHeaders
- additionalHeaders for this call- Returns:
- List<EventHook>
- Throws:
ApiException
- if fails to make API call
-
replaceEventHook
Replace an Event Hook Replaces an event hook. Okta validates the new properties before replacing the existing values. Some event hook properties are immutable and can't be updated. Refer to the parameter description in the request body schema. >**Note:** Updating the `channel` property requires you to verify the hook again.- Parameters:
eventHookId
- `id` of the Event Hook (required)eventHook
- (required)- Returns:
- EventHook
- Throws:
ApiException
- if fails to make API call
-
replaceEventHook
public EventHook replaceEventHook(String eventHookId, EventHook eventHook, Map<String, String> additionalHeaders) throws ApiExceptionReplace an Event Hook Replaces an event hook. Okta validates the new properties before replacing the existing values. Some event hook properties are immutable and can't be updated. Refer to the parameter description in the request body schema. >**Note:** Updating the `channel` property requires you to verify the hook again.- Parameters:
eventHookId
- `id` of the Event Hook (required)eventHook
- (required)additionalHeaders
- additionalHeaders for this call- Returns:
- EventHook
- Throws:
ApiException
- if fails to make API call
-
verifyEventHook
Verify an Event Hook Verifies that the event hook matches the provided `eventHookId`. To verify ownership, your endpoint must send information back to Okta in JSON format. See [Event hooks](https://developer.okta.com/docs/concepts/event-hooks/#one-time-verification-request). Only `ACTIVE` and `VERIFIED` event hooks can receive events from Okta. If a response is not received within 3 seconds, the outbound request times out. One retry is attempted after a timeout or error response. If a successful response still isn't received, this operation returns a 400 error with more information about the failure.- Parameters:
eventHookId
- `id` of the Event Hook (required)- Returns:
- EventHook
- Throws:
ApiException
- if fails to make API call
-
verifyEventHook
public EventHook verifyEventHook(String eventHookId, Map<String, String> additionalHeaders) throws ApiExceptionVerify an Event Hook Verifies that the event hook matches the provided `eventHookId`. To verify ownership, your endpoint must send information back to Okta in JSON format. See [Event hooks](https://developer.okta.com/docs/concepts/event-hooks/#one-time-verification-request). Only `ACTIVE` and `VERIFIED` event hooks can receive events from Okta. If a response is not received within 3 seconds, the outbound request times out. One retry is attempted after a timeout or error response. If a successful response still isn't received, this operation returns a 400 error with more information about the failure.- Parameters:
eventHookId
- `id` of the Event Hook (required)additionalHeaders
- additionalHeaders for this call- Returns:
- EventHook
- Throws:
ApiException
- if fails to make API call
-
getObjectMapper
protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-