vc-api
vc-api copied to clipboard
Response body for POST /credentials/status
What is it supposed to be?
I assume the updated revocation list credential.
probably the request payload should take a number instead of as string as well:
POST https://vc.example/credentials/status
{
"credentialId": "https://vc.example/credentials/aabe7aca-e4aa-4e1f-b08c-a86dddc5b0c3",
"credentialStatus": [
{
"type": "RevocationList2020Status",
"status": "1"
}
]
}
for example:
let revoked = credentialStatus[0].status === "1" ? true : false;
Here is a postman test confirming this behavior: https://github.com/w3c-ccg/traceability-interop/pull/84
No feedback on issue, tagging as evidence revocation is poorly understood / implemented and should be removed.
This was discussed on the 2022-10-11 telecon. @dlongley noted that Digital Bazaar's implementation currently provides a status code, with an empty body. If there is an error, there is an error that's returned in the standard error format. StatusList2021 could return back the updated credential, but it might be advantageous to not do that (people might want implementations that update that in a background process). We might want to hear if clients need the updated value or whether or not that's necessary. If it's not necessary, we might not want response value. The question was asked if anyone thought we should be returning anything in the body of if just a status code was enough. Positive is 200, negative is 400 which should include error (if possible).
Pull request should update the POST /credentials/status endpoint such that a positive modification provides a 2xx status code with no content in the response body and a failure returns a 4xx or 5xx with the error included in the response body.
PR #389 has been merged, which addresses this issue. Closing.