Skip to content

Latest commit

 

History

History
312 lines (213 loc) · 9.49 KB

OktaHookKeyApi.md

File metadata and controls

312 lines (213 loc) · 9.49 KB

Okta.PowerShell.Okta.PowerShell\Api.OktaHookKeyApi

All URIs are relative to https://subdomain.okta.com

Method HTTP request Description
Add-OktaHookKey POST /api/v1/hook-keys Create a key
Invoke-OktaDeleteHookKey DELETE /api/v1/hook-keys/{hookKeyId} Delete a key
Get-OktaHookKey GET /api/v1/hook-keys/{hookKeyId} Retrieve a key
Get-OktaPublicKey GET /api/v1/hook-keys/public/{keyId} Retrieve a public key
Invoke-OktaListHookKeys GET /api/v1/hook-keys List all keys
Invoke-OktaReplaceHookKey PUT /api/v1/hook-keys/{hookKeyId} Replace a key

Add-OktaHookKey

HookKey Add-OktaHookKey
        [-KeyRequest]

Create a key

Creates a key

Example

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-OktaConfiguration

# Configure your client ID and scope for authorization
$Configuration.ClientId = "YOUR_CLIENT_ID"
$Configuration.Scope = "OKTA_SCOPES" # for example okta.users.read

$KeyRequest = Initialize-KeyRequest -Name "MyName" # KeyRequest | 

# Create a key
try {
    $Result = Add-OktaHookKey -KeyRequest $KeyRequest
} catch {
    Write-Host ("Exception occurred when calling Add-OktaHookKey: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
KeyRequest KeyRequest

Return type

HookKey (PSCustomObject)

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Invoke-OktaDeleteHookKey

void Invoke-OktaDeleteHookKey
        [-HookKeyId]

Delete a key

Deletes a key by hookKeyId. Once deleted, the Hook Key is unrecoverable. As a safety precaution, unused keys are eligible for deletion.

Example

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-OktaConfiguration

# Configure your client ID and scope for authorization
$Configuration.ClientId = "YOUR_CLIENT_ID"
$Configuration.Scope = "OKTA_SCOPES" # for example okta.users.read

$HookKeyId = "MyHookKeyId" # String | 

# Delete a key
try {
    $Result = Invoke-OktaDeleteHookKey -HookKeyId $HookKeyId
} catch {
    Write-Host ("Exception occurred when calling Invoke-OktaDeleteHookKey: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
HookKeyId String

Return type

void (empty response body)

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Get-OktaHookKey

HookKey Get-OktaHookKey
        [-HookKeyId]

Retrieve a key

Retrieves a key by hookKeyId

Example

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-OktaConfiguration

# Configure your client ID and scope for authorization
$Configuration.ClientId = "YOUR_CLIENT_ID"
$Configuration.Scope = "OKTA_SCOPES" # for example okta.users.read

$HookKeyId = "MyHookKeyId" # String | 

# Retrieve a key
try {
    $Result = Get-OktaHookKey -HookKeyId $HookKeyId
} catch {
    Write-Host ("Exception occurred when calling Get-OktaHookKey: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
HookKeyId String

Return type

HookKey (PSCustomObject)

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Get-OktaPublicKey

JsonWebKey Get-OktaPublicKey
        [-KeyId]

Retrieve a public key

Retrieves a public key by keyId

Example

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-OktaConfiguration

# Configure your client ID and scope for authorization
$Configuration.ClientId = "YOUR_CLIENT_ID"
$Configuration.Scope = "OKTA_SCOPES" # for example okta.users.read

$KeyId = "MyKeyId" # String | 

# Retrieve a public key
try {
    $Result = Get-OktaPublicKey -KeyId $KeyId
} catch {
    Write-Host ("Exception occurred when calling Get-OktaPublicKey: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
KeyId String

Return type

JsonWebKey (PSCustomObject)

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Invoke-OktaListHookKeys

HookKey[] Invoke-OktaListHookKeys

List all keys

Lists all keys

Example

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-OktaConfiguration

# Configure your client ID and scope for authorization
$Configuration.ClientId = "YOUR_CLIENT_ID"
$Configuration.Scope = "OKTA_SCOPES" # for example okta.users.read


# List all keys
try {
    $Result = Invoke-OktaListHookKeys
} catch {
    Write-Host ("Exception occurred when calling Invoke-OktaListHookKeys: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

This endpoint does not need any parameter.

Return type

HookKey[] (PSCustomObject)

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Invoke-OktaReplaceHookKey

HookKey Invoke-OktaReplaceHookKey
        [-HookKeyId]
        [-KeyRequest]

Replace a key

Replace a key by hookKeyId

Example

# general setting of the PowerShell module, e.g. base URL, authentication, etc
$Configuration = Get-OktaConfiguration

# Configure your client ID and scope for authorization
$Configuration.ClientId = "YOUR_CLIENT_ID"
$Configuration.Scope = "OKTA_SCOPES" # for example okta.users.read

$HookKeyId = "MyHookKeyId" # String | 
$KeyRequest = Initialize-KeyRequest -Name "MyName" # KeyRequest | 

# Replace a key
try {
    $Result = Invoke-OktaReplaceHookKey -HookKeyId $HookKeyId -KeyRequest $KeyRequest
} catch {
    Write-Host ("Exception occurred when calling Invoke-OktaReplaceHookKey: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
HookKeyId String
KeyRequest KeyRequest

Return type

HookKey (PSCustomObject)

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]