---
title: Get organization information
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Organizations
---

# Get organization information{% #get-organization-information %}
Copy pageCopied
{% tab title="v1" %}

| Datadog site      | API endpoint                                             |
| ----------------- | -------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v1/org/{public_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v1/org/{public_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v1/org/{public_id}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v1/org/{public_id}      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v1/org/{public_id}  |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v1/org/{public_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v1/org/{public_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/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

{% tab title="200" %}
OK
{% tab title="Model" %}
Response with an organization.

| Parent field                  | Field                         | Type     | Description                                                                                                                                                                                                 |
| ----------------------------- | ----------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                               | org                           | object   | Create, edit, and manage organizations.                                                                                                                                                                     |
| org                           | billing                       | object   | **DEPRECATED**: A JSON array of billing type.                                                                                                                                                               |
| billing                       | type                          | string   | The type of billing. Only `parent_billing` is supported.                                                                                                                                                    |
| org                           | created                       | string   | Date of the organization creation.                                                                                                                                                                          |
| org                           | description                   | string   | Description of the organization.                                                                                                                                                                            |
| org                           | name                          | string   | The name of the child organization, limited to 32 characters.                                                                                                                                               |
| org                           | public_id                     | string   | The `public_id` of the organization you are operating within.                                                                                                                                               |
| org                           | settings                      | object   | A JSON array of settings.                                                                                                                                                                                   |
| settings                      | private_widget_share          | boolean  | Whether or not the organization users can share widgets outside of Datadog.                                                                                                                                 |
| settings                      | 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.                                                    |
| saml                          | enabled                       | boolean  | Whether or not SAML is enabled for this organization.                                                                                                                                                       |
| settings                      | 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`                                                   |
| settings                      | saml_autocreate_users_domains | object   | Has two properties, `enabled` (boolean) and `domains`, which is a list of domains without the @ symbol.                                                                                                     |
| saml_autocreate_users_domains | domains                       | [string] | List of domains where the SAML automated user creation is enabled.                                                                                                                                          |
| saml_autocreate_users_domains | enabled                       | boolean  | Whether or not the automated user creation based on SAML domain is enabled.                                                                                                                                 |
| settings                      | saml_can_be_enabled           | boolean  | Whether or not SAML can be enabled for this organization.                                                                                                                                                   |
| settings                      | saml_idp_endpoint             | string   | Identity provider endpoint for SAML authentication.                                                                                                                                                         |
| settings                      | saml_idp_initiated_login      | object   | Has one property enabled (boolean).                                                                                                                                                                         |
| saml_idp_initiated_login      | enabled                       | boolean  | Whether SAML IdP initiated login is enabled, learn more in the [SAML documentation](https://docs.datadoghq.com/account_management/saml.md#idp-initiated-login).                                             |
| settings                      | saml_idp_metadata_uploaded    | boolean  | Whether or not a SAML identity provider metadata file was provided to the Datadog organization.                                                                                                             |
| settings                      | saml_login_url                | string   | URL for SAML logging.                                                                                                                                                                                       |
| settings                      | saml_strict_mode              | object   | Has one property enabled (boolean).                                                                                                                                                                         |
| saml_strict_mode              | 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](https://docs.datadoghq.com/account_management/saml.md#saml-strict). |
| org                           | subscription                  | object   | **DEPRECATED**: Subscription definition.                                                                                                                                                                    |
| subscription                  | type                          | string   | The subscription type. Types available are `trial`, `free`, and `pro`.                                                                                                                                      |
| org                           | trial                         | boolean  | Only available for MSP customers. Allows child organizations to be created on a trial plan.                                                                                                                 |

{% /tab %}

{% tab title="Example" %}

```json
{
  "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
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

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

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

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

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

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

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parameters export public_id="abc123" \# Curl command curl -X GET "https://api.datadoghq.com/api/v1/org/${public_id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" 
                
##### 

```python
"""
Get organization information returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.organizations_api import OrganizationsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = OrganizationsApi(api_client)
    response = api_instance.get_org(
        public_id="abc123",
    )

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
##### 

```ruby
# Get organization information returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::OrganizationsAPI.new
p api_instance.get_org("abc123")
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
##### 

```go
// Get organization information 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() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV1.NewOrganizationsApi(apiClient)
	resp, r, err := api.GetOrg(ctx, "abc123")

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

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.GetOrg`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
##### 

```java
// Get organization information 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.OrganizationResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    OrganizationsApi apiInstance = new OrganizationsApi(defaultClient);

    try {
      OrganizationResponse result = apiInstance.getOrg("abc123");
      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();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
##### 

```rust
// Get organization information returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_organizations::OrganizationsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = OrganizationsAPI::with_config(configuration);
    let resp = api.get_org("abc123".to_string()).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run
##### 

```typescript
/**
 * Get organization information returns "OK" response
 */

import { client, v1 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v1.OrganizationsApi(configuration);

const params: v1.OrganizationsApiGetOrgRequest = {
  publicId: "abc123",
};

apiInstance
  .getOrg(params)
  .then((data: v1.OrganizationResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"
{% /tab %}
