Skip to content

Latest commit

 

History

History
276 lines (188 loc) · 9.69 KB

OktaPushProviderApi.md

File metadata and controls

276 lines (188 loc) · 9.69 KB

Okta.PowerShell.Okta.PowerShell\Api.OktaPushProviderApi

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

Method HTTP request Description
New-OktaPushProvider POST /api/v1/push-providers Create a Push Provider
Invoke-OktaDeletePushProvider DELETE /api/v1/push-providers/{pushProviderId} Delete a Push Provider
Get-OktaPushProvider GET /api/v1/push-providers/{pushProviderId} Retrieve a Push Provider
Invoke-OktaListPushProviders GET /api/v1/push-providers List all Push Providers
Update-OktaPushProvider PUT /api/v1/push-providers/{pushProviderId} Replace a Push Provider

New-OktaPushProvider

PushProvider New-OktaPushProvider
        [-PushProvider]

Create a Push Provider

Adds a new push provider to your organization.

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

$HrefObjectHints = Initialize-HrefObjectHints -Allow "DELETE"
$HrefObject = Initialize-HrefObject -Hints $HrefObjectHints -Href "MyHref" -Name "MyName" -Type "MyType"

$ApiTokenLink = Initialize-ApiTokenLink -Self $HrefObject

$PushProvider = Initialize-PushProvider -Id "MyId" -LastUpdatedDate "MyLastUpdatedDate" -Name "MyName" -ProviderType "APNS" -Links $ApiTokenLink # PushProvider | 

# Create a Push Provider
try {
    $Result = New-OktaPushProvider -PushProvider $PushProvider
} catch {
    Write-Host ("Exception occurred when calling New-OktaPushProvider: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
PushProvider PushProvider

Return type

PushProvider (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-OktaDeletePushProvider

void Invoke-OktaDeletePushProvider
        [-PushProviderId]

Delete a Push Provider

Delete a push provider by pushProviderId. If the push provider is currently being used in the org by a custom authenticator, the delete will not be allowed.

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

$PushProviderId = "MyPushProviderId" # String | Id of the push provider

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

Parameters

Name Type Description Notes
PushProviderId String Id of the push provider

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-OktaPushProvider

PushProvider Get-OktaPushProvider
        [-PushProviderId]

Retrieve a Push Provider

Fetches a push provider by pushProviderId.

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

$PushProviderId = "MyPushProviderId" # String | Id of the push provider

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

Parameters

Name Type Description Notes
PushProviderId String Id of the push provider

Return type

PushProvider (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-OktaListPushProviders

PushProvider[] Invoke-OktaListPushProviders
        [-Type]

List all Push Providers

Enumerates push providers in your organization.

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

$Type = "APNS" # ProviderType | Filters push providers by `providerType` (optional)

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

Parameters

Name Type Description Notes
Type ProviderType Filters push providers by `providerType` [optional]

Return type

PushProvider[] (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]

Update-OktaPushProvider

PushProvider Update-OktaPushProvider
        [-PushProviderId]
        [-PushProvider]

Replace a Push Provider

Updates a push provider by pushProviderId.

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

$PushProviderId = "MyPushProviderId" # String | Id of the push provider
$HrefObjectHints = Initialize-HrefObjectHints -Allow "DELETE"
$HrefObject = Initialize-HrefObject -Hints $HrefObjectHints -Href "MyHref" -Name "MyName" -Type "MyType"

$ApiTokenLink = Initialize-ApiTokenLink -Self $HrefObject

$PushProvider = Initialize-PushProvider -Id "MyId" -LastUpdatedDate "MyLastUpdatedDate" -Name "MyName" -ProviderType "APNS" -Links $ApiTokenLink # PushProvider | 

# Replace a Push Provider
try {
    $Result = Update-OktaPushProvider -PushProviderId $PushProviderId -PushProvider $PushProvider
} catch {
    Write-Host ("Exception occurred when calling Update-OktaPushProvider: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
PushProviderId String Id of the push provider
PushProvider PushProvider

Return type

PushProvider (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]