Credentials management
The following functions are available for credentials management:
List - lists the available credentials
List compact - lists credential ids
Load - loads a credential by id
Store - store a credential
Delete - delete a credential by id
Present - create a verifiable presentation from specific credentials
Present stored - create a verifiable presentation from specific stored credential ids
List credentials
The /credentials endpoint lists the available credentials:
id - query parameter (optional) - the list of credentials ids
curl -X 'GET' \
'https://custodian.ssikit.walt.id/credentials' \
-H 'accept: application/json'No parametersThe list of credentialsE.g. List the the credentials having ids urn:uuid:d36986f1-3cc0-4156-b5a4-6d3deab84270 and urn:uuid:d36986f1-3cc0-4156-b5a4-6d3deab84271
curl -X 'GET' \
'https://custodian.ssikit.walt.id/credentials?id=urn%3Auuid%3Ad36986f1-3cc0-4156-b5a4-6d3deab84270&id=urn%3Auuid%3Ad36986f1-3cc0-4156-b5a4-6d3deab84271' \
-H 'accept: application/json'{
"list":
[
{
"@context":
[
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1"
],
"credentialSubject":
{
"degree":
{
"name": "Bachelor of Science and Arts",
"type": "BachelorDegree"
},
"id": "did:web:my.domain"
},
"id": "urn:uuid:d36986f1-3cc0-4156-b5a4-6d3deab84270",
"issued": "2022-10-07T09:53:41.369913097Z",
"issuer":
{
"id": "did:web:walt.id"
},
"proof":
{
"created": "2022-10-07T09:53:41Z",
"creator": "did:web:walt.id",
"domain": "https://api.preprod.ebsi.eu",
"jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJFZERTQSJ9..7EYkgjNRJ_hh0F5kONnPfrC4PLvg1g82czeANllDngsbk36a8lnHSlwersSqY0tdER4xIe7vbNVzi39C2DZTDQ",
"nonce": "dc2be572-cca4-43dc-9903-0fec1dcf786f",
"type": "Ed25519Signature2018"
},
"validFrom": "2022-10-07T09:53:41.369917079Z",
"issuanceDate": "2022-10-07T09:53:41.369917079Z",
"type":
[
"VerifiableCredential",
"UniversityDegreeCredential"
]
}
]
}List credentials compact
The /credentials/list/credentialIds lists the available credentials ids.
E.g. List the available credentials ids.
Load credential
The /credentials/{id} loads a credential specified by:
id - path parameter (required) - the credential id
E.g. Load the credential having id = urn:uuid:d36986f1-3cc0-4156-b5a4-6d3deab84270.
Store credential
The /credentials/{alias} endpoint stores a verifiable credential by:
alias - path parameter (required) - the credential's id
The body should contain, the VC to be store. If no adjustments are required to VC, then the body can be the VC itself (e.g. the one received from the create VC endpoint).
E.g. Store the UniversityDegree verifiable credential.
Delete credential
The /credentials/{alias} deletes a credential by:
alias - path parameter (required) - the credential's id
E.g. Delete the credential with id = urn:uuid:d36986f1-3cc0-4156-b5a4-6d3deab84270
Present credential
The /credentials/present endpoint creates a verifiable presentation from the specified credentials.
E.g. Create a verifiable presentation from the provided VeriafiableID and OpenBadgeCredential credentials for a holder with did = did:web:my.domain.
Present stored credential
The /credentials/presentIds endpoint creates a verifiable presentation from the specified credential ids.
E.g. Create a verifiable presentation from the stored credential having id = urn:uuid:d36986f1-3cc0-4156-b5a4-6d3deab84270 for the holder with did = did:web:my.domain.
Last updated
Was this helpful?
