List all dashboard widgets

Returns every widget the caller owns across the main dashboard and every dashboard view, oldest first, with current authorized results. viewId names the dashboard view a widget belongs to (null for the main dashboard) and layout holds its stored position per breakpoint (xs, sm, md, lg) in grid units: x and w count columns (12 on lg, 8 on md, 4 on sm, 2 on xs) and y and h count rows of 54 px with 12 px gaps. A breakpoint without a stored position is placed automatically when the dashboard renders. Send an empty object.

Requires: ownership of the widgets; the list holds only the caller's own widgets and their results stay filtered by read access to the widgets' lists.

POST
/v1/widgets/list

Authorization

apiKeyAuth
x-api-key<token>

API key authentication. Create an API key in your user profile and include it in the x-api-key header.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://customermates.com/api/v1/widgets/list" \  -H "Content-Type: application/json" \  -d '{}'
{
  "widgets": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "kind": "chart",
      "version": 9007199254740991,
      "userId": "string",
      "companyId": "string",
      "name": "string",
      "measure": {
        "source": {
          "typeId": "caab7c42-4ce7-4bd5-bbab-6017cec730b7",
          "locale": "en",
          "includeIdentities": true,
          "search": "string",
          "filters": [],
          "relatedFilters": [
            {
              "path": [
                {
                  "relationId": "4b4bc808-5132-481f-afc2-e3872bf12049",
                  "direction": "outgoing"
                }
              ],
              "operator": "any",
              "filters": [
                {
                  "fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",
                  "operator": "eq",
                  "value": {
                    "kind": "text",
                    "value": "string"
                  },
                  "values": [
                    {
                      "kind": "text",
                      "value": "string"
                    }
                  ]
                }
              ],
              "relationships": [],
              "search": "string",
              "recordIds": [
                "497f6eca-6276-4993-bfeb-53cbbbba6f08"
              ]
            }
          ],
          "relationships": []
        },
        "aggregation": "count",
        "valueFieldId": "bc0e5b6c-a198-4e47-86fe-48164e1a20ac",
        "groupBy": {
          "path": [
            {
              "relationId": "4b4bc808-5132-481f-afc2-e3872bf12049",
              "direction": "incoming"
            }
          ],
          "fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",
          "dateInterval": "day",
          "timeZone": "string",
          "filter": {
            "search": "string",
            "filters": [],
            "relationships": [],
            "relatedFilters": [
              {
                "path": [
                  {
                    "relationId": "4b4bc808-5132-481f-afc2-e3872bf12049",
                    "direction": "outgoing"
                  }
                ],
                "operator": "any",
                "filters": [
                  {
                    "fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",
                    "operator": "eq",
                    "value": {
                      "kind": "text",
                      "value": "string"
                    },
                    "values": [
                      {
                        "kind": "text",
                        "value": "string"
                      }
                    ]
                  }
                ],
                "relationships": [],
                "search": "string",
                "recordIds": [
                  "497f6eca-6276-4993-bfeb-53cbbbba6f08"
                ]
              }
            ]
          }
        },
        "groupLimit": 100
      },
      "displayOptions": {
        "barColors": [
          "default1"
        ],
        "displayType": "verticalBarChart",
        "reverseXAxis": true,
        "reverseYAxis": true,
        "useGroupColors": true,
        "showLegend": true,
        "showFilters": true
      },
      "layout": {
        "xs": {
          "i": "string",
          "x": 0,
          "y": 0,
          "w": 0,
          "h": 0,
          "minW": 0,
          "maxW": 0,
          "minH": 0,
          "maxH": 0
        },
        "sm": {
          "i": "string",
          "x": 0,
          "y": 0,
          "w": 0,
          "h": 0,
          "minW": 0,
          "maxW": 0,
          "minH": 0,
          "maxH": 0
        },
        "md": {
          "i": "string",
          "x": 0,
          "y": 0,
          "w": 0,
          "h": 0,
          "minW": 0,
          "maxW": 0,
          "minH": 0,
          "maxH": 0
        },
        "lg": {
          "i": "string",
          "x": 0,
          "y": 0,
          "w": 0,
          "h": 0,
          "minW": 0,
          "maxW": 0,
          "minH": 0,
          "maxH": 0
        }
      },
      "viewId": "5aa272a5-73e4-4f9c-8123-4bac998fdb73",
      "isTemplate": true,
      "createdAt": "string",
      "updatedAt": "string",
      "data": {
        "schemaRevision": -9007199254740991,
        "attribution": "full",
        "total": {
          "count": -9007199254740991,
          "result": {
            "state": "value",
            "value": {
              "kind": "text",
              "value": "string"
            }
          }
        },
        "groups": [
          {
            "record": {
              "typeId": "caab7c42-4ce7-4bd5-bbab-6017cec730b7",
              "recordId": "0470cfd4-dcf3-4d8c-ac28-58c6deeff25f"
            },
            "fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",
            "label": {
              "state": "value",
              "value": {
                "kind": "text",
                "value": "string"
              }
            },
            "count": -9007199254740991,
            "result": {
              "state": "value",
              "value": {
                "kind": "text",
                "value": "string"
              }
            }
          }
        ]
      },
      "status": "ready",
      "decimalPlaces": 30,
      "groupOptions": [
        {
          "id": "string",
          "label": "string",
          "color": "string",
          "probability": "string"
        }
      ]
    }
  ]
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
Empty