Retrieve a CWT credential configuration
Returns a CWT credential configuration by providing its ID.
Roles
Analytics Events
bearerAuthAuthorizationBearer <token>id*stringUnique identifier for the CWT credential configuration.
uuidCWT credential configuration retrieved
application/json- response
id*stringUniquely identifies this credential configuration. Can be used to create an offer based on this credential configuration, or to retrieve, update or remove the credential configuration.
uuidtype*stringUsed to differentiate between different CWT/Semantic CWT credential configurations on your tenant. Thus, its value must:
- Be unique across all CWT/Semantic CWT credential configurations on your tenant.
- Not be VerifiableCredential.
1 <= length <= 1024claimMappings*This is where you specify how to map claims (user attributes) into issued credentials. Each field in the object corresponds to a claim in the issued credential, and contains one or more from the following attributes:
mapFrom: References the path in the user object where the claim is available.- When using a URL as a claims namespace identifier, use bracket notation to access the claim value (e.g.
mapFrom: "claims['https://example.com/claim-name']"). mapFromis optional whendefaultValueis provided, as the latter will be used for all issued credentials. This is referred to as a static claim.
- When using a URL as a claims namespace identifier, use bracket notation to access the claim value (e.g.
defaultValue: Indicates what value is used if required is set tofalse(field is optional) and no value is provided by the claims source. WhendefaultValueis provided,mapFromis optional.required: Indicates whether the claim is required (default:false). When a required claim cannot be retrieved and nodefaultValueis available, credential issuance will fail. Exampleclaimsobject inside theuserobject
{ "claims": { "given_name": "Jamie", "family_name": "Doe", "address": { "formatted": "116-118 Quay Street, Auckland CBD, Auckland 1010" } }, "authenticationProvider": { "subjectId": "6d3aab7d-73af-5f61-b47c-109ef6f7558c", "url": "https://accounts.google.com" }}revocable*booleanWhen set to true (default), the created credential can later be revoked. When set to false, the credential cannot be revoked.
trueclaimSourceId?stringReferences the unique identifier of a claims source that can be used to retrieve claims and include them in the issued credential.
uuidexpiresIn?Used to determine when will issued credentials expire. Can include any combination of years, months, weeks, days, hours, minutes and seconds.
curl -X GET 'https://example.vii.au01.mattr.global/v2/credentials/compact/configurations/3948c40e-6e19-4ffc-933c-91f643f24264'{ "id": "983c0a86-204f-4431-9371-f5a22e506599", "type": "CourseCredential", "claimMappings": { "firstName": { "mapFrom": "claims.given_name", "required": true }, "address": { "mapFrom": "claims.address.formatted" }, "picture": { "mapFrom": "claims.picture", "defaultValue": "http://example.edu/img/placeholder.png" }, "badge": { "defaultValue": "http://example.edu/img/badge.png" }, "providerSubjectId": { "mapFrom": "authenticationProvider.subjectId" } }, "revocable": true, "claimSourceId": "78e1b90c-401d-45bb-89c0-938da4d44c60", "expiresIn": { "years": 1, "months": 12, "weeks": 52, "days": 365, "hours": 24, "minutes": 1440, "seconds": 3600 }}How would you rate this page?