All URIs are relative to https://api.datadoghq.com
Method | HTTP request | Description |
---|---|---|
createChildOrg | POST /api/v1/org | Create a child organization |
getOrg | GET /api/v1/org/{public_id} | Get organization information |
listOrgs | GET /api/v1/org | List your managed organizations |
updateOrg | PUT /api/v1/org/{public_id} | Update your organization |
uploadIdPForOrg | POST /api/v1/org/{public_id}/idp_metadata | Upload IdP metadata |
OrganizationCreateResponse createChildOrg(body)
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
, api_key.key
, and
application_key.hash
provided in the response.
import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";
const configuration = v1.createConfiguration();
const apiInstance = new v1.OrganizationsApi(configuration);
let params: v1.OrganizationsApiCreateChildOrgRequest = {
// OrganizationCreateBody | Organization object that needs to be created
body: {
billing: {
type: "type_example",
},
name: "New child org",
subscription: {
type: "type_example",
},
},
};
apiInstance
.createChildOrg(params)
.then((data: any) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
body | OrganizationCreateBody | Organization object that needs to be created |
OrganizationCreateResponse
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OrganizationResponse getOrg()
Get organization information.
import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";
const configuration = v1.createConfiguration();
const apiInstance = new v1.OrganizationsApi(configuration);
let params: v1.OrganizationsApiGetOrgRequest = {
// string | The `public_id` of the organization you are operating within.
publicId: "abc123",
};
apiInstance
.getOrg(params)
.then((data: any) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
publicId | [string] | The `public_id` of the organization you are operating within. | defaults to undefined |
OrganizationResponse
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OrganizationListResponse listOrgs()
List your managed organizations.
import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";
const configuration = v1.createConfiguration();
const apiInstance = new v1.OrganizationsApi(configuration);
apiInstance
.listOrgs()
.then((data: any) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
This endpoint does not need any parameter.
OrganizationListResponse
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OrganizationResponse updateOrg(body)
Update your organization.
import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";
const configuration = v1.createConfiguration();
const apiInstance = new v1.OrganizationsApi(configuration);
let params: v1.OrganizationsApiUpdateOrgRequest = {
// string | The `public_id` of the organization you are operating within.
publicId: "abc123",
// Organization
body: {
billing: {
type: "type_example",
},
description: "some description",
name: "New child org",
publicId: "abcdef12345",
settings: {
privateWidgetShare: false,
saml: {
enabled: false,
},
samlAutocreateAccessRole: "st",
samlAutocreateUsersDomains: {
domains: ["example.com"],
enabled: false,
},
samlCanBeEnabled: false,
samlIdpEndpoint: "https://my.saml.endpoint",
samlIdpInitiatedLogin: {
enabled: false,
},
samlIdpMetadataUploaded: false,
samlLoginUrl: "https://my.saml.login.url",
samlStrictMode: {
enabled: false,
},
},
subscription: {
type: "type_example",
},
},
};
apiInstance
.updateOrg(params)
.then((data: any) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
body | Organization | ||
publicId | [string] | The `public_id` of the organization you are operating within. | defaults to undefined |
OrganizationResponse
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IdpResponse uploadIdPForOrg()
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.
import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";
const configuration = v1.createConfiguration();
const apiInstance = new v1.OrganizationsApi(configuration);
let params: v1.OrganizationsApiUploadIdPForOrgRequest = {
// string | The `public_id` of the organization you are operating with
publicId: "abc123",
// HttpFile | The path to the XML metadata file you wish to upload.
idpFile: {
data: Buffer.from(fs.readFileSync("/path/to/file", "utf-8")),
name: "/path/to/file",
},
};
apiInstance
.uploadIdPForOrg(params)
.then((data: any) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
publicId | [string] | The `public_id` of the organization you are operating with | defaults to undefined |
idpFile | [HttpFile] | The path to the XML metadata file you wish to upload. | defaults to undefined |
IdpResponse
- Content-Type: multipart/form-data
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
403 | Forbidden | - |
415 | Unsupported Media Type | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]