Graphing with JSON
Rapport de recherche Datadog : Bilan sur l'adoption de l'informatique sans serveur Rapport : Bilan sur l'adoption de l'informatique sans serveur

Graphing with JSON

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.

If you query a Datadog timeboard though the dashboard API, the result is a JSON object with the following layout:

    "type": "object",
    "properties": {
        "title": {"type": "string"},
        "description": {"type": "string"},
        "layout_type": {"enum": ["ordered", "free"]},
        "is_read_only": {"type": "boolean"},
        "template_variables": {"type": "array", "items": TEMPLATE_VARIABLE_SCHEMA},
        "notify_list": {"type": "array", "items": {"type": "string"}},
        "widgets": {
            "type": "array",
            "items": WIDGET_SCHEMA
    "required": ["title", "layout_type", "widgets"],
titlestringTitle of your dashboard.
descriptionstringDescription of the dashboard.
layout_typeenumLayout type of the dashboard. Available values are: ordered (previous timeboard) or free (previous screenboard layout)
is_read_onlyBooleanWhether this dashboard is read-only. If true, only the dashboard author and administrators can apply changes to it.
template_variablesarray of objectList of template variables for this dashboard. See the template variable schema documentation to learn more.
notify_listarray of stringsList of handles of users to notify when changes are made to this dashboard.
widgetsarray of objectList of widgets to display on the dashboard. See the dedicated Widget JSON schema documentation to build the WIDGET_SCHEMA.

Template variable schema

Dashboard template variables apply a new scope to one or more graphs on your dashboard. This allows you to dynamically explore metrics across different sets of tags by using variables instead of specific tags. To configure them through the Dashboard API, use the following layout:

    "type": "object",
    "properties": {
        "name": {"type": "string"},
        "default": {"type": "string"},
        "prefix": {"type": "string"},
    "additionalProperties": false,
    "required": ["name"]
namestringName of your template variable.
defaultstringDefault value for your template variable.
prefixstringTag group for your template variable.

Learn more about template variable in the Datadog UI.

Further Reading

Documentation, liens et articles supplémentaires utiles: