POST https://api.ap1.datadoghq.com/api/v1/org https://api.ap2.datadoghq.com/api/v1/org https://api.datadoghq.eu/api/v1/org https://api.ddog-gov.com/api/v1/org https://api.us2.ddog-gov.com/api/v1/org https://api.uk1.datadoghq.com/api/v1/org https://api.datadoghq.com/api/v1/org https://api.us3.datadoghq.com/api/v1/org https://api.us5.datadoghq.com/api/v1/org
概要
子オーガニゼーションを作成します。
このエンドポイントにはマルチオーガニゼーションアカウント
機能が必要です。
サポートに連絡 して有効化してください。
新しい子オーガニゼーションが作成されたら、応答で渡されたorg.public_id、api_key.key、application_key.hash を使用して操作することができます。
This endpoint requires the
org_management permission.
リクエスト Body Data (required) 作成が必要となるオーガニゼーションのオブジェクト
Expand All
DEPRECATED : A JSON array of billing type.
The type of billing. Only parent_billing is supported.
The name of the new child-organization, limited to 32 characters.
DEPRECATED : Subscription definition.
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
Date of creation of the API key.
Datadog user handle that created the API key.
An application key with its associated metadata.
Hash of an application key.
Name of an application key.
Owner of an application key.
Create, edit, and manage organizations.
DEPRECATED : A JSON array of billing type.
The type of billing. Only parent_billing is supported.
Date of the organization creation.
Description of the organization.
The name of the child organization, limited to 32 characters.
The public_id of the organization you are operating within.
A JSON array of settings.
Whether or not the organization users can share widgets outside of Datadog.
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.
Whether or not SAML is enabled for this organization.
saml_autocreate_access_role
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
Has two properties, enabled (boolean) and domains, which is a list of domains without the @ symbol.
List of domains where the SAML automated user creation is enabled.
Whether or not the automated user creation based on SAML domain is enabled.
Whether or not SAML can be enabled for this organization.
Identity provider endpoint for SAML authentication.
Has one property enabled (boolean).
saml_idp_metadata_uploaded
Whether or not a SAML identity provider metadata file was provided to the Datadog organization.
Has one property 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 .
DEPRECATED : Subscription definition.
The subscription type. Types available are trial, free, and pro.
Only available for MSP customers. Allows child organizations to be created on a trial plan.
Create, edit, and disable users.
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
The new disabled status of the user.
The new email of the user.
The user handle, must be a valid email.
Gravatar icon associated to the user.
Whether or not the user logged in Datadog at least once.
{
"api_key" : {
"created" : "2019-08-02 15:31:07" ,
"created_by" : "[email protected] " ,
"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" : "ro" ,
"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"
},
"trial" : false
},
"user" : {
"access_role" : "ro" ,
"disabled" : false ,
"email" : "[email protected] " ,
"handle" : "[email protected] " ,
"icon" : "/path/to/matching/gravatar/icon" ,
"name" : "test user" ,
"verified" : true
}
} Bad Request
Error response object.
Expand All
Array of errors returned by the API.
{
"errors" : [
"Bad Request"
]
} Forbidden
Error response object.
Expand All
Array of errors returned by the API.
{
"errors" : [
"Bad Request"
]
} Too many requests
Error response object.
Expand All
Array of errors returned by the API.
{
"errors" : [
"Bad Request"
]
} コード例 コピー
## default
#
# Curl command curl -X POST "https://api.ap1.datadoghq.com "https://api.ap2.datadoghq.com "https://api.datadoghq.eu "https://api.ddog-gov.com "https://api.us2.ddog-gov.com "https://api.uk1.datadoghq.com "https://api.datadoghq.com "https://api.us3.datadoghq.com "https://api.us5.datadoghq.com /api/v1/org " \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY} " \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY} " \
-d @- << EOF
{
"billing": {
"type": "parent_billing"
},
"name": "New child org",
"subscription": {
"type": "pro"
}
}
EOF
"""
Create a child organization returns "OK" response
"""
from datadog_api_client import ApiClient , Configuration
from datadog_api_client.v1.api.organizations_api import OrganizationsApi
from datadog_api_client.v1.model.organization_billing import OrganizationBilling
from datadog_api_client.v1.model.organization_create_body import OrganizationCreateBody
from datadog_api_client.v1.model.organization_subscription import OrganizationSubscription
body = OrganizationCreateBody (
billing = OrganizationBilling (
type = "parent_billing" ,
),
name = "New child org" ,
subscription = OrganizationSubscription (
type = "pro" ,
),
)
configuration = Configuration ()
with ApiClient ( configuration ) as api_client :
api_instance = OrganizationsApi ( api_client )
response = api_instance . create_child_org ( body = body )
print ( response )
Instructions First install the library and its dependencies and then save the example to example.py and run following commands:
DD_SITE = "datadoghq.com us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com uk1.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<API-KEY>" DD_APP_KEY = "<APP-KEY>" python3 "example.py"
# Create a child organization returns "OK" response
require "datadog_api_client"
api_instance = DatadogAPIClient :: V1 :: OrganizationsAPI . new
body = DatadogAPIClient :: V1 :: OrganizationCreateBody . new ({
billing : DatadogAPIClient :: V1 :: OrganizationBilling . new ({
type : "parent_billing" ,
}),
name : "New child org" ,
subscription : DatadogAPIClient :: V1 :: OrganizationSubscription . new ({
type : "pro" ,
}),
})
p api_instance . create_child_org ( body )
Instructions First install the library and its dependencies and then save the example to example.rb and run following commands:
DD_SITE = "datadoghq.com us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com uk1.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<API-KEY>" DD_APP_KEY = "<APP-KEY>" rb "example.rb"
// Create a child organization returns "OK" response
package main
import (
"context"
"encoding/json"
"fmt"
"os"
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
)
func main () {
body := datadogV1 . OrganizationCreateBody {
Billing : & datadogV1 . OrganizationBilling {
Type : datadog . PtrString ( "parent_billing" ),
},
Name : "New child org" ,
Subscription : & datadogV1 . OrganizationSubscription {
Type : datadog . PtrString ( "pro" ),
},
}
ctx := datadog . NewDefaultContext ( context . Background ())
configuration := datadog . NewConfiguration ()
apiClient := datadog . NewAPIClient ( configuration )
api := datadogV1 . NewOrganizationsApi ( apiClient )
resp , r , err := api . CreateChildOrg ( ctx , body )
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 )
}
responseContent , _ := json . MarshalIndent ( resp , "" , " " )
fmt . Fprintf ( os . Stdout , "Response from `OrganizationsApi.CreateChildOrg`:\n%s\n" , responseContent )
}
Instructions First install the library and its dependencies and then save the example to main.go and run following commands:
DD_SITE = "datadoghq.com us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com uk1.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<API-KEY>" DD_APP_KEY = "<APP-KEY>" go run "main.go"
// Create a child organization returns "OK" response
import com.datadog.api.client.ApiClient ;
import com.datadog.api.client.ApiException ;
import com.datadog.api.client.v1.api.OrganizationsApi ;
import com.datadog.api.client.v1.model.OrganizationBilling ;
import com.datadog.api.client.v1.model.OrganizationCreateBody ;
import com.datadog.api.client.v1.model.OrganizationCreateResponse ;
import com.datadog.api.client.v1.model.OrganizationSubscription ;
public class Example {
public static void main ( String [] args ) {
ApiClient defaultClient = ApiClient . getDefaultApiClient ();
OrganizationsApi apiInstance = new OrganizationsApi ( defaultClient );
OrganizationCreateBody body =
new OrganizationCreateBody ()
. billing ( new OrganizationBilling (). type ( "parent_billing" ))
. name ( "New child org" )
. subscription ( new OrganizationSubscription (). type ( "pro" ));
try {
OrganizationCreateResponse result = apiInstance . createChildOrg ( body );
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 ();
}
}
}
Instructions First install the library and its dependencies and then save the example to Example.java and run following commands:
DD_SITE = "datadoghq.com us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com uk1.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<API-KEY>" DD_APP_KEY = "<APP-KEY>" java "Example.java"
// Create a child organization returns "OK" response
use datadog_api_client ::datadog ;
use datadog_api_client ::datadogV1 ::api_organizations ::OrganizationsAPI ;
use datadog_api_client ::datadogV1 ::model ::OrganizationBilling ;
use datadog_api_client ::datadogV1 ::model ::OrganizationCreateBody ;
use datadog_api_client ::datadogV1 ::model ::OrganizationSubscription ;
#[tokio::main]
async fn main () {
let body = OrganizationCreateBody ::new ( "New child org" . to_string ())
. billing ( OrganizationBilling ::new (). type_ ( "parent_billing" . to_string ()))
. subscription ( OrganizationSubscription ::new (). type_ ( "pro" . to_string ()));
let configuration = datadog ::Configuration ::new ();
let api = OrganizationsAPI ::with_config ( configuration );
let resp = api . create_child_org ( body ). await ;
if let Ok ( value ) = resp {
println! ( " {:#?} " , value );
} else {
println! ( " {:#?} " , resp . unwrap_err ());
}
}
Instructions First install the library and its dependencies and then save the example to src/main.rs and run following commands:
DD_SITE = "datadoghq.com us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com uk1.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<API-KEY>" DD_APP_KEY = "<APP-KEY>" cargo run
/**
* Create a child organization returns "OK" response
*/
import { client , v1 } from "@datadog/datadog-api-client" ;
const configuration = client . createConfiguration ();
const apiInstance = new v1 . OrganizationsApi ( configuration );
const params : v1.OrganizationsApiCreateChildOrgRequest = {
body : {
billing : {
type : "parent_billing" ,
},
name : "New child org" ,
subscription : {
type : "pro" ,
},
},
};
apiInstance
. createChildOrg ( params )
. then (( data : v1.OrganizationCreateResponse ) => {
console . log (
"API called successfully. Returned data: " + JSON . stringify ( data )
);
})
. catch (( error : any ) => console . error ( error ));
Instructions First install the library and its dependencies and then save the example to example.ts and run following commands:
DD_SITE = "datadoghq.com us3.datadoghq.com us5.datadoghq.com datadoghq.eu ap1.datadoghq.com ap2.datadoghq.com uk1.datadoghq.com ddog-gov.com us2.ddog-gov.com " DD_API_KEY = "<API-KEY>" DD_APP_KEY = "<APP-KEY>" tsc "example.ts"