Extension Viewer State¶
PATCH /extension_viewer_state¶
Extension Viewer State
Authorization¶
Send Authorization: <Twitch Extension Client ID> <Muxy JWT>. The JWT role must satisfy the endpoint requirements shown in the examples.
Request body¶
Admin JWTs may also send an object mapping up to 1,000 Twitch user IDs to patch values.
Content type: application/json
Schema¶
{
"oneOf": [
{
"type": "array",
"description": "RFC 6902 JSON Patch operations.",
"items": {
"type": "object",
"required": [
"op",
"path"
],
"properties": {
"op": {
"type": "string",
"enum": [
"add",
"remove",
"replace",
"move",
"copy",
"test"
]
},
"path": {
"type": "string",
"description": "JSON Pointer to the target value."
},
"from": {
"type": "string",
"description": "Source JSON Pointer for move or copy."
},
"value": {
"description": "Value used by add, replace, or test."
}
}
}
},
{
"type": "object",
"description": "JSON Merge Patch object.",
"additionalProperties": true
}
]
}
Example¶
[
{
"op": "replace",
"path": "/favorite_color",
"value": "blue"
}
]
Responses¶
200 Response¶
Write accepted. The current service returns an empty JSON object.
Content type: application/json
Schema¶
{
"type": "object",
"maxProperties": 0
}
Example¶
{}
400 Error¶
400
Content type: application/json
Schema¶
{
"type": "object",
"properties": {
"reason": {
"type": "string"
}
}
}
Example¶
{
"reason": "400"
}
Examples¶
Curl¶
curl --request PATCH \
--url https://api.muxy.io/v1/e/extension_viewer_state \
--header 'authorization: <Client ID> <viewer JWT>' \
--header 'content-type: application/json' \
--data '[{ "op": "add", "path": "/ice_cream/toppings", "value": ["nuts", "whipped cream"] }]'
Generated API reference
This endpoint is generated from rest-v1.yaml.