Organisations
Rapport de recherche Datadog : Bilan sur l'adoption de l'informatique sans serveur Rapport : Bilan sur l'adoption de l'informatique sans serveur

Organizations

Create, edit, and manage your organizations. Read more about multi-org accounts.

Create a child organization

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

Overview

Create a child organization.

This endpoint requires the multi-organization account feature and must be enabled by contacting support.

Once a new child organization is created, you can interact with it by using the org.public_id, pi_key.key, and application_key.hash provided in the response.

Request

Body Data (required)

Organization object that needs to be created

Expand All

Field

Type

Description

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"
  }
}

Response

OK

Response object for an organization creation.

Expand All

Field

Type

Description

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

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Forbidden

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Code Example


                                        # Curl command
curl -X post https://api.datadoghq.comhttps://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.OrganizationCreateBody{Billing: datadog.OrganizationBilling{Type: "Type_example"}, Name: "Name_example", Subscription: datadog.OrganizationSubscription{Type: "Type_example"}} // OrganizationCreateBody | Organization object that needs to be created

    configuration := datadog.NewConfiguration()
    api_client := datadog.NewAPIClient(configuration)
    resp, r, err := api_client.OrganizationsApi.CreateChildOrg(ctx, 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.models.*;
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 organization information

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

Overview

Get organization information.

Arguments

Path Parameters

Name

Type

Description

public_id [required]

string

The public_id of the organization you are operating within.

Response

OK

Response with an organization.

Expand All

Field

Type

Description

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

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Forbidden

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Code Example


                                        # Path parameters
export public_id="abc123"
# Curl command curl -X get https://api.datadoghq.comhttps://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(ctx, 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.models.*;
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();
        }
    }
}

List your managed organizations

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

Overview

List your managed organizations.

Response

OK

Response with the list of organizations.

Expand All

Field

Type

Description

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

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Code Example


                                        # Curl command
curl -X get https://api.datadoghq.comhttps://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(ctx).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.models.*;
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();
        }
    }
}

Update your organization

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

Overview

Update your organization.

Arguments

Path Parameters

Name

Type

Description

public_id [required]

string

The public_id of the organization you are operating within.

Request

Body Data (required)

Expand All

Field

Type

Description

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"
  }
}

Response

OK

Response with an organization.

Expand All

Field

Type

Description

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

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Forbidden

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Code Example


                                        # Path parameters
export public_id="abc123"
# Curl command curl -X put https://api.datadoghq.comhttps://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.Organization{Billing: datadog.OrganizationBilling{Type: "Type_example"}, Created: "Created_example", Description: "Description_example", Name: "Name_example", PublicId: "PublicId_example", Settings: datadog.Organization_settings{PrivateWidgetShare: false, Saml: datadog.Organization_settings_saml{Enabled: false}, SamlAutocreateAccessRole: datadog.AccessRole{}, SamlAutocreateUsersDomains: datadog.Organization_settings_saml_autocreate_users_domains{Domains: []string{"Domains_example"), Enabled: false}, SamlCanBeEnabled: false, SamlIdpEndpoint: "SamlIdpEndpoint_example", SamlIdpInitiatedLogin: datadog.Organization_settings_saml_idp_initiated_login{Enabled: false}, SamlIdpMetadataUploaded: false, SamlLoginUrl: "SamlLoginUrl_example", SamlStrictMode: datadog.Organization_settings_saml_strict_mode{Enabled: false}}, Subscription: datadog.OrganizationSubscription{Type: "Type_example"}} // Organization | 

    configuration := datadog.NewConfiguration()
    api_client := datadog.NewAPIClient(configuration)
    resp, r, err := api_client.OrganizationsApi.UpdateOrg(ctx, publicId, 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.models.*;
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();
        }
    }
}

Upload IdP metadata

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

Overview

There are a couple of options for updating the Identity Provider (IdP) metadata from your SAML IdP.

  • Multipart Form-Data: Post the IdP metadata file using a form post.

  • XML Body: Post the IdP metadata file as the body of the request.

Arguments

Path Parameters

Name

Type

Description

public_id [required]

string

The public_id of the organization you are operating with

Request

Body Data

Expand All

Field

Type

Description

idp_file [required]

binary

The path to the XML metadata file you wish to upload.

{
  "idp_file": ""
}

Response

OK

The IdP response object.

Expand All

Field

Type

Description

message [required]

string

Identity provider response.

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

Bad Request

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Forbidden

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Unsupported Media Type

Error response object.

Expand All

Field

Type

Description

errors [required]

[string]

Array of errors returned by the API.

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

Code Example


                                        # Path parameters
export public_id="abc123"
# Curl command curl -X post https://api.datadoghq.comhttps://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 { "idp_file": "" } 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(ctx, publicId, 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.models.*;
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();
        }
    }
}