All URIs are relative to https://subdomain.okta.com
Method | HTTP request | Description |
---|---|---|
ActivateEventHook | POST /api/v1/eventHooks/{eventHookId}/lifecycle/activate | Activate an Event Hook |
CreateEventHook | POST /api/v1/eventHooks | Create an Event Hook |
DeactivateEventHook | POST /api/v1/eventHooks/{eventHookId}/lifecycle/deactivate | Deactivate an Event Hook |
DeleteEventHook | DELETE /api/v1/eventHooks/{eventHookId} | Delete an Event Hook |
GetEventHook | GET /api/v1/eventHooks/{eventHookId} | Retrieve an Event Hook |
ListEventHooks | GET /api/v1/eventHooks | List all Event Hooks |
ReplaceEventHook | PUT /api/v1/eventHooks/{eventHookId} | Replace an Event Hook |
VerifyEventHook | POST /api/v1/eventHooks/{eventHookId}/lifecycle/verify | Verify an Event Hook |
EventHook ActivateEventHook (string eventHookId)
Activate an Event Hook
Activates the event hook that matches the provided id
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ActivateEventHookExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new EventHookApi(config);
var eventHookId = who8vt36qfNpCGz9H1e6; // string | `id` of the Event Hook
try
{
// Activate an Event Hook
EventHook result = apiInstance.ActivateEventHook(eventHookId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EventHookApi.ActivateEventHook: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
eventHookId | string | `id` of the Event Hook |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EventHook CreateEventHook (EventHook eventHook)
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 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. 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.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class CreateEventHookExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new EventHookApi(config);
var eventHook = new EventHook(); // EventHook |
try
{
// Create an Event Hook
EventHook result = apiInstance.CreateEventHook(eventHook);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EventHookApi.CreateEventHook: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
eventHook | EventHook |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
400 | Bad Request | - |
403 | Forbidden | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EventHook DeactivateEventHook (string eventHookId)
Deactivate an Event Hook
Deactivates the event hook that matches the provided id
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class DeactivateEventHookExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new EventHookApi(config);
var eventHookId = who8vt36qfNpCGz9H1e6; // string | `id` of the Event Hook
try
{
// Deactivate an Event Hook
EventHook result = apiInstance.DeactivateEventHook(eventHookId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EventHookApi.DeactivateEventHook: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
eventHookId | string | `id` of the Event Hook |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteEventHook (string eventHookId)
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
.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class DeleteEventHookExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new EventHookApi(config);
var eventHookId = who8vt36qfNpCGz9H1e6; // string | `id` of the Event Hook
try
{
// Delete an Event Hook
apiInstance.DeleteEventHook(eventHookId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EventHookApi.DeleteEventHook: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
eventHookId | string | `id` of the Event Hook |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EventHook GetEventHook (string eventHookId)
Retrieve an Event Hook
Retrieves an event hook
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class GetEventHookExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new EventHookApi(config);
var eventHookId = who8vt36qfNpCGz9H1e6; // string | `id` of the Event Hook
try
{
// Retrieve an Event Hook
EventHook result = apiInstance.GetEventHook(eventHookId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EventHookApi.GetEventHook: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
eventHookId | string | `id` of the Event Hook |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<EventHook> ListEventHooks ()
List all Event Hooks
Lists all event hooks
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ListEventHooksExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new EventHookApi(config);
try
{
// List all Event Hooks
List<EventHook> result = apiInstance.ListEventHooks().ToListAsync();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EventHookApi.ListEventHooks: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
403 | Forbidden | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EventHook ReplaceEventHook (string eventHookId, EventHook eventHook)
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.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ReplaceEventHookExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new EventHookApi(config);
var eventHookId = who8vt36qfNpCGz9H1e6; // string | `id` of the Event Hook
var eventHook = new EventHook(); // EventHook |
try
{
// Replace an Event Hook
EventHook result = apiInstance.ReplaceEventHook(eventHookId, eventHook);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EventHookApi.ReplaceEventHook: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
eventHookId | string | `id` of the Event Hook | |
eventHook | EventHook |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
400 | Bad Request | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EventHook VerifyEventHook (string eventHookId)
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. 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.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class VerifyEventHookExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new EventHookApi(config);
var eventHookId = who8vt36qfNpCGz9H1e6; // string | `id` of the Event Hook
try
{
// Verify an Event Hook
EventHook result = apiInstance.VerifyEventHook(eventHookId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EventHookApi.VerifyEventHook: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
eventHookId | string | `id` of the Event Hook |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
400 | Bad Request | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]