vc-api icon indicating copy to clipboard operation
vc-api copied to clipboard

Response body for POST /credentials/status

Open OR13 opened this issue 4 years ago • 3 comments

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;

OR13 avatar Mar 05 '21 19:03 OR13

Here is a postman test confirming this behavior: https://github.com/w3c-ccg/traceability-interop/pull/84

OR13 avatar Feb 08 '22 21:02 OR13

No feedback on issue, tagging as evidence revocation is poorly understood / implemented and should be removed.

OR13 avatar Mar 21 '22 13:03 OR13

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.

msporny avatar Oct 11 '22 19:10 msporny

PR #389 has been merged, which addresses this issue. Closing.

msporny avatar Jun 18 '24 19:06 msporny