A context describes a group of resources.
For example, the “all users” context could be transformed into the “users over 35” context using a “filter” action.
Builds a pipeline of actions
[ [ "filter", { "is_author": true } ], "count" ]
Labels actions and runs them in parallel
{
"count": "count",
"page": [ [ "page", 0, 5 ] ]
}
{
"authors": [
"users",
[ "filter": { "is_author": true } ],
{
"count": "count",
"top10": [
[ "sort", "-score" ],
[ "page", 0, 10 ]
]
}
]
}
{
"authors": {
"count": 23,
"top10": [
{ "name": "Fred Nerk", ... },
{ "name": "Joe Blow", ... },
...
]
}
}
POST /api
Content-Type: application/json
Accept: application/json
{ "user_count": [ "users", "count" ] }
200 OK
Content-Type: application/json
{ "user_count": 107 }