Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.

Okta Integration

Configure your Datadog Okta integration directly through the Datadog API.

GET https://api.ap1.datadoghq.com/api/v2/integrations/okta/accountshttps://api.datadoghq.eu/api/v2/integrations/okta/accountshttps://api.ddog-gov.com/api/v2/integrations/okta/accountshttps://api.datadoghq.com/api/v2/integrations/okta/accountshttps://api.us3.datadoghq.com/api/v2/integrations/okta/accountshttps://api.us5.datadoghq.com/api/v2/integrations/okta/accounts

Présentation

List Okta accounts. This endpoint requires the integrations_read permission.

Réponse

OK

The expected response schema when getting Okta accounts.

Expand All

Champ

Type

Description

data

[object]

List of Okta accounts.

attributes [required]

object

Attributes object for an Okta account.

api_key

string

The API key of the Okta account.

auth_method [required]

string

The authorization method for an Okta account.

client_id

string

The Client ID of an Okta app integration.

client_secret

string

The client secret of an Okta app integration.

domain [required]

string

The domain of the Okta account.

name [required]

string

The name of the Okta account.

id [required]

string

The ID of the Okta account, a UUID hash of the account name.

type [required]

enum

Account type for an Okta account. Allowed enum values: okta-accounts

default: okta-accounts

{
  "data": [
    {
      "attributes": {
        "api_key": "string",
        "auth_method": "oauth",
        "client_id": "string",
        "client_secret": "string",
        "domain": "https://example.okta.com/",
        "name": "Okta-Prod"
      },
      "id": "f749daaf-682e-4208-a38d-c9b43162c609",
      "type": "okta-accounts"
    }
  ]
}

Bad Request

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Forbidden

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Exemple de code

# List Okta accounts returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::OktaIntegrationAPI.new
p api_instance.list_okta_accounts()

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"

POST https://api.ap1.datadoghq.com/api/v2/integrations/okta/accountshttps://api.datadoghq.eu/api/v2/integrations/okta/accountshttps://api.ddog-gov.com/api/v2/integrations/okta/accountshttps://api.datadoghq.com/api/v2/integrations/okta/accountshttps://api.us3.datadoghq.com/api/v2/integrations/okta/accountshttps://api.us5.datadoghq.com/api/v2/integrations/okta/accounts

Présentation

Create an Okta account. This endpoint requires the manage_integrations permission.

Requête

Body Data (required)

Expand All

Champ

Type

Description

data [required]

object

Schema for an Okta account.

attributes [required]

object

Attributes object for an Okta account.

api_key

string

The API key of the Okta account.

auth_method [required]

string

The authorization method for an Okta account.

client_id

string

The Client ID of an Okta app integration.

client_secret

string

The client secret of an Okta app integration.

domain [required]

string

The domain of the Okta account.

name [required]

string

The name of the Okta account.

id

string

The ID of the Okta account, a UUID hash of the account name.

type [required]

enum

Account type for an Okta account. Allowed enum values: okta-accounts

default: okta-accounts

{
  "data": {
    "attributes": {
      "auth_method": "oauth",
      "domain": "https://example.okta.com/",
      "name": "exampleoktaintegration",
      "client_id": "client_id",
      "client_secret": "client_secret"
    },
    "id": "f749daaf-682e-4208-a38d-c9b43162c609",
    "type": "okta-accounts"
  }
}

Réponse

OK

Response object for an Okta account.

Expand All

Champ

Type

Description

data

object

Schema for an Okta account.

attributes [required]

object

Attributes object for an Okta account.

api_key

string

The API key of the Okta account.

auth_method [required]

string

The authorization method for an Okta account.

client_id

string

The Client ID of an Okta app integration.

client_secret

string

The client secret of an Okta app integration.

domain [required]

string

The domain of the Okta account.

name [required]

string

The name of the Okta account.

id

string

The ID of the Okta account, a UUID hash of the account name.

type [required]

enum

Account type for an Okta account. Allowed enum values: okta-accounts

default: okta-accounts

{
  "data": {
    "attributes": {
      "api_key": "string",
      "auth_method": "oauth",
      "client_id": "string",
      "client_secret": "string",
      "domain": "https://example.okta.com/",
      "name": "Okta-Prod"
    },
    "id": "f749daaf-682e-4208-a38d-c9b43162c609",
    "type": "okta-accounts"
  }
}

Bad Request

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Forbidden

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Exemple de code

# Add Okta account returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::OktaIntegrationAPI.new

body = DatadogAPIClient::V2::OktaAccountRequest.new({
  data: DatadogAPIClient::V2::OktaAccount.new({
    attributes: DatadogAPIClient::V2::OktaAccountAttributes.new({
      auth_method: "oauth",
      domain: "https://example.okta.com/",
      name: "exampleoktaintegration",
      client_id: "client_id",
      client_secret: "client_secret",
    }),
    id: "f749daaf-682e-4208-a38d-c9b43162c609",
    type: DatadogAPIClient::V2::OktaAccountType::OKTA_ACCOUNTS,
  }),
})
p api_instance.create_okta_account(body)

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"

GET https://api.ap1.datadoghq.com/api/v2/integrations/okta/accounts/{account_id}https://api.datadoghq.eu/api/v2/integrations/okta/accounts/{account_id}https://api.ddog-gov.com/api/v2/integrations/okta/accounts/{account_id}https://api.datadoghq.com/api/v2/integrations/okta/accounts/{account_id}https://api.us3.datadoghq.com/api/v2/integrations/okta/accounts/{account_id}https://api.us5.datadoghq.com/api/v2/integrations/okta/accounts/{account_id}

Présentation

Get an Okta account. This endpoint requires the integrations_read permission.

Arguments

Paramètres du chemin

Nom

Type

Description

account_id [required]

string

None

Réponse

OK

Response object for an Okta account.

Expand All

Champ

Type

Description

data

object

Schema for an Okta account.

attributes [required]

object

Attributes object for an Okta account.

api_key

string

The API key of the Okta account.

auth_method [required]

string

The authorization method for an Okta account.

client_id

string

The Client ID of an Okta app integration.

client_secret

string

The client secret of an Okta app integration.

domain [required]

string

The domain of the Okta account.

name [required]

string

The name of the Okta account.

id

string

The ID of the Okta account, a UUID hash of the account name.

type [required]

enum

Account type for an Okta account. Allowed enum values: okta-accounts

default: okta-accounts

{
  "data": {
    "attributes": {
      "api_key": "string",
      "auth_method": "oauth",
      "client_id": "string",
      "client_secret": "string",
      "domain": "https://example.okta.com/",
      "name": "Okta-Prod"
    },
    "id": "f749daaf-682e-4208-a38d-c9b43162c609",
    "type": "okta-accounts"
  }
}

Bad Request

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Forbidden

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Exemple de code

# Get Okta account returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::OktaIntegrationAPI.new

# there is a valid "okta_account" in the system
OKTA_ACCOUNT_DATA_ID = ENV["OKTA_ACCOUNT_DATA_ID"]
p api_instance.get_okta_account(OKTA_ACCOUNT_DATA_ID)

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"

PATCH https://api.ap1.datadoghq.com/api/v2/integrations/okta/accounts/{account_id}https://api.datadoghq.eu/api/v2/integrations/okta/accounts/{account_id}https://api.ddog-gov.com/api/v2/integrations/okta/accounts/{account_id}https://api.datadoghq.com/api/v2/integrations/okta/accounts/{account_id}https://api.us3.datadoghq.com/api/v2/integrations/okta/accounts/{account_id}https://api.us5.datadoghq.com/api/v2/integrations/okta/accounts/{account_id}

Présentation

Update an Okta account. This endpoint requires the manage_integrations permission.

Arguments

Paramètres du chemin

Nom

Type

Description

account_id [required]

string

None

Requête

Body Data (required)

Expand All

Champ

Type

Description

data [required]

object

Data object for updating an Okta account.

attributes

object

Attributes object for updating an Okta account.

api_key

string

The API key of the Okta account.

auth_method [required]

string

The authorization method for an Okta account.

client_id

string

The Client ID of an Okta app integration.

client_secret

string

The client secret of an Okta app integration.

domain [required]

string

The domain associated with an Okta account.

type

enum

Account type for an Okta account. Allowed enum values: okta-accounts

default: okta-accounts

{
  "data": {
    "attributes": {
      "auth_method": "oauth",
      "domain": "https://example.okta.com/",
      "client_id": "client_id",
      "client_secret": "client_secret"
    },
    "type": "okta-accounts"
  }
}

Réponse

OK

Response object for an Okta account.

Expand All

Champ

Type

Description

data

object

Schema for an Okta account.

attributes [required]

object

Attributes object for an Okta account.

api_key

string

The API key of the Okta account.

auth_method [required]

string

The authorization method for an Okta account.

client_id

string

The Client ID of an Okta app integration.

client_secret

string

The client secret of an Okta app integration.

domain [required]

string

The domain of the Okta account.

name [required]

string

The name of the Okta account.

id

string

The ID of the Okta account, a UUID hash of the account name.

type [required]

enum

Account type for an Okta account. Allowed enum values: okta-accounts

default: okta-accounts

{
  "data": {
    "attributes": {
      "api_key": "string",
      "auth_method": "oauth",
      "client_id": "string",
      "client_secret": "string",
      "domain": "https://example.okta.com/",
      "name": "Okta-Prod"
    },
    "id": "f749daaf-682e-4208-a38d-c9b43162c609",
    "type": "okta-accounts"
  }
}

Bad Request

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Forbidden

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Exemple de code

# Update Okta account returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::OktaIntegrationAPI.new

# there is a valid "okta_account" in the system
OKTA_ACCOUNT_DATA_ID = ENV["OKTA_ACCOUNT_DATA_ID"]

body = DatadogAPIClient::V2::OktaAccountUpdateRequest.new({
  data: DatadogAPIClient::V2::OktaAccountUpdateRequestData.new({
    attributes: DatadogAPIClient::V2::OktaAccountUpdateRequestAttributes.new({
      auth_method: "oauth",
      domain: "https://example.okta.com/",
      client_id: "client_id",
      client_secret: "client_secret",
    }),
    type: DatadogAPIClient::V2::OktaAccountType::OKTA_ACCOUNTS,
  }),
})
p api_instance.update_okta_account(OKTA_ACCOUNT_DATA_ID, body)

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"

DELETE https://api.ap1.datadoghq.com/api/v2/integrations/okta/accounts/{account_id}https://api.datadoghq.eu/api/v2/integrations/okta/accounts/{account_id}https://api.ddog-gov.com/api/v2/integrations/okta/accounts/{account_id}https://api.datadoghq.com/api/v2/integrations/okta/accounts/{account_id}https://api.us3.datadoghq.com/api/v2/integrations/okta/accounts/{account_id}https://api.us5.datadoghq.com/api/v2/integrations/okta/accounts/{account_id}

Présentation

Delete an Okta account. This endpoint requires the manage_integrations permission.

Arguments

Paramètres du chemin

Nom

Type

Description

account_id [required]

string

None

Réponse

OK

Bad Request

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Forbidden

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Not Found

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Exemple de code

# Delete Okta account returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::OktaIntegrationAPI.new
api_instance.delete_okta_account("account_id")

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"