Organizations
Dash が新機能を発表!インシデントマネジメント、Continuous Profiler など多数の機能が追加されました! Dash イベントで発表された新機能!

Organizations

Organization を作成、編集、および管理します。マルチ Organization のアカウントについては、こちらを参照してください

子組織を作成する

POST https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/org

概要

子オーガニゼーションを作成します。

このエンドポイントにはマルチオーガニゼーションアカウント 機能が必要です。 サポートに連絡して有効化してください。

新しい子オーガニゼーションが作成されたら、応答で渡されたorg.public_idpi_key.keyapplication_key.hash を使用して操作することができます。

リクエスト

Body Data (required)

作成が必要となるオーガニゼーションのオブジェクト

Expand All

フィールド

種類

説明

billing [required]

object

A JSON array of billing type.

type

string

The type of billing. Only parent_billing is supported.

name [required]

string

The name of the new child-organization, limited to 32 characters.

subscription [required]

object

Subscription definition.

type

string

The subscription type. Types available are trial, free, and pro.

{
  "billing": {
    "type": "string"
  },
  "name": "New child org",
  "subscription": {
    "type": "string"
  }
}

応答

OK

Response object for an organization creation.

Expand All

フィールド

種類

説明

api_key

object

Datadog API key.

created

string

Date of creation of the API key.

created_by

string

Datadog user handle that created the API key.

key

string

API key.

name

string

Name of your API key.

application_key

object

An application key with its associated metadata.

hash

string

Hash of an application key.

name

string

Name of an application key.

owner

string

Owner of an application key.

org

object

Create, edit, and manage organizations.

billing

object

A JSON array of billing type.

type

string

The type of billing. Only parent_billing is supported.

created

string

Date of the organization creation.

description

string

Description of the organization.

name

string

The name of the new child-organization, limited to 32 characters.

public_id

string

The public_id of the organization you are operating within.

settings

object

A JSON array of settings.

private_widget_share

boolean

Whether or not the organization users can share widgets outside of Datadog.

saml

object

Set the boolean property enabled to enable or disable single sign on with SAML. See the SAML documentation for more information about all SAML settings.

enabled

boolean

Whether or not SAML is enabled for this organization.

saml_autocreate_access_role

enum

The access role of the user. Options are st (standard user), adm (admin user), or ro (read-only user). Allowed enum values: st,adm,ro,ERROR

saml_autocreate_users_domains

object

Has two properties, enabled (boolean) and domains, which is a list of domains without the @ symbol.

domains

[string]

List of domains where the SAML automated user creation is enabled.

enabled

boolean

Whether or not the automated user creation based on SAML domain is enabled.

saml_can_be_enabled

boolean

Whether or not SAML can be enabled for this organization.

saml_idp_endpoint

string

Identity provider endpoint for SAML authentication.

saml_idp_initiated_login

object

Has one property enabled (boolean).

enabled

boolean

Whether SAML IdP initiated login is enabled, learn more in the SAML documentation.

saml_idp_metadata_uploaded

boolean

Whether or not a SAML identity provider metadata file was provided to the Datadog organization.

saml_login_url

string

URL for SAML logging.

saml_strict_mode

object

Has one property enabled (boolean).

enabled

boolean

Whether or not the SAML strict mode is enabled. If true, all users must log in with SAML. Learn more on the SAML Strict documentation.

subscription

object

Subscription definition.

type

string

The subscription type. Types available are trial, free, and pro.

user

object

Create, edit, and disable users.

access_role

enum

The access role of the user. Options are st (standard user), adm (admin user), or ro (read-only user). Allowed enum values: st,adm,ro,ERROR

disabled

boolean

The new disabled status of the user.

email

email

The new email of the user.

handle

email

The user handle, must be a valid email.

icon

string

Gravatar icon associated to the user.

name

string

The name of the user.

verified

boolean

Whether or not the user logged in Datadog at least once.

{
  "api_key": {
    "created": "2019-08-02 15:31:07",
    "created_by": "john@example.com",
    "key": "1234512345123456abcabc912349abcd",
    "name": "example user"
  },
  "application_key": {
    "hash": "1234512345123459cda4eb9ced49a3d84fd0138c",
    "name": "example user",
    "owner": "example.com"
  },
  "org": {
    "billing": {
      "type": "string"
    },
    "created": "2019-09-26T17:28:28Z",
    "description": "some description",
    "name": "New child org",
    "public_id": "abcdef12345",
    "settings": {
      "private_widget_share": false,
      "saml": {
        "enabled": false
      },
      "saml_autocreate_access_role": "st",
      "saml_autocreate_users_domains": {
        "domains": [
          "example.com"
        ],
        "enabled": false
      },
      "saml_can_be_enabled": false,
      "saml_idp_endpoint": "https://my.saml.endpoint",
      "saml_idp_initiated_login": {
        "enabled": false
      },
      "saml_idp_metadata_uploaded": false,
      "saml_login_url": "https://my.saml.login.url",
      "saml_strict_mode": {
        "enabled": false
      }
    },
    "subscription": {
      "type": "string"
    }
  },
  "user": {
    "access_role": "st",
    "disabled": false,
    "email": "test@datadoghq.com",
    "handle": "test@datadoghq.com",
    "icon": "/path/to/matching/gravatar/icon",
    "name": "test user",
    "verified": true
  }
}

Bad Request

Error response object.

Expand All

フィールド

種類

説明

errors [required]

[string]

Array of errors returned by the API.

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

Forbidden

Error response object.

Expand All

フィールド

種類

説明

errors [required]

[string]

Array of errors returned by the API.

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

コード例


                                        # Curl command
curl -X POST "https://api.datadoghq.com"https://api.datadoghq.eu/api/v1/org" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}" \
-d @- << EOF
{
  "billing": {},
  "name": "New child org",
  "subscription": {}
}
EOF
package main

import (
    "context"
    "fmt"
    "os"
    datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
    ctx := context.WithValue(
        context.Background(),
        datadog.ContextAPIKeys,
        map[string]datadog.APIKey{
            "apiKeyAuth": {
                Key: os.Getenv("DD_CLIENT_API_KEY"),
            },
            "appKeyAuth": {
                Key: os.Getenv("DD_CLIENT_APP_KEY"),
            },
        },
    )

    body := *datadog.NewOrganizationCreateBody(*datadog.NewOrganizationBilling(), "Name_example", *datadog.NewOrganizationSubscription()) // OrganizationCreateBody | Organization object that needs to be created

    configuration := datadog.NewConfiguration()
    api_client := datadog.NewAPIClient(configuration)
    resp, r, err := api_client.OrganizationsApi.CreateChildOrg(context.Background()).Body(body).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.CreateChildOrg``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CreateChildOrg`: OrganizationCreateResponse
    fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.CreateChildOrg`: %v\n", resp)
}
// Import classes:
import com.datadog.api.v1.client.ApiClient;
import com.datadog.api.v1.client.ApiException;
import com.datadog.api.v1.client.Configuration;
import com.datadog.api.v1.client.auth.*;
import com.datadog.api.v1.client.model.*;
import com.datadog.api.v1.client.api.OrganizationsApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure the Datadog site to send API calls to
        HashMap<String, String> serverVariables = new HashMap<String, String>();
        String site = System.getenv("DD_SITE");
        if (site != null) {
            serverVariables.put("site", site);
            defaultClient.setServerVariables(serverVariables);
        }
        // Configure API key authorization: 
        HashMap<String, String> secrets = new HashMap<String, String>();
        secrets.put("apiKeyAuth", System.getenv("DD_CLIENT_API_KEY"));
        secrets.put("appKeyAuth", System.getenv("DD_CLIENT_APP_KEY"));
        defaultClient.configureApiKeys(secrets);

        OrganizationsApi apiInstance = new OrganizationsApi(defaultClient);
        OrganizationCreateBody body = new OrganizationCreateBody(); // OrganizationCreateBody | Organization object that needs to be created
        try {
            OrganizationCreateResponse result = api.createChildOrg()
                .body(body)
                .execute();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationsApi#createChildOrg");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

組織情報を取得する

GET https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/org/{public_id}

概要

オーガニゼーションの情報を取得します。

引数

パスパラメーター

名前

種類

説明

public_id [required]

string

The public_id of the organization you are operating within.

応答

OK

Response with an organization.

Expand All

フィールド

種類

説明

org

object

Create, edit, and manage organizations.

billing

object

A JSON array of billing type.

type

string

The type of billing. Only parent_billing is supported.

created

string

Date of the organization creation.

description

string

Description of the organization.

name

string

The name of the new child-organization, limited to 32 characters.

public_id

string

The public_id of the organization you are operating within.

settings

object

A JSON array of settings.

private_widget_share

boolean

Whether or not the organization users can share widgets outside of Datadog.

saml

object

Set the boolean property enabled to enable or disable single sign on with SAML. See the SAML documentation for more information about all SAML settings.

enabled

boolean

Whether or not SAML is enabled for this organization.

saml_autocreate_access_role

enum

The access role of the user. Options are st (standard user), adm (admin user), or ro (read-only user). Allowed enum values: st,adm,ro,ERROR

saml_autocreate_users_domains

object

Has two properties, enabled (boolean) and domains, which is a list of domains without the @ symbol.

domains

[string]

List of domains where the SAML automated user creation is enabled.

enabled

boolean

Whether or not the automated user creation based on SAML domain is enabled.

saml_can_be_enabled

boolean

Whether or not SAML can be enabled for this organization.

saml_idp_endpoint

string

Identity provider endpoint for SAML authentication.

saml_idp_initiated_login

object

Has one property enabled (boolean).

enabled

boolean

Whether SAML IdP initiated login is enabled, learn more in the SAML documentation.

saml_idp_metadata_uploaded

boolean

Whether or not a SAML identity provider metadata file was provided to the Datadog organization.

saml_login_url

string

URL for SAML logging.

saml_strict_mode

object

Has one property enabled (boolean).

enabled

boolean

Whether or not the SAML strict mode is enabled. If true, all users must log in with SAML. Learn more on the SAML Strict documentation.

subscription

object

Subscription definition.

type

string

The subscription type. Types available are trial, free, and pro.

{
  "org": {
    "billing": {
      "type": "string"
    },
    "created": "2019-09-26T17:28:28Z",
    "description": "some description",
    "name": "New child org",
    "public_id": "abcdef12345",
    "settings": {
      "private_widget_share": false,
      "saml": {
        "enabled": false
      },
      "saml_autocreate_access_role": "st",
      "saml_autocreate_users_domains": {
        "domains": [
          "example.com"
        ],
        "enabled": false
      },
      "saml_can_be_enabled": false,
      "saml_idp_endpoint": "https://my.saml.endpoint",
      "saml_idp_initiated_login": {
        "enabled": false
      },
      "saml_idp_metadata_uploaded": false,
      "saml_login_url": "https://my.saml.login.url",
      "saml_strict_mode": {
        "enabled": false
      }
    },
    "subscription": {
      "type": "string"
    }
  }
}

Bad Request

Error response object.

Expand All

フィールド

種類

説明

errors [required]

[string]

Array of errors returned by the API.

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

Forbidden

Error response object.

Expand All

フィールド

種類

説明

errors [required]

[string]

Array of errors returned by the API.

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

コード例


                                        # Path parameters
export public_id="abc123"
# Curl command curl -X GET "https://api.datadoghq.com"https://api.datadoghq.eu/api/v1/org/${public_id}" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}"
package main

import (
    "context"
    "fmt"
    "os"
    datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
    ctx := context.WithValue(
        context.Background(),
        datadog.ContextAPIKeys,
        map[string]datadog.APIKey{
            "apiKeyAuth": {
                Key: os.Getenv("DD_CLIENT_API_KEY"),
            },
            "appKeyAuth": {
                Key: os.Getenv("DD_CLIENT_APP_KEY"),
            },
        },
    )

    publicId := "publicId_example" // string | The `public_id` of the organization you are operating within.

    configuration := datadog.NewConfiguration()
    api_client := datadog.NewAPIClient(configuration)
    resp, r, err := api_client.OrganizationsApi.GetOrg(context.Background(), publicId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.GetOrg``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetOrg`: OrganizationResponse
    fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.GetOrg`: %v\n", resp)
}
// Import classes:
import com.datadog.api.v1.client.ApiClient;
import com.datadog.api.v1.client.ApiException;
import com.datadog.api.v1.client.Configuration;
import com.datadog.api.v1.client.auth.*;
import com.datadog.api.v1.client.model.*;
import com.datadog.api.v1.client.api.OrganizationsApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure the Datadog site to send API calls to
        HashMap<String, String> serverVariables = new HashMap<String, String>();
        String site = System.getenv("DD_SITE");
        if (site != null) {
            serverVariables.put("site", site);
            defaultClient.setServerVariables(serverVariables);
        }
        // Configure API key authorization: 
        HashMap<String, String> secrets = new HashMap<String, String>();
        secrets.put("apiKeyAuth", System.getenv("DD_CLIENT_API_KEY"));
        secrets.put("appKeyAuth", System.getenv("DD_CLIENT_APP_KEY"));
        defaultClient.configureApiKeys(secrets);

        OrganizationsApi apiInstance = new OrganizationsApi(defaultClient);
        String publicId = abc123; // String | The `public_id` of the organization you are operating within.
        try {
            OrganizationResponse result = api.getOrg(publicId)
                .execute();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationsApi#getOrg");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

管理している組織を一覧表示する

GET https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/org

概要

管理している組織を一覧表示します。

応答

OK

Response with the list of organizations.

Expand All

フィールド

種類

説明

orgs

[object]

Array of organization objects.

billing

object

A JSON array of billing type.

type

string

The type of billing. Only parent_billing is supported.

created

string

Date of the organization creation.

description

string

Description of the organization.

name

string

The name of the new child-organization, limited to 32 characters.

public_id

string

The public_id of the organization you are operating within.

settings

object

A JSON array of settings.

private_widget_share

boolean

Whether or not the organization users can share widgets outside of Datadog.

saml

object

Set the boolean property enabled to enable or disable single sign on with SAML. See the SAML documentation for more information about all SAML settings.

enabled

boolean

Whether or not SAML is enabled for this organization.

saml_autocreate_access_role

enum

The access role of the user. Options are st (standard user), adm (admin user), or ro (read-only user). Allowed enum values: st,adm,ro,ERROR

saml_autocreate_users_domains

object

Has two properties, enabled (boolean) and domains, which is a list of domains without the @ symbol.

domains

[string]

List of domains where the SAML automated user creation is enabled.

enabled

boolean

Whether or not the automated user creation based on SAML domain is enabled.

saml_can_be_enabled

boolean

Whether or not SAML can be enabled for this organization.

saml_idp_endpoint

string

Identity provider endpoint for SAML authentication.

saml_idp_initiated_login

object

Has one property enabled (boolean).

enabled

boolean

Whether SAML IdP initiated login is enabled, learn more in the SAML documentation.

saml_idp_metadata_uploaded

boolean

Whether or not a SAML identity provider metadata file was provided to the Datadog organization.

saml_login_url

string

URL for SAML logging.

saml_strict_mode

object

Has one property enabled (boolean).

enabled

boolean

Whether or not the SAML strict mode is enabled. If true, all users must log in with SAML. Learn more on the SAML Strict documentation.

subscription

object

Subscription definition.

type

string

The subscription type. Types available are trial, free, and pro.

{
  "orgs": [
    {
      "billing": {
        "type": "string"
      },
      "created": "2019-09-26T17:28:28Z",
      "description": "some description",
      "name": "New child org",
      "public_id": "abcdef12345",
      "settings": {
        "private_widget_share": false,
        "saml": {
          "enabled": false
        },
        "saml_autocreate_access_role": "st",
        "saml_autocreate_users_domains": {
          "domains": [
            "example.com"
          ],
          "enabled": false
        },
        "saml_can_be_enabled": false,
        "saml_idp_endpoint": "https://my.saml.endpoint",
        "saml_idp_initiated_login": {
          "enabled": false
        },
        "saml_idp_metadata_uploaded": false,
        "saml_login_url": "https://my.saml.login.url",
        "saml_strict_mode": {
          "enabled": false
        }
      },
      "subscription": {
        "type": "string"
      }
    }
  ]
}

Forbidden

Error response object.

Expand All

フィールド

種類

説明

errors [required]

[string]

Array of errors returned by the API.

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

コード例


                                        # Curl command
curl -X GET "https://api.datadoghq.com"https://api.datadoghq.eu/api/v1/org" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}"
package main

import (
    "context"
    "fmt"
    "os"
    datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
    ctx := context.WithValue(
        context.Background(),
        datadog.ContextAPIKeys,
        map[string]datadog.APIKey{
            "apiKeyAuth": {
                Key: os.Getenv("DD_CLIENT_API_KEY"),
            },
            "appKeyAuth": {
                Key: os.Getenv("DD_CLIENT_APP_KEY"),
            },
        },
    )


    configuration := datadog.NewConfiguration()
    api_client := datadog.NewAPIClient(configuration)
    resp, r, err := api_client.OrganizationsApi.ListOrgs(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.ListOrgs``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListOrgs`: OrganizationListResponse
    fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.ListOrgs`: %v\n", resp)
}
// Import classes:
import com.datadog.api.v1.client.ApiClient;
import com.datadog.api.v1.client.ApiException;
import com.datadog.api.v1.client.Configuration;
import com.datadog.api.v1.client.auth.*;
import com.datadog.api.v1.client.model.*;
import com.datadog.api.v1.client.api.OrganizationsApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure the Datadog site to send API calls to
        HashMap<String, String> serverVariables = new HashMap<String, String>();
        String site = System.getenv("DD_SITE");
        if (site != null) {
            serverVariables.put("site", site);
            defaultClient.setServerVariables(serverVariables);
        }
        // Configure API key authorization: 
        HashMap<String, String> secrets = new HashMap<String, String>();
        secrets.put("apiKeyAuth", System.getenv("DD_CLIENT_API_KEY"));
        secrets.put("appKeyAuth", System.getenv("DD_CLIENT_APP_KEY"));
        defaultClient.configureApiKeys(secrets);

        OrganizationsApi apiInstance = new OrganizationsApi(defaultClient);
        try {
            OrganizationListResponse result = api.listOrgs()
                .execute();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationsApi#listOrgs");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

組織を更新する

PUT https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/org/{public_id}

概要

オーガニゼーションを更新します。

引数

パスパラメーター

名前

種類

説明

public_id [required]

string

The public_id of the organization you are operating within.

リクエスト

Body Data (required)

Expand All

フィールド

種類

説明

billing

object

A JSON array of billing type.

type

string

The type of billing. Only parent_billing is supported.

created

string

Date of the organization creation.

description

string

Description of the organization.

name

string

The name of the new child-organization, limited to 32 characters.

public_id

string

The public_id of the organization you are operating within.

settings

object

A JSON array of settings.

private_widget_share

boolean

Whether or not the organization users can share widgets outside of Datadog.

saml

object

Set the boolean property enabled to enable or disable single sign on with SAML. See the SAML documentation for more information about all SAML settings.

enabled

boolean

Whether or not SAML is enabled for this organization.

saml_autocreate_access_role

enum

The access role of the user. Options are st (standard user), adm (admin user), or ro (read-only user). Allowed enum values: st,adm,ro,ERROR

saml_autocreate_users_domains

object

Has two properties, enabled (boolean) and domains, which is a list of domains without the @ symbol.

domains

[string]

List of domains where the SAML automated user creation is enabled.

enabled

boolean

Whether or not the automated user creation based on SAML domain is enabled.

saml_can_be_enabled

boolean

Whether or not SAML can be enabled for this organization.

saml_idp_endpoint

string

Identity provider endpoint for SAML authentication.

saml_idp_initiated_login

object

Has one property enabled (boolean).

enabled

boolean

Whether SAML IdP initiated login is enabled, learn more in the SAML documentation.

saml_idp_metadata_uploaded

boolean

Whether or not a SAML identity provider metadata file was provided to the Datadog organization.

saml_login_url

string

URL for SAML logging.

saml_strict_mode

object

Has one property enabled (boolean).

enabled

boolean

Whether or not the SAML strict mode is enabled. If true, all users must log in with SAML. Learn more on the SAML Strict documentation.

subscription

object

Subscription definition.

type

string

The subscription type. Types available are trial, free, and pro.

{
  "billing": {
    "type": "string"
  },
  "description": "some description",
  "name": "New child org",
  "public_id": "abcdef12345",
  "settings": {
    "private_widget_share": false,
    "saml": {
      "enabled": false
    },
    "saml_autocreate_access_role": "st",
    "saml_autocreate_users_domains": {
      "domains": [
        "example.com"
      ],
      "enabled": false
    },
    "saml_can_be_enabled": false,
    "saml_idp_endpoint": "https://my.saml.endpoint",
    "saml_idp_initiated_login": {
      "enabled": false
    },
    "saml_idp_metadata_uploaded": false,
    "saml_login_url": "https://my.saml.login.url",
    "saml_strict_mode": {
      "enabled": false
    }
  },
  "subscription": {
    "type": "string"
  }
}

応答

OK

Response with an organization.

Expand All

フィールド

種類

説明

org

object

Create, edit, and manage organizations.

billing

object

A JSON array of billing type.

type

string

The type of billing. Only parent_billing is supported.

created

string

Date of the organization creation.

description

string

Description of the organization.

name

string

The name of the new child-organization, limited to 32 characters.

public_id

string

The public_id of the organization you are operating within.

settings

object

A JSON array of settings.

private_widget_share

boolean

Whether or not the organization users can share widgets outside of Datadog.

saml

object

Set the boolean property enabled to enable or disable single sign on with SAML. See the SAML documentation for more information about all SAML settings.

enabled

boolean

Whether or not SAML is enabled for this organization.

saml_autocreate_access_role

enum

The access role of the user. Options are st (standard user), adm (admin user), or ro (read-only user). Allowed enum values: st,adm,ro,ERROR

saml_autocreate_users_domains

object

Has two properties, enabled (boolean) and domains, which is a list of domains without the @ symbol.

domains

[string]

List of domains where the SAML automated user creation is enabled.

enabled

boolean

Whether or not the automated user creation based on SAML domain is enabled.

saml_can_be_enabled

boolean

Whether or not SAML can be enabled for this organization.

saml_idp_endpoint

string

Identity provider endpoint for SAML authentication.

saml_idp_initiated_login

object

Has one property enabled (boolean).

enabled

boolean

Whether SAML IdP initiated login is enabled, learn more in the SAML documentation.

saml_idp_metadata_uploaded

boolean

Whether or not a SAML identity provider metadata file was provided to the Datadog organization.

saml_login_url

string

URL for SAML logging.

saml_strict_mode

object

Has one property enabled (boolean).

enabled

boolean

Whether or not the SAML strict mode is enabled. If true, all users must log in with SAML. Learn more on the SAML Strict documentation.

subscription

object

Subscription definition.

type

string

The subscription type. Types available are trial, free, and pro.

{
  "org": {
    "billing": {
      "type": "string"
    },
    "created": "2019-09-26T17:28:28Z",
    "description": "some description",
    "name": "New child org",
    "public_id": "abcdef12345",
    "settings": {
      "private_widget_share": false,
      "saml": {
        "enabled": false
      },
      "saml_autocreate_access_role": "st",
      "saml_autocreate_users_domains": {
        "domains": [
          "example.com"
        ],
        "enabled": false
      },
      "saml_can_be_enabled": false,
      "saml_idp_endpoint": "https://my.saml.endpoint",
      "saml_idp_initiated_login": {
        "enabled": false
      },
      "saml_idp_metadata_uploaded": false,
      "saml_login_url": "https://my.saml.login.url",
      "saml_strict_mode": {
        "enabled": false
      }
    },
    "subscription": {
      "type": "string"
    }
  }
}

Bad Request

Error response object.

Expand All

フィールド

種類

説明

errors [required]

[string]

Array of errors returned by the API.

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

Forbidden

Error response object.

Expand All

フィールド

種類

説明

errors [required]

[string]

Array of errors returned by the API.

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

コード例


                                        # Path parameters
export public_id="abc123"
# Curl command curl -X PUT "https://api.datadoghq.com"https://api.datadoghq.eu/api/v1/org/${public_id}" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}" \ -d @- << EOF {} EOF
package main

import (
    "context"
    "fmt"
    "os"
    datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
    ctx := context.WithValue(
        context.Background(),
        datadog.ContextAPIKeys,
        map[string]datadog.APIKey{
            "apiKeyAuth": {
                Key: os.Getenv("DD_CLIENT_API_KEY"),
            },
            "appKeyAuth": {
                Key: os.Getenv("DD_CLIENT_APP_KEY"),
            },
        },
    )

    publicId := "publicId_example" // string | The `public_id` of the organization you are operating within.
    body := *datadog.NewOrganization() // Organization | 

    configuration := datadog.NewConfiguration()
    api_client := datadog.NewAPIClient(configuration)
    resp, r, err := api_client.OrganizationsApi.UpdateOrg(context.Background(), publicId).Body(body).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.UpdateOrg``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateOrg`: OrganizationResponse
    fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.UpdateOrg`: %v\n", resp)
}
// Import classes:
import com.datadog.api.v1.client.ApiClient;
import com.datadog.api.v1.client.ApiException;
import com.datadog.api.v1.client.Configuration;
import com.datadog.api.v1.client.auth.*;
import com.datadog.api.v1.client.model.*;
import com.datadog.api.v1.client.api.OrganizationsApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure the Datadog site to send API calls to
        HashMap<String, String> serverVariables = new HashMap<String, String>();
        String site = System.getenv("DD_SITE");
        if (site != null) {
            serverVariables.put("site", site);
            defaultClient.setServerVariables(serverVariables);
        }
        // Configure API key authorization: 
        HashMap<String, String> secrets = new HashMap<String, String>();
        secrets.put("apiKeyAuth", System.getenv("DD_CLIENT_API_KEY"));
        secrets.put("appKeyAuth", System.getenv("DD_CLIENT_APP_KEY"));
        defaultClient.configureApiKeys(secrets);

        OrganizationsApi apiInstance = new OrganizationsApi(defaultClient);
        String publicId = abc123; // String | The `public_id` of the organization you are operating within.
        Organization body = new Organization(); // Organization | 
        try {
            OrganizationResponse result = api.updateOrg(publicId)
                .body(body)
                .execute();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationsApi#updateOrg");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

IdP メタデータをアップロード

POST https://api.datadoghq.comhttps://api.datadoghq.eu/api/v1/org/{public_id}/idp_metadata

概要

SAML IdP に含まれる ID プロバイダー (IdP) のメタデータを 更新するオプションはいくつかあります。

  • マルチパートフォームデータ: フォームポストを使用して IdP のメタデータファイルをポストします。

  • XML 本文: IdP のメタデータファイルをリクエスト本文としてポストします。

引数

パスパラメーター

名前

種類

説明

public_id [required]

string

The public_id of the organization you are operating with

リクエスト

Body Data

応答

OK

The IdP response object.

Expand All

フィールド

種類

説明

message [required]

string

Identity provider response.

{
  "message": "IdP metadata successfully uploaded for example org"
}

Bad Request

Error response object.

Expand All

フィールド

種類

説明

errors [required]

[string]

Array of errors returned by the API.

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

Forbidden

Error response object.

Expand All

フィールド

種類

説明

errors [required]

[string]

Array of errors returned by the API.

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

Unsupported Media Type

Error response object.

Expand All

フィールド

種類

説明

errors [required]

[string]

Array of errors returned by the API.

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

コード例


                                        # Path parameters
export public_id="abc123"
# Curl command curl -X POST "https://api.datadoghq.com"https://api.datadoghq.eu/api/v1/org/${public_id}/idp_metadata" \ -H "Content-Type: multipart/form-data" \ -H "DD-API-KEY: ${DD_CLIENT_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_CLIENT_APP_KEY}" \ -d @- << EOF {} EOF
package main

import (
    "context"
    "fmt"
    "os"
    datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
    ctx := context.WithValue(
        context.Background(),
        datadog.ContextAPIKeys,
        map[string]datadog.APIKey{
            "apiKeyAuth": {
                Key: os.Getenv("DD_CLIENT_API_KEY"),
            },
            "appKeyAuth": {
                Key: os.Getenv("DD_CLIENT_APP_KEY"),
            },
        },
    )

    publicId := "publicId_example" // string | The `public_id` of the organization you are operating with
    idpFile := 987 // *os.File | The path to the XML metadata file you wish to upload.

    configuration := datadog.NewConfiguration()
    api_client := datadog.NewAPIClient(configuration)
    resp, r, err := api_client.OrganizationsApi.UploadIdPForOrg(context.Background(), publicId).IdpFile(idpFile).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.UploadIdPForOrg``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UploadIdPForOrg`: IdpResponse
    fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.UploadIdPForOrg`: %v\n", resp)
}
// Import classes:
import com.datadog.api.v1.client.ApiClient;
import com.datadog.api.v1.client.ApiException;
import com.datadog.api.v1.client.Configuration;
import com.datadog.api.v1.client.auth.*;
import com.datadog.api.v1.client.model.*;
import com.datadog.api.v1.client.api.OrganizationsApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure the Datadog site to send API calls to
        HashMap<String, String> serverVariables = new HashMap<String, String>();
        String site = System.getenv("DD_SITE");
        if (site != null) {
            serverVariables.put("site", site);
            defaultClient.setServerVariables(serverVariables);
        }
        // Configure API key authorization: 
        HashMap<String, String> secrets = new HashMap<String, String>();
        secrets.put("apiKeyAuth", System.getenv("DD_CLIENT_API_KEY"));
        secrets.put("appKeyAuth", System.getenv("DD_CLIENT_APP_KEY"));
        defaultClient.configureApiKeys(secrets);

        OrganizationsApi apiInstance = new OrganizationsApi(defaultClient);
        String publicId = abc123; // String | The `public_id` of the organization you are operating with
        File idpFile = new File("/path/to/file"); // File | The path to the XML metadata file you wish to upload.
        try {
            IdpResponse result = api.uploadIdPForOrg(publicId)
                .idpFile(idpFile)
                .execute();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrganizationsApi#uploadIdPForOrg");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}