Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.

Datasets

Data Access Controls in Datadog is a feature that allows administrators and access managers to regulate access to sensitive data. By defining Restricted Datasets, you can ensure that only specific teams or roles can view certain types of telemetry (for example, logs, traces, metrics, and RUM data).

POST https://api.ap1.datadoghq.com/api/v2/datasetshttps://api.ap2.datadoghq.com/api/v2/datasetshttps://api.datadoghq.eu/api/v2/datasetshttps://api.ddog-gov.com/api/v2/datasetshttps://api.datadoghq.com/api/v2/datasetshttps://api.us3.datadoghq.com/api/v2/datasetshttps://api.us5.datadoghq.com/api/v2/datasets

Présentation

Create a dataset with the configurations in the request.

Requête

Body Data (required)

Dataset payload

Expand All

Champ

Type

Description

data [required]

object

Dataset object.

attributes [required]

object

Dataset metadata and configuration(s).

created_at

date-time

Timestamp when the dataset was created.

created_by

uuid

Unique ID of the user who created the dataset.

name [required]

string

Name of the dataset.

principals [required]

[string]

List of access principals, formatted as principal_type:id. Principal can be 'team' or 'role'.

product_filters [required]

[object]

List of product-specific filters.

filters [required]

[string]

Defines the list of tag-based filters used to restrict access to telemetry data for a specific product. These filters act as access control rules. Each filter must follow the tag query syntax used by Datadog (such as @tag.key:value), and only one tag or attribute may be used to define the access strategy per telemetry type.

product [required]

string

Name of the product the dataset is for. Possible values are 'apm', 'rum', 'synthetics', 'metrics', 'logs', 'sd_repoinfo', 'error_tracking', 'cloud_cost', and 'ml_obs'.

id

string

Unique identifier for the dataset.

type [required]

string

Resource type, always "dataset".

{
  "data": {
    "attributes": {
      "created_at": "2019-09-19T10:00:00.000Z",
      "created_by": "string",
      "name": "Security Audit Dataset",
      "principals": [
        "role:86245fce-0a4e-11f0-92bd-da7ad0900002"
      ],
      "product_filters": [
        {
          "filters": [
            "@application.id:ABCD"
          ],
          "product": "logs"
        }
      ]
    },
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "type": "dataset"
  }
}

Réponse

OK

Response containing a single dataset object.

Expand All

Champ

Type

Description

data [required]

object

Dataset object.

attributes [required]

object

Dataset metadata and configuration(s).

created_at

date-time

Timestamp when the dataset was created.

created_by

uuid

Unique ID of the user who created the dataset.

name [required]

string

Name of the dataset.

principals [required]

[string]

List of access principals, formatted as principal_type:id. Principal can be 'team' or 'role'.

product_filters [required]

[object]

List of product-specific filters.

filters [required]

[string]

Defines the list of tag-based filters used to restrict access to telemetry data for a specific product. These filters act as access control rules. Each filter must follow the tag query syntax used by Datadog (such as @tag.key:value), and only one tag or attribute may be used to define the access strategy per telemetry type.

product [required]

string

Name of the product the dataset is for. Possible values are 'apm', 'rum', 'synthetics', 'metrics', 'logs', 'sd_repoinfo', 'error_tracking', 'cloud_cost', and 'ml_obs'.

id

string

Unique identifier for the dataset.

type [required]

string

Resource type, always "dataset".

{
  "data": {
    "attributes": {
      "created_at": "2019-09-19T10:00:00.000Z",
      "created_by": "string",
      "name": "Security Audit Dataset",
      "principals": [
        "role:86245fce-0a4e-11f0-92bd-da7ad0900002"
      ],
      "product_filters": [
        {
          "filters": [
            "@application.id:ABCD"
          ],
          "product": "logs"
        }
      ]
    },
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "type": "dataset"
  }
}

Bad Request

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Not Authorized

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Conflict

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Exemple de code

                  # 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.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/datasets" \ -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 { "data": { "attributes": { "name": "Security Audit Dataset", "principals": [ "role:86245fce-0a4e-11f0-92bd-da7ad0900002" ], "product_filters": [ { "filters": [ "@application.id:ABCD" ], "product": "logs" } ] }, "type": "dataset" } } EOF

GET https://api.ap1.datadoghq.com/api/v2/datasets/{dataset_id}https://api.ap2.datadoghq.com/api/v2/datasets/{dataset_id}https://api.datadoghq.eu/api/v2/datasets/{dataset_id}https://api.ddog-gov.com/api/v2/datasets/{dataset_id}https://api.datadoghq.com/api/v2/datasets/{dataset_id}https://api.us3.datadoghq.com/api/v2/datasets/{dataset_id}https://api.us5.datadoghq.com/api/v2/datasets/{dataset_id}

Présentation

Retrieves the dataset associated with the ID.

Arguments

Paramètres du chemin

Nom

Type

Description

dataset_id [required]

string

The ID of a defined dataset.

Réponse

OK

Response containing a single dataset object.

Expand All

Champ

Type

Description

data [required]

object

Dataset object.

attributes [required]

object

Dataset metadata and configuration(s).

created_at

date-time

Timestamp when the dataset was created.

created_by

uuid

Unique ID of the user who created the dataset.

name [required]

string

Name of the dataset.

principals [required]

[string]

List of access principals, formatted as principal_type:id. Principal can be 'team' or 'role'.

product_filters [required]

[object]

List of product-specific filters.

filters [required]

[string]

Defines the list of tag-based filters used to restrict access to telemetry data for a specific product. These filters act as access control rules. Each filter must follow the tag query syntax used by Datadog (such as @tag.key:value), and only one tag or attribute may be used to define the access strategy per telemetry type.

product [required]

string

Name of the product the dataset is for. Possible values are 'apm', 'rum', 'synthetics', 'metrics', 'logs', 'sd_repoinfo', 'error_tracking', 'cloud_cost', and 'ml_obs'.

id

string

Unique identifier for the dataset.

type [required]

string

Resource type, always "dataset".

{
  "data": {
    "attributes": {
      "created_at": "2019-09-19T10:00:00.000Z",
      "created_by": "string",
      "name": "Security Audit Dataset",
      "principals": [
        "role:86245fce-0a4e-11f0-92bd-da7ad0900002"
      ],
      "product_filters": [
        {
          "filters": [
            "@application.id:ABCD"
          ],
          "product": "logs"
        }
      ]
    },
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "type": "dataset"
  }
}

Bad Request

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Not Authorized

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Exemple de code

                  # Path parameters
export dataset_id="0879ce27-29a1-481f-a12e-bc2a48ec9ae1"
# Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/datasets/${dataset_id}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

GET https://api.ap1.datadoghq.com/api/v2/datasetshttps://api.ap2.datadoghq.com/api/v2/datasetshttps://api.datadoghq.eu/api/v2/datasetshttps://api.ddog-gov.com/api/v2/datasetshttps://api.datadoghq.com/api/v2/datasetshttps://api.us3.datadoghq.com/api/v2/datasetshttps://api.us5.datadoghq.com/api/v2/datasets

Présentation

Get all datasets that have been configured for an organization.

Réponse

OK

Response containing a list of datasets.

Expand All

Champ

Type

Description

data [required]

[object]

The list of datasets returned in response.

attributes [required]

object

Dataset metadata and configuration(s).

created_at

date-time

Timestamp when the dataset was created.

created_by

uuid

Unique ID of the user who created the dataset.

name [required]

string

Name of the dataset.

principals [required]

[string]

List of access principals, formatted as principal_type:id. Principal can be 'team' or 'role'.

product_filters [required]

[object]

List of product-specific filters.

filters [required]

[string]

Defines the list of tag-based filters used to restrict access to telemetry data for a specific product. These filters act as access control rules. Each filter must follow the tag query syntax used by Datadog (such as @tag.key:value), and only one tag or attribute may be used to define the access strategy per telemetry type.

product [required]

string

Name of the product the dataset is for. Possible values are 'apm', 'rum', 'synthetics', 'metrics', 'logs', 'sd_repoinfo', 'error_tracking', 'cloud_cost', and 'ml_obs'.

id

string

Unique identifier for the dataset.

type [required]

string

Resource type, always "dataset".

{
  "data": [
    {
      "attributes": {
        "created_at": "2019-09-19T10:00:00.000Z",
        "created_by": "string",
        "name": "Security Audit Dataset",
        "principals": [
          "role:86245fce-0a4e-11f0-92bd-da7ad0900002"
        ],
        "product_filters": [
          {
            "filters": [
              "@application.id:ABCD"
            ],
            "product": "logs"
          }
        ]
      },
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "type": "dataset"
    }
  ]
}

Not Authorized

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Exemple de code

                  # Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/datasets" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

DELETE https://api.ap1.datadoghq.com/api/v2/datasets/{dataset_id}https://api.ap2.datadoghq.com/api/v2/datasets/{dataset_id}https://api.datadoghq.eu/api/v2/datasets/{dataset_id}https://api.ddog-gov.com/api/v2/datasets/{dataset_id}https://api.datadoghq.com/api/v2/datasets/{dataset_id}https://api.us3.datadoghq.com/api/v2/datasets/{dataset_id}https://api.us5.datadoghq.com/api/v2/datasets/{dataset_id}

Présentation

Deletes the dataset associated with the ID.

Arguments

Paramètres du chemin

Nom

Type

Description

dataset_id [required]

string

The ID of a defined dataset.

Réponse

No Content

Bad Request

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Not Authorized

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Exemple de code

                  # Path parameters
export dataset_id="0879ce27-29a1-481f-a12e-bc2a48ec9ae1"
# Curl command
curl -X DELETE "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/datasets/${dataset_id}" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"