From e01f702c602fccbd8d45c9e7e7528a58ea7f3811 Mon Sep 17 00:00:00 2001 From: Kayode Ezike Date: Wed, 24 Apr 2024 10:05:38 -0400 Subject: [PATCH] adds sample curl request for status update --- README.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 3c6c72e..0c61290 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ IMPORTANT NOTE ABOUT VERSIONING: If you are using a Docker Hub image of this rep - [DID Registries](#did-registries) - [Usage](#usage) - [Allocate Status Position](#allocate-status-position) - - [Revocation and suspension](#revocation-and-suspension) + - [Revocation and Suspension](#revocation-and-suspension) - [Versioning](#versioning) - [Logging](#logging) - [Log Levels](#log-levels) @@ -205,19 +205,21 @@ Now, your next step would be to sign this Verifiable Credential. You could pass NOTE: cURL can get a bit clunky if you want to experiment more (e.g., by changing what goes into the VC before signing), so you might consider trying [Postman](https://www.postman.com/downloads) which makes it easier to construct and send HTTP calls. -### Revocation and suspension +### Revocation and Suspension -Revocation and suspension are fully explained in the [Bitstring Status List](https://www.w3.org/TR/vc-bitstring-status-list/) specification and our implemenations thereof, but effectively, it amounts to POSTing an object to the revocation endpoint, like so: +Revocation and suspension are fully explained in the [Bitstring Status List](https://www.w3.org/TR/vc-bitstring-status-list/) specification and our implemenations thereof, but effectively, it amounts to POSTing an object containing the credential ID and the desired status update to the `/credentials/status` endpoint. For example: -```json -{ +```bash +curl --location 'http://localhost:4008/credentials/status' \ +--header 'Content-Type: application/json' \ +--data-raw '{ "credentialId": "urn:uuid:951b475e-b795-43bc-ba8f-a2d01efd2eb1", - "credentialStatus": [{ "type": "BitstringStatusListCredential", "status": "revoked" }] + "credentialStatus": [ + { "type": "BitstringStatusListCredential", "status": "revoked" } + ] } ``` -Fundamentally, you are just posting up the ID of the credential. - ## Versioning `status-service-git` is primarily intended to run as a Docker image within a Docker Compose network, typically as part of a flow that is orchestrated by the [DCC Issuer Coordinator](https://github.com/digitalcredentials/issuer-coordinator) and the [DCC Workflow Coordinator](https://github.com/digitalcredentials/workflow-coordinator).