---
title: "Get dataset dependencies"
method: POST
path: "/api/v2/security_monitoring/datasets/dependencies"
tags: ["Security Monitoring"]
---

# Get dataset dependencies

`POST /api/v2/security_monitoring/datasets/dependencies`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/security_monitoring/datasets/dependencies`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `security_monitoring_rules_read`

Return, for each of the requested datasets, the list of detection rules that depend
on it. Useful for understanding the impact of updating or deleting a dataset.

## Request body

- SecurityMonitoringDatasetDependenciesRequest: Request body for retrieving dependencies of a batch of datasets.
  - `data` SecurityMonitoringDatasetDependenciesRequestData, required: The data wrapper of a dataset dependencies request.
    - `attributes` SecurityMonitoringDatasetDependenciesRequestAttributes, required: The attributes of a dataset dependencies request.
      - `datasetIds` string[], required: The list of dataset UUIDs to query dependencies for. Must contain between 1 and 100 items.

## Response `200`

OK

- SecurityMonitoringDatasetDependenciesResponse: Response listing the dependents of each requested dataset.
  - `data` SecurityMonitoringDatasetDependentsData[], required: The list of dataset dependents entries.
    - `attributes` SecurityMonitoringDatasetDependentsAttributes, required: The attributes of a dataset dependents entry.
      - `count` integer, required: The number of resources that depend on the dataset.
      - `datasetId` string, required: The UUID of the dataset whose dependencies are being reported.
      - `ids` string[], required: The list of resource IDs that depend on the dataset.
      - `resource_type` string, required: The type of resource that depends on the dataset.
    - `id` string, required: The UUID of the dataset.
    - `type` 'datasetDependents', required: The type of resource for a dataset dependents entry.

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
