---
title: 글로벌 조직 목록 표시
description: 인증된 사용자가 속한 리전의 조직을 반환합니다. user_handle 쿼리 파라미터는 인증된 사용자의 핸들과 일치해야 합니다.
breadcrumbs: 문서 > API > 글로벌 조직 목록 표시
---

> For the complete documentation index, see [llms.txt](https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/llms.txt).

# 글로벌 조직 목록 표시

## v2 (latest)

| Datadog site      | API endpoint                                         |
| ----------------- | ---------------------------------------------------- |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/global_orgs     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/global_orgs |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/global_orgs |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/global_orgs      |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/global_orgs |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/global_orgs |
| uk1.datadoghq.com | GET https://api.uk1.datadoghq.com/api/v2/global_orgs |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/global_orgs      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/global_orgs  |

### Overview

인증된 사용자가 속한 리전의 조직을 반환합니다. `user_handle` 쿼리 파라미터는 인증된 사용자의 핸들과 일치해야 합니다.

This endpoint requires the `user_access_read` permission.

OAuth apps require the `user_access_read` authorization [scope](https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/ko/api/latest/scopes.md#organizations) to access this endpoint.

### Arguments

#### Query Strings

| Field                    | Type    | Description                                                                                                                      |
| ------------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------- |
| user_handle [*required*] | string  | The handle of the authenticated user.                                                                                            |
| page[limit]              | integer | Maximum number of results returned. Default: `100`.                                                                              |
| page[cursor]             | string  | String to query the next page of results. This key is provided with each valid response from the API in `meta.page.next_cursor`. |

### Response

{% tabs %}
{% tab label="200" %}
OK

{% tabs %}
{% tab label="Model" %}
Response containing organizations across regions for the authenticated user.

| Parent field | Field                      | Type     | Description                                                                               |
| ------------ | -------------------------- | -------- | ----------------------------------------------------------------------------------------- |
|              | data [*required*]          | [object] | Organizations across regions for the authenticated user.                                  |
| data         | attributes [*required*]    | object   | Attributes of an organization associated with the authenticated user.                     |
| attributes   | org [*required*]           | object   | Organization information for a global organization association.                           |
| org          | name [*required*]          | string   | The name of the organization.                                                             |
| org          | public_id                  | string   | The public identifier of the organization.                                                |
| org          | subdomain                  | string   | The subdomain used to access the organization, if configured.                             |
| org          | uuid [*required*]          | uuid     | The UUID of the organization.                                                             |
| attributes   | redirect_url               | string   | The login URL used to switch into the organization, if available.                         |
| attributes   | source_region [*required*] | string   | The source region of the organization.                                                    |
| attributes   | user [*required*]          | object   | User information for a global organization association.                                   |
| user         | handle [*required*]        | string   | The handle of the user.                                                                   |
| user         | uuid [*required*]          | uuid     | The UUID of the user.                                                                     |
| data         | type [*required*]          | enum     | The resource type for global user organizations. Allowed enum values: `global_user_orgs`. |
|              | links                      | object   | Pagination links.                                                                         |
| links        | next                       | string   | Link to the next page.                                                                    |
| links        | prev                       | string   | Link to the previous page.                                                                |
| links        | self                       | string   | Link to the current page.                                                                 |
|              | meta                       | object   | Response metadata object.                                                                 |
| meta         | page                       | object   | Paging attributes.                                                                        |
| page         | cursor                     | string   | The cursor used to get the current results, if any.                                       |
| page         | limit                      | int32    | Number of results returned.                                                               |
| page         | next_cursor                | string   | The cursor used to get the next results, if any.                                          |
| page         | prev_cursor                | string   | The cursor used to get the previous results, if any.                                      |
| page         | type                       | enum     | Type of global orgs pagination. Allowed enum values: `cursor`.                            |
{% /tab %}

{% tab label="Example" %}
```json
{
  "data": [
    {
      "attributes": {
        "org": {
          "name": "Example Org",
          "public_id": "abcdef12345",
          "subdomain": "example",
          "uuid": "13d10a96-6ff2-49be-be7b-4f56ebb13335"
        },
        "redirect_url": "https://app.datadoghq.com/account/login/password?dd_oid=13d10a96-6ff2-49be-be7b-4f56ebb13335&login_hint=user%40example.com",
        "source_region": "us1.prod.dog",
        "user": {
          "handle": "user@example.com",
          "uuid": "cfab5cf9-5472-48ea-a79c-a64045f4f745"
        }
      },
      "type": "global_user_orgs"
    }
  ],
  "links": {
    "next": "https://app.datadoghq.com/api/v2/global_orgs?user_handle=user@example.com&page[limit]=100&page[cursor]=next-page",
    "prev": "string",
    "self": "https://app.datadoghq.com/api/v2/global_orgs?user_handle=user@example.com&page[limit]=100"
  },
  "meta": {
    "page": {
      "cursor": "",
      "limit": 100,
      "next_cursor": "next-page",
      "prev_cursor": "string",
      "type": "cursor"
    }
  }
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="400" %}
Bad Request

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="401" %}
Unauthorized

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="403" %}
Forbidden

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="429" %}
Too many requests

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}
{% /tabs %}

### Code Example

{% tabs %}
{% tab label="Curl" %}
```bash
# Required query arguments
export user_handle="user@example.com"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com" # Or us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com, ddog-gov.com, us2.ddog-gov.com
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X GET "https://api.${DD_SITE}/api/v2/global_orgs?user_handle=${user_handle}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
```
{% /tab %}

{% tab label="Go" %}
```go
// List global orgs 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/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	ctx = context.WithValue(ctx, datadog.ContextAccessToken, os.Getenv("DD_BEARER_TOKEN"))
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewOrganizationsApi(apiClient)
	resp, r, err := api.ListGlobalOrgs(ctx, "user@example.com", *datadogV2.NewListGlobalOrgsOptionalParameters())

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.ListGlobalOrgs`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

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

#### Instructions

First [install the library and its dependencies](https://dnd37xeb23o8n.cloudfront.net/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:

```bash
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"
```
{% /tab %}

{% tab label="Java" %}
```java
// List global orgs returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.OrganizationsApi;
import com.datadog.api.client.v2.model.GlobalOrgsResponse;

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

    try {
      GlobalOrgsResponse result = apiInstance.listGlobalOrgs("user@example.com");
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling OrganizationsApi#listGlobalOrgs");
      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://dnd37xeb23o8n.cloudfront.net/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:

```bash
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"
```
{% /tab %}

{% tab label="Python" %}
```python
"""
List global orgs returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.organizations_api import OrganizationsApi

configuration = Configuration()
configuration.access_token = environ["DD_BEARER_TOKEN"]
with ApiClient(configuration) as api_client:
    api_instance = OrganizationsApi(api_client)
    response = api_instance.list_global_orgs(
        user_handle="user@example.com",
    )

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://dnd37xeb23o8n.cloudfront.net/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:

```bash
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"
```
{% /tab %}

{% tab label="Ruby" %}
```ruby
# List global orgs returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
  config.access_token = ENV["DD_BEARER_TOKEN"]
end
api_instance = DatadogAPIClient::V2::OrganizationsAPI.new
p api_instance.list_global_orgs("user@example.com")
```

#### Instructions

First [install the library and its dependencies](https://dnd37xeb23o8n.cloudfront.net/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:

```bash
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"
```
{% /tab %}

{% tab label="Rust" %}
```rust
// List global orgs returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_organizations::ListGlobalOrgsOptionalParams;
use datadog_api_client::datadogV2::api_organizations::OrganizationsAPI;

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

#### Instructions

First [install the library and its dependencies](https://dnd37xeb23o8n.cloudfront.net/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:

```bash
DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
```
{% /tab %}

{% tab label="TypeScript" %}
```typescript
/**
 * List global orgs returns "OK" response
 */

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

const configuration = client.createConfiguration({
  authMethods: {
    AuthZ: {
      accessToken: process.env.DD_BEARER_TOKEN as string,
    },
  },
});
const apiInstance = new v2.OrganizationsApi(configuration);

const params: v2.OrganizationsApiListGlobalOrgsRequest = {
  userHandle: "user@example.com",
};

apiInstance
  .listGlobalOrgs(params)
  .then((data: v2.GlobalOrgsResponse) => {
    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://dnd37xeb23o8n.cloudfront.net/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:

```bash
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"
```
{% /tab %}
{% /tabs %}
