Get a JSON Store¶
GET /json_store¶
Returns a named channel-scoped JSON document. The default store is used when id is omitted; IDs beginning with global use extension-wide storage. A cache miss can return 202 while a registered external data source is being refreshed.
Authorization¶
Send Authorization: <Twitch Extension Client ID> <Muxy JWT>. The JWT role must satisfy the endpoint requirements shown in the examples.
Parameters¶
| Name | In | Required | Type | Constraints | Description |
|---|---|---|---|---|---|
id |
query | no | string |
default "default" |
Store identifier. Defaults to default; IDs beginning with global use extension-wide storage. |
Responses¶
200 Response¶
The stored JSON document.
Content type: application/json
Schema¶
{
"type": "object",
"additionalProperties": true
}
Example¶
{
"favorite_color": "blue"
}
202 Response¶
The document is not cached and a registered source is being refreshed, or another request already holds the refresh lock.
Content type: application/json
Schema¶
{
"type": "object",
"maxProperties": 0
}
Example¶
{}
404 Error¶
No cached document or registered source exists for this store identifier.
Content type: application/json
Schema¶
{
"type": "object",
"properties": {
"reason": {
"type": "string"
}
}
}
Example¶
{
"reason": "Not Found"
}
500 Error¶
The service could not complete the operation because an internal or storage dependency failed.
Content type: application/json
Schema¶
{
"type": "object",
"additionalProperties": true
}
Example¶
{
"reason": ""
}
502 Error¶
The registered external source returned a response that was not a JSON object.
Content type: application/json
Schema¶
{
"type": "object",
"properties": {
"reason": {
"type": "string"
}
}
}
Example¶
{
"reason": "external server returned a bad response"
}
Generated API reference
This endpoint is generated from rest-v1.yaml.