Skip to content

Latest commit

 

History

History
373 lines (254 loc) · 13.3 KB

OktaBehaviorApi.md

File metadata and controls

373 lines (254 loc) · 13.3 KB

Okta.PowerShell.Okta.PowerShell\Api.OktaBehaviorApi

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

Method HTTP request Description
Invoke-OktaActivateBehaviorDetectionRule POST /api/v1/behaviors/{behaviorId}/lifecycle/activate Activate a Behavior Detection Rule
New-OktaBehaviorDetectionRule POST /api/v1/behaviors Create a Behavior Detection Rule
Invoke-OktaDeactivateBehaviorDetectionRule POST /api/v1/behaviors/{behaviorId}/lifecycle/deactivate Deactivate a Behavior Detection Rule
Invoke-OktaDeleteBehaviorDetectionRule DELETE /api/v1/behaviors/{behaviorId} Delete a Behavior Detection Rule
Get-OktaBehaviorDetectionRule GET /api/v1/behaviors/{behaviorId} Retrieve a Behavior Detection Rule
Invoke-OktaListBehaviorDetectionRules GET /api/v1/behaviors List all Behavior Detection Rules
Update-OktaBehaviorDetectionRule PUT /api/v1/behaviors/{behaviorId} Replace a Behavior Detection Rule

Invoke-OktaActivateBehaviorDetectionRule

BehaviorRule Invoke-OktaActivateBehaviorDetectionRule
        [-BehaviorId]

Activate a Behavior Detection Rule

Activate Behavior Detection Rule

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

$BehaviorId = "abcd1234" # String | id of the Behavior Detection Rule

# Activate a Behavior Detection Rule
try {
    $Result = Invoke-OktaActivateBehaviorDetectionRule -BehaviorId $BehaviorId
} catch {
    Write-Host ("Exception occurred when calling Invoke-OktaActivateBehaviorDetectionRule: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
BehaviorId String id of the Behavior Detection Rule

Return type

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

New-OktaBehaviorDetectionRule

BehaviorRule New-OktaBehaviorDetectionRule
        [-Rule]

Create a Behavior Detection Rule

Adds a new Behavior Detection Rule 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

$BehaviorRule = Initialize-BehaviorRule -Created (Get-Date) -Id "MyId" -LastUpdated (Get-Date) -Name "MyName" -Status "ACTIVE" -Type "ANOMALOUS_DEVICE" -Link $ApiTokenLink # BehaviorRule | 

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

Parameters

Name Type Description Notes
Rule BehaviorRule

Return type

BehaviorRule (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-OktaDeactivateBehaviorDetectionRule

BehaviorRule Invoke-OktaDeactivateBehaviorDetectionRule
        [-BehaviorId]

Deactivate a Behavior Detection Rule

Deactivate Behavior Detection Rule

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

$BehaviorId = "abcd1234" # String | id of the Behavior Detection Rule

# Deactivate a Behavior Detection Rule
try {
    $Result = Invoke-OktaDeactivateBehaviorDetectionRule -BehaviorId $BehaviorId
} catch {
    Write-Host ("Exception occurred when calling Invoke-OktaDeactivateBehaviorDetectionRule: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
BehaviorId String id of the Behavior Detection Rule

Return type

BehaviorRule (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-OktaDeleteBehaviorDetectionRule

void Invoke-OktaDeleteBehaviorDetectionRule
        [-BehaviorId]

Delete a Behavior Detection Rule

Delete a Behavior Detection Rule by behaviorId.

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

$BehaviorId = "abcd1234" # String | id of the Behavior Detection Rule

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

Parameters

Name Type Description Notes
BehaviorId String id of the Behavior Detection Rule

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

BehaviorRule Get-OktaBehaviorDetectionRule
        [-BehaviorId]

Retrieve a Behavior Detection Rule

Fetches a Behavior Detection Rule by behaviorId.

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

$BehaviorId = "abcd1234" # String | id of the Behavior Detection Rule

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

Parameters

Name Type Description Notes
BehaviorId String id of the Behavior Detection Rule

Return type

BehaviorRule (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-OktaListBehaviorDetectionRules

BehaviorRule[] Invoke-OktaListBehaviorDetectionRules

List all Behavior Detection Rules

Enumerates Behavior Detection Rules in your organization with pagination.

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 Behavior Detection Rules
try {
    $Result = Invoke-OktaListBehaviorDetectionRules
} catch {
    Write-Host ("Exception occurred when calling Invoke-OktaListBehaviorDetectionRules: {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

BehaviorRule[] (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-OktaBehaviorDetectionRule

BehaviorRule Update-OktaBehaviorDetectionRule
        [-BehaviorId]
        [-Rule]

Replace a Behavior Detection Rule

Update a Behavior Detection Rule by behaviorId.

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

$BehaviorId = "abcd1234" # String | id of the Behavior Detection Rule
$HrefObjectHints = Initialize-HrefObjectHints -Allow "DELETE"
$HrefObject = Initialize-HrefObject -Hints $HrefObjectHints -Href "MyHref" -Name "MyName" -Type "MyType"

$ApiTokenLink = Initialize-ApiTokenLink -Self $HrefObject

$BehaviorRule = Initialize-BehaviorRule -Created (Get-Date) -Id "MyId" -LastUpdated (Get-Date) -Name "MyName" -Status "ACTIVE" -Type "ANOMALOUS_DEVICE" -Link $ApiTokenLink # BehaviorRule | 

# Replace a Behavior Detection Rule
try {
    $Result = Update-OktaBehaviorDetectionRule -BehaviorId $BehaviorId -Rule $Rule
} catch {
    Write-Host ("Exception occurred when calling Update-OktaBehaviorDetectionRule: {0}" -f ($_.ErrorDetails | ConvertFrom-Json))
    Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json))
}

Parameters

Name Type Description Notes
BehaviorId String id of the Behavior Detection Rule
Rule BehaviorRule

Return type

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