All URIs are relative to https://subdomain.okta.com
Method | HTTP request | Description |
---|---|---|
CreateHookKey | POST /api/v1/hook-keys | Create a key |
DeleteHookKey | DELETE /api/v1/hook-keys/{hookKeyId} | Delete a key |
GetHookKey | GET /api/v1/hook-keys/{hookKeyId} | Retrieve a key |
GetPublicKey | GET /api/v1/hook-keys/public/{publicKeyId} | Retrieve a public key |
ListHookKeys | GET /api/v1/hook-keys | List all keys |
ReplaceHookKey | PUT /api/v1/hook-keys/{hookKeyId} | Replace a key |
HookKey CreateHookKey (KeyRequest keyRequest)
Create a key
Creates a key for use with other parts of the application, such as inline hooks Use the key name to access this key for inline hook operations. The total number of keys that you can create in an Okta org is limited to 50.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class CreateHookKeyExample
{
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 HookKeyApi(config);
var keyRequest = new KeyRequest(); // KeyRequest |
try
{
// Create a key
HookKey result = apiInstance.CreateHookKey(keyRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling HookKeyApi.CreateHookKey: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
keyRequest | KeyRequest |
- 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]
void DeleteHookKey (string hookKeyId)
Delete a key
Deletes a key by hookKeyId
. After being deleted, the key is unrecoverable. As a safety precaution, only keys that aren't being used are eligible for deletion.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class DeleteHookKeyExample
{
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 HookKeyApi(config);
var hookKeyId = XreKU5laGwBkjOTehusG; // string | `id` of the Hook Key
try
{
// Delete a key
apiInstance.DeleteHookKey(hookKeyId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling HookKeyApi.DeleteHookKey: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
hookKeyId | string | `id` of the Hook Key |
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]
HookKey GetHookKey (string hookKeyId)
Retrieve a key
Retrieves a key by hookKeyId
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class GetHookKeyExample
{
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 HookKeyApi(config);
var hookKeyId = XreKU5laGwBkjOTehusG; // string | `id` of the Hook Key
try
{
// Retrieve a key
HookKey result = apiInstance.GetHookKey(hookKeyId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling HookKeyApi.GetHookKey: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
hookKeyId | string | `id` of the Hook Key |
- 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]
JsonWebKey GetPublicKey (string publicKeyId)
Retrieve a public key
Retrieves a public key by keyId
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class GetPublicKeyExample
{
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 HookKeyApi(config);
var publicKeyId = FcH2P9Eg7wr0o8N2FuV0; // string | `id` of the Public Key
try
{
// Retrieve a public key
JsonWebKey result = apiInstance.GetPublicKey(publicKeyId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling HookKeyApi.GetPublicKey: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
publicKeyId | string | `id` of the Public Key |
- 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<HookKey> ListHookKeys ()
List all keys
Lists all keys
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ListHookKeysExample
{
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 HookKeyApi(config);
try
{
// List all keys
List<HookKey> result = apiInstance.ListHookKeys().ToListAsync();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling HookKeyApi.ListHookKeys: " + 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]
HookKey ReplaceHookKey (string hookKeyId, KeyRequest keyRequest)
Replace a key
Replaces a key by hookKeyId
This request replaces existing properties after passing validation. Note: The only parameter that you can update is the name of the key, which must be unique at all times.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ReplaceHookKeyExample
{
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 HookKeyApi(config);
var hookKeyId = XreKU5laGwBkjOTehusG; // string | `id` of the Hook Key
var keyRequest = new KeyRequest(); // KeyRequest |
try
{
// Replace a key
HookKey result = apiInstance.ReplaceHookKey(hookKeyId, keyRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling HookKeyApi.ReplaceHookKey: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
hookKeyId | string | `id` of the Hook Key | |
keyRequest | KeyRequest |
- 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]