Read a widget with current authorized results

Returns one widget of the caller, or a template shared in the workspace, with results computed for the caller's read access. A calendar widget also accepts window with from and to (at most 42 days) to read another month or a single day instead of its own range; other kinds refuse a window.

Requires: read access to the widget's lists; restricted values stay hidden.

POST
/v1/widgets/read

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/read" \  -H "Content-Type: application/json" \  -d '{    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"  }'
{
  "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