For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/es/api/latest/fleet-automation/list-all-deployments.md. A documentation index is available at /llms.txt.
Language
Datadog site

List all deployments

GEThttps://api.datadoghq.com/api/v2/fleet/deploymentshttps://api.us3.datadoghq.com/api/v2/fleet/deploymentshttps://api.us5.datadoghq.com/api/v2/fleet/deploymentshttps://api.datadoghq.eu/api/v2/fleet/deploymentshttps://api.ap1.datadoghq.com/api/v2/fleet/deploymentshttps://api.ap2.datadoghq.com/api/v2/fleet/deploymentshttps://api.uk1.datadoghq.com/api/v2/fleet/deploymentshttps://api.ddog-gov.com/api/v2/fleet/deploymentshttps://api.us2.ddog-gov.com/api/v2/fleet/deployments

Descripción general

Retrieve a paginated list of all deployments for fleet automation.

This endpoint requires the hosts_read permission.

Argumentos

Cadenas de consulta

Nombre
Type
Descripción
page_size
integer

Number of deployments to return per page. Maximum value is 100.

Default: 10
page_number
integer

Page number for pagination, starting at 0.

Default: 0
sort
string

Field to sort results by (for example, start_date). Must be a supported field name; unsupported values return a 400 error.

ascending
boolean

Set to true to sort in ascending order. This setting has no effect unless sort is also set. Defaults to descending order.

filter
string

Query used to filter deployments. Uses the Datadog query syntax. Filtering on an unsupported field returns a 400 error. For example:

  • status:failed or status:done_with_errors: deployments that need investigation.
  • status:running: deployments currently in flight.
  • update_type:update_package or update_type:update_config_operations: deployments of a given type.

Respuesta

OK

Response containing a paginated list of deployments.

Campo
Type
Descripción
data [required]
[object]

Array of deployments matching the query criteria.

meta
object

Metadata for the v2 list of deployments, including pagination information.

Ejemplo de código

List all deployments
# Set your Datadog site and credentials
export DD_SITE="datadoghq.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/fleet/deployments" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.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/fleet/deployments" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.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/fleet/deployments" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# 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/fleet/deployments" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.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/fleet/deployments" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.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/fleet/deployments" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.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/fleet/deployments" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="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/fleet/deployments" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Set your Datadog site and credentials
export DD_SITE="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/fleet/deployments" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"