Skip to content

Instantly share code, notes, and snippets.

@assada
Created June 12, 2023 14:34
Show Gist options
  • Save assada/962ff0e6e6fc9a0a803a4e2432d30932 to your computer and use it in GitHub Desktop.
Save assada/962ff0e6e6fc9a0a803a4e2432d30932 to your computer and use it in GitHub Desktop.
SpiceDB broken json response
curl --location 'http://localhost:8443/v1/relationships/read' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer foobar' \
--data '{
"consistency": {
"minimizeLatency": true
},
"relationshipFilter": {
"resourceType": "document_template",
"resourceId": "1"
}
}'
{
"result": {
"readAt": {
"token": "GgYKBENMOEc="
},
"relationship": {
"resource": {
"objectType": "document_template",
"objectId": "1"
},
"relation": "viewer",
"subject": {
"object": {
"objectType": "user",
"objectId": "1"
},
"optionalRelation": ""
},
"optionalCaveat": null
},
"afterResultCursor": {
"token": "CjsKBENMOEcSIWRvY3VtZW50X3RlbXBsYXRlOjEjdmlld2VyQHVzZXI6MRoQNjFkZTg1YTZhZmQ2OTk0Zg=="
}
}
}
{
"result": {
"readAt": {
"token": "GgYKBENMOEc="
},
"relationship": {
"resource": {
"objectType": "document_template",
"objectId": "1"
},
"relation": "writer",
"subject": {
"object": {
"objectType": "user",
"objectId": "2"
},
"optionalRelation": ""
},
"optionalCaveat": null
},
"afterResultCursor": {
"token": "CjsKBENMOEcSIWRvY3VtZW50X3RlbXBsYXRlOjEjd3JpdGVyQHVzZXI6MhoQNjFkZTg1YTZhZmQ2OTk0Zg=="
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment