Output Charts

Docs · Visuals

Status grid JSON format.

One cell per item, coloured good, warn or bad, with a count of each above.

Try it

Edit the example and the visual redraws. Mistakes show the same messages the API returns.

The visual

Change any number or label. The chart follows.

Fields

The status grid document
FieldTypeRule
nameKeyRequiredstringThe key in each row that holds the item's name. Up to 80 characters.
statusKeyRequiredstringThe key in each row that holds the item's status. Up to 80 characters. Must differ from nameKey.
statusesOptionalobjectMaps your own status words to good, warn or bad, 1 to 20 entries, words of 1 to 200 characters. With it a status can be any word, and a word not in the map shows grey, as no status. Without it a status must be good, warn, bad or empty. For example, "statuses": { "Patched": "good", "Not patched": "bad" }.
noteKeyOptionalstringThe key in each row that holds a short second line, such as a version. Up to 80 characters. Must differ from nameKey and statusKey.
hrefKeyOptionalstringThe key in each row that holds a link; the whole cell opens it. Up to 80 characters. Must differ from nameKey, statusKey and noteKey.
dataRequiredarrayUp to 200 rows, drawn in the order you list them; may be empty.
Each row in data
FieldTypeRule
<nameKey>RequiredstringThe item's name. Up to 80 characters. Names must be unique.
<statusKey>RequiredstringThe status: good, warn, bad or an empty string; with statuses, any string up to 200 characters.
<noteKey>Optionalstring or nullA note of up to 80 characters; may be empty or null.
<hrefKey>Optionalstring or nullAn http or https link of up to 2048 characters; null or an empty string means no link.

Good to know

  • The line above the cells counts only the statuses present. Each cell has a shape as well as a colour: a circle for good, a diamond for warn, a square for bad and an outlined shape for no status.
  • A cell's title gives the name, the status word and the note. Links open in a new tab.
  • Append merges rows by name, so one site's script can send only its own row. An append that would make more than 200 rows is refused; replace the whole list with PUT /v1/visuals/{id}/data instead.

Example

{
  "nameKey": "site",
  "statusKey": "patch",
  "statuses": { "Patched": "good", "Pending": "warn", "Not patched": "bad" },
  "noteKey": "version",
  "hrefKey": "admin",
  "data": [
    {
      "site": "shop.example.com",
      "patch": "Patched",
      "version": "6.4.2",
      "admin": "https://shop.example.com/wp-admin"
    },
    {
      "site": "blog.example.com",
      "patch": "Not patched",
      "version": "6.1.0",
      "admin": "https://blog.example.com/wp-admin"
    }
  ]
}

Send it from your code

Paste the document in the editor, or replace it with a PUT to the visual's push URL. The push API page has the details and examples.

Next: Heatmap JSON format