Revoke a Credential

To revoke an existing VC (Verifiable Credential) or an entity, we need to make the following HTTP request

This revokes an existing verifiable credential

POST /api/v1/{entity-type}/{id}/revoke

The API revokes a verifiable credential by updating the signature data attached to it. This is done by updating the _osSignedData field in the corresponding entity table to an Empty String. and storing the signedData in the RevokedCredential Registry.

Path Parameters

Headers

Request Body

{
    "id": "sunbird-rc.utils.revoke",
    "ver": "1.0",
    "ets": 1687421017075,
    "params": {
        "resmsgid": "",
        "msgid": "bbd1e0b7-aab4-4e91-988b-c832e9031bef",
        "err": "",
        "status": "SUCCESSFUL",
        "errmsg": ""
    },
    "responseCode": "OK"
}

Usage

cURL

curl --location \
	--request POST \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	'{registry-url}/api/v1/{entity-type}/{id}/revoke' \

HTTPie

http POST \
	'{registry_url}/api/v1/{entity-type}/{id}/revoke' \
	'content-type: application/json' \
	'authorization: Bearer {access-token}'
	

{registry-url} is usually http://localhost:{port}. The port can be found under the registry section in the docker-compose.yml file and is usually 8081.

Last updated