Get what a report shows
/v1/reports/{reportId}/resultsReturns what a report shows: the template it is built from, the template's widgets, and each widget's results under its widgetId. Lay the widgets out with the template's rows and each widget's row, column and order.
A live report is built when you ask, over the dates it covers counted back from now, as the user who created it. A snapshot returns what it held when it was made, and never changes.
Each widget's results#
What a widget sends depends on its uiId. Every widget sends the same title bar, resultState and display fields. A Score adds the score, a Table a page of rows, a Chart its series, and so on. Check resultState before you read them: anything other than ok means the widget has nothing to show, and says why.
Tables and charts also send settings for drawing them on Silktide's own screens, which this page does not list and which can change. For a table's rows in a stable shape, read the same data through results instead.
A live report for another website#
POST /v1/reports/{reportId}/results answers the same as GET, and takes options as a JSON body. Send context to build a live report for something else of the same contextTypeId without changing the report:
{ "context": { "websiteId": 2, "sectionId": 0 } }The shapes are in Context. A GET can send it in the query string instead, as context[websiteId]=2&context[sectionId]=0. A context that names nothing the API key's user can see falls back to the whole account, so a website widget then shows a Message that no website is selected. A snapshot ignores context.
Errors worth knowing#
A live report is built with its creator's permissions. If its creator no longer exists, such as a user who has left the account, it cannot be built, and this answers 403 with AccessDenied. A snapshot is unaffected.
A snapshot whose results could not be built when it was made has none to return, and answers 404 with NotFound.
curl "https://api.eu.silktide.com/v1/reports/2/results" \
-H "Authorization: silktide token=$SILKTIDE_API_KEY"{
"report": {
"reportId": 2,
"reportTemplateId": "accessibility-22",
"reportScheduleId": 0,
"contextTypeId": "website",
"name": "Wine Barrel WCAG 2.2",
"thumbnailUrl": "",
"startTime": 0,
"endTime": 0,
"durationInterval": "week",
"durationPeriod": 2,
"created": 1792953607,
"creatorAssigneeId": "u:eu-12",
"context": {
"websiteId": 3,
"sectionId": 0
},
"isLive": true,
"version": 3
},
"reportId": 2,
"reportTemplate": {
"reportTemplateId": "accessibility-22",
"name": "WCAG 2.2 summary",
"description": "Summarize WCAG 2.2 standards for a specific website or section.",
"rows": [
{
"columns": 1
},
{
"columns": 1
}
],
"created": 1704913002,
"creatorAssigneeId": "u:eu-12",
"contextTypeId": "website",
"context": [],
"isCustom": true,
"isDisabled": false
},
"widgets": [
{
"widgetId": 28,
"reportTemplateId": "accessibility-22",
"widgetTypeId": "Website/Presentation/Heading",
"row": 0,
"column": 0,
"order": 0,
"options": {
"name": "Heading",
"text": "Accessibility scores",
"level": "2",
"showBackground": false,
"hideContextLabels": true
},
"contextTypeId": "",
"context": [],
"filters": []
},
{
"widgetId": 29,
"reportTemplateId": "accessibility-22",
"widgetTypeId": "Website/Score/Score",
"row": 1,
"column": 0,
"order": 0,
"options": {
"name": "WCAG 2.2 score",
"categoryId": "wcag-22",
"helpText": null,
"helpUrl": null,
"hideContextLabels": true
},
"contextTypeId": "",
"context": [],
"filters": []
}
],
"results": {
"28": {
"uiId": "Heading",
"resultState": "ok",
"header": {
"name": "Heading",
"contextLabels": [],
"value": null,
"decimals": 0
},
"footer": {},
"helpText": null,
"helpUrl": null,
"canAddToDashboard": true,
"controls": [],
"instruction": null,
"buildDuration": 0.001,
"isOutOfDate": false,
"showBackground": false,
"exportFormats": [],
"text": "Accessibility scores",
"level": 2
},
"29": {
"uiId": "Score",
"resultState": "ok",
"header": {
"name": "WCAG 2.2 score",
"contextLabels": [],
"value": null,
"decimals": 0
},
"footer": {},
"helpText": null,
"helpUrl": null,
"canAddToDashboard": true,
"controls": [],
"instruction": null,
"buildDuration": 0.016,
"isOutOfDate": false,
"showBackground": true,
"exportFormats": [
"csv"
],
"score": 20.2,
"lastScore": null,
"approved": null,
"ignored": null,
"fixed": null,
"scoreOverTime": []
}
},
"time": 1794235487
}Request
Path parameters
reportIdintegerrequiredat least 1The report.
Response
200JSON.
reportobjectrequiredThe report, as Get a report returns it.
Show 15 fieldsHide fields
reportIdintegerrequiredat least 1The report.
reportTemplateIdstringrequired1 to 16 charactersThe report template it is made from.
reportScheduleIdintegerrequiredThe report schedule that made it.
0when it was not made by a schedule.contextTypeIdstringrequiredWhat kind of thing it covers, copied from its template:
website,websites,accountorproperty.One of
websitewebsitesaccountpropertynamestringrequiredat least 1 charactersIts name.
thumbnailUrlstringrequiredA small screenshot of it. Empty until one is made, a few minutes after a snapshot is created.
startTimeintegerrequiredFor a snapshot, the start of the dates it covers.
0for a live report.endTimeintegerrequiredFor a snapshot, the end of the dates it covers.
0for a live report.durationIntervalstringrequiredThe unit of how far back it looks.
One of
dayweekmonthyeardurationPeriodintegerrequired0 to 90How many
durationIntervals back it looks.weekand4cover the last four weeks.createdintegerrequiredWhen it was created.
creatorAssigneeIdstringrequiredThe assignee who created it: a user (
u:), an API key (a:), orsystemfor those Silktide made itself.contextobject or map of any JSON or empty listrequiredWhat it covers, in the shape its
contextTypeIdtakes:{"websiteId": 3, "sectionId": 0}for one website,{"criteria": {...}}for several.[]when it has none.Show 2 fieldsHide fields
websiteIdintegerrequiredat least 1The website.
sectionIdintegerrequiredOne of its sections.
0for the whole website.
isLivebooleanrequiredtruefor a live report (a dashboard), which is built afresh each time it is read.falsefor a snapshot, built once when it is created.versionintegerrequiredat least 1The version of the format it is stored in, which Silktide uses to upgrade older reports. Nothing to act on.
reportIdintegerrequiredat least 1The report again.
reportTemplateobjectrequiredThe template the results were built from. For a snapshot, as it was when the snapshot was made.
Show 10 fieldsHide fields
reportTemplateIdstringrequired1 to 16 charactersThe template's id, such as
broken-links.namestringrequiredat least 1 charactersIts name, as Silktide shows it.
descriptionstringrequiredup to 255 charactersWhat it is for, as Silktide shows it. Can be empty.
rowslist of objectsrequiredIts layout, one entry per row of widgets, top to bottom.
Show 1 fieldsHide fields
columnsintegerrequiredat least 1How many widgets sit side by side in this row.
createdintegerrequiredWhen it was created.
creatorAssigneeIdstringrequiredThe assignee who created it: a user (
u:), an API key (a:), orsystemfor those Silktide made itself.contextTypeIdstringrequiredWhat kind of thing a report made from it covers:
website,websites,accountorproperty.One of
websitewebsitesaccountpropertycontextobject or map of any JSON or empty listrequiredThe context its author built it with in Silktide. Reports made from it do not take it: send each report's own
context.[]when it has none.Show 2 fieldsHide fields
websiteIdintegerrequiredat least 1The website.
sectionIdintegerrequiredOne of its sections.
0for the whole website.
isCustombooleanrequiredtrueif someone in the account made it,falseif it comes with Silktide.isDisabledbooleanrequiredtruewhen Silktide has switched it off. Live reports made from it cannot be read until it is switched back on.
widgetslist of objectsrequiredThe template's widgets, with every option filled in.
Show 10 fieldsHide fields
widgetIdintegerrequiredat least 1The widget. Its results are under this id in
results.reportTemplateIdstringrequired1 to 16 charactersThe template the widget belongs to.
widgetTypeIdstringrequiredWhat kind of widget it is, such as
Website/Score/Score.rowintegerrequiredThe row it is in, from
0, as in the template'srows.columnintegerrequiredThe column it is in within its row, from
0.orderintegerrequiredIts place among widgets in the same row and column, from
0.optionsmap of any JSONrequiredHow the widget is set up, such as its
nameand which score it shows. Depends onwidgetTypeId.contextTypeIdstringrequiredThe kind of context the widget is locked to. Empty when it uses the report's context.
contextmap of any JSON or empty listrequiredThe context the widget is locked to.
[]when it uses the report's context.filtersmap of any JSON or empty listrequiredFilters the widget starts with, such as a table's sort.
[]when it has none.
resultsmap of objects or empty listrequiredEach widget's results, by
widgetId.[]when the template has no widgets.timeintegerrequiredWhen the results were built: now for a live report, when it was made for a snapshot.
Errors
| Status | Type | When |
|---|---|---|
| 403 | EditionNotAvailable | The account does not have Silktide 4. Reports, report schedules and report templates are Silktide 4's, so an account with only Silktide 5 cannot use them. |
| 400 | InvalidRequest | reportId is not a whole number. properties.field is reportId. |
| 404 | ModelNotFound | No report with that id exists in the account. |
| 404 | NotFound | The report is a snapshot with no results, because they could not be built when it was made. |
| 403 | AccessDenied | The API key's user cannot see the report, or a live report cannot be built: its creator no longer exists, or Silktide has switched its template off. |
| 401 | NotLoggedIn | No API key was sent, or it is not a key for this region.(any operation) |
| 429 | TooManyRequests | Too many requests to this path in five seconds. Retry after the number of seconds in the Retry-After header, which properties.retryAfter repeats.(any operation) |
| 503 | - | Silktide is busy. Retry after the number of seconds in the Retry-After header.(any operation) |
Every error has the same body. See Errors.
Access
- Permission
- Can see this dashboard / snapshot
- Plan feature
- None
- Edition
- Silktide 4 only
- Cost
- Free
- Available since
- v1.0.0
Try it
Sends a real request to your account from this browser. Your key stays in this tab and goes only to the Silktide API.