For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/fr/api/latest/network-device-monitoring/get-the-list-of-interfaces-of-the-device.md. A documentation index is available at /llms.txt.
Language
Datadog site

Récupérer la liste des interfaces de l'appareil

GEThttps://api.datadoghq.com/api/v2/ndm/interfaceshttps://api.us3.datadoghq.com/api/v2/ndm/interfaceshttps://api.us5.datadoghq.com/api/v2/ndm/interfaceshttps://api.datadoghq.eu/api/v2/ndm/interfaceshttps://api.ap1.datadoghq.com/api/v2/ndm/interfaceshttps://api.ap2.datadoghq.com/api/v2/ndm/interfaceshttps://api.uk1.datadoghq.com/api/v2/ndm/interfaceshttps://api.ddog-gov.com/api/v2/ndm/interfaceshttps://api.us2.ddog-gov.com/api/v2/ndm/interfaces

Présentation

Récupérer la liste des interfaces du dispositif.

Arguments

Chaînes de requête

Name
Type
Description
device_id [required]
string

The ID of the device to get interfaces from.

get_ip_addresses
boolean

Whether to get the IP addresses of the interfaces.

Réponse

OK

The GetInterfaces operation's response.

Champ
Type
Description
data
[object]

Get Interfaces response

Exemple de code

Récupérer la liste des interfaces de l'appareil
# Required query arguments
export device_id="example:1.2.3.4"

# 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/ndm/interfaces?device_id=${device_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export device_id="example:1.2.3.4"

# 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/ndm/interfaces?device_id=${device_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export device_id="example:1.2.3.4"

# 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/ndm/interfaces?device_id=${device_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export device_id="example:1.2.3.4"

# 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/ndm/interfaces?device_id=${device_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export device_id="example:1.2.3.4"

# 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/ndm/interfaces?device_id=${device_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export device_id="example:1.2.3.4"

# 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/ndm/interfaces?device_id=${device_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export device_id="example:1.2.3.4"

# 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/ndm/interfaces?device_id=${device_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export device_id="example:1.2.3.4"

# 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/ndm/interfaces?device_id=${device_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Required query arguments
export device_id="example:1.2.3.4"

# 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/ndm/interfaces?device_id=${device_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"