For convenience and performance, you may request multiple results at once.
This is equivalent to making multiple requests to separate results endpoints.
POST /v1/results
Pass a keyed results
object containing the results and their options that you want.
To do this, you should first identify a result endpoint you wish to query, e.g. /v1/results/scores
. Now take the part after /v1/results/
and use that as your result identifier. In this example, that would be scores
.
With these identifiers, you can request multiple results at once.
In the following example, we are requesting two results:
result
of scores
, with no options. This will be returned with a key of all-cores
result
of score-trend
, with an option score
set to wcag-21
.This is equivalent to calling the separate results APIs for /v1/results/scores
and /v1/results/score-trend
.
{
"websiteId": 2,
"sectionId": 0,
"results": {
"all-scores": {
"result": "scores"
},
"accessibility-trend": {
"result": "score-trend",
"options": {
"score": "wcag-21"
}
}
}
}
Note we also specify a websiteId
and sectionId
to tell Silktide what website we are requesting results for.
The response is keyed by the same keys you specified in your results
object. The specific results you receive will depend on the result you requested.
{
"results": {
"all-scores": {
"result": {
"scores": {
"audit": 64,
"consent": 58,
"content": 34,
"content-seo": 26,
"content-wcag-21": 59,
"developer": 35,
"developer-functionality": 51,
"developer-seo": 50,
"developer-vitals": null,
"developer-wcag-21": 4,
"developer-wcag-22": 4,
"functionality": 51,
"links": 21,
"marketing": 36,
"mobile": 10,
"overall": 27,
"privacy": 54,
"security": 40,
"seo-content": 26,
"seo-technical": 50,
"ux": 31,
"vitals": null,
"wcag-20": 4,
"wcag-20-a": 6,
"wcag-20-aa": 2,
"wcag-20-aaa": 2,
"wcag-21": 9,
"wcag-21-a": 6,
"wcag-21-aa": 1,
"wcag-21-aaa": 1,
"wcag-21-auditory": 33,
"wcag-21-cognitive": 0,
"wcag-21-mobile": 62,
"wcag-21-motor": 5,
"wcag-21-pdf": 30,
"wcag-21-visual": 0,
"wcag-22": 9,
"wcag-22-a": 6,
"wcag-22-aa": 1,
"wcag-22-aaa": 1,
"wcag-22-auditory": 33,
"wcag-22-cognitive": 0,
"wcag-22-mobile": 62,
"wcag-22-motor": 12,
"wcag-22-pdf": 30,
"wcag-22-visual": 0,
"writing": 28
}
}
},
"accessibility-trend": {
"result": {
"scores": [
{
"time": 1704335552,
"score": 9
},
{
"time": 1704594628,
"score": 9
}
],
"range": {
"start": null,
"end": null
}
}
}
}
}