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 Details

    • EventHookApi

      public EventHookApi()
    • EventHookApi

      public EventHookApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • activateEventHook

      public EventHook activateEventHook(String eventHookId) throws ApiException
      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 ApiException
      Activate 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

      public EventHook createEventHook(EventHook eventHook) throws ApiException
      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 ApiException
      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)
      additionalHeaders - additionalHeaders for this call
      Returns:
      EventHook
      Throws:
      ApiException - if fails to make API call
    • deactivateEventHook

      public EventHook deactivateEventHook(String eventHookId) throws ApiException
      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 ApiException
      Deactivate 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

      public void deleteEventHook(String eventHookId) throws ApiException
      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 ApiException
      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)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getEventHook

      public EventHook getEventHook(String eventHookId) throws ApiException
      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 ApiException
      Retrieve 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

      public List<EventHook> listEventHooks() throws ApiException
      List all Event Hooks Lists all event hooks
      Returns:
      List<EventHook>
      Throws:
      ApiException - if fails to make API call
    • listEventHooks

      public List<EventHook> listEventHooks(Map<String,String> additionalHeaders) throws ApiException
      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

      public EventHook replaceEventHook(String eventHookId, EventHook eventHook) throws ApiException
      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 ApiException
      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)
      additionalHeaders - additionalHeaders for this call
      Returns:
      EventHook
      Throws:
      ApiException - if fails to make API call
    • verifyEventHook

      public EventHook verifyEventHook(String eventHookId) throws ApiException
      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 ApiException
      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)
      additionalHeaders - additionalHeaders for this call
      Returns:
      EventHook
      Throws:
      ApiException - if fails to make API call
    • getObjectMapper

      protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()