light-mode-image
Learn
Credential configurationAPI Reference

CWT Credentials

Create a CWT Credential configuration

POST/v2/credentials/compact/configurations

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

The credential configuration payload

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v2/credentials/compact/configurations" \  -H "Content-Type: application/json" \  -d '{    "claimMappings": {      "property1": {},      "property2": {}    }  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "type": "string",  "claimMappings": {    "property1": {      "mapFrom": "string",      "required": true,      "defaultValue": "string"    },    "property2": {      "mapFrom": "string",      "required": true,      "defaultValue": "string"    }  },  "revocable": true,  "claimSourceId": "78e1b90c-401d-45bb-89c0-938da4d44c60",  "expiresIn": {    "years": 0,    "months": 0,    "weeks": 0,    "days": 0,    "hours": 0,    "minutes": 0,    "seconds": 0  }}

Retrieve all CWT Credential configurations

GET/v2/credentials/compact/configurations

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

limit?number

Range size of returned list.

Range1 <= value <= 1000
Default100
cursor?string

Starting point for the list of entries.

type?string

The optional credential type to filter on

Response Body

application/json

application/json

curl -X GET "https://example.com/v2/credentials/compact/configurations"
{  "nextCursor": "string",  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "type": "string",      "claimMappings": {        "property1": {          "mapFrom": "string",          "required": true,          "defaultValue": "string"        },        "property2": {          "mapFrom": "string",          "required": true,          "defaultValue": "string"        }      },      "revocable": true,      "claimSourceId": "78e1b90c-401d-45bb-89c0-938da4d44c60",      "expiresIn": {        "years": 0,        "months": 0,        "weeks": 0,        "days": 0,        "hours": 0,        "minutes": 0,        "seconds": 0      }    }  ]}

Retrieve a CWT Credential configuration

GET/v2/credentials/compact/configurations/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Unique identifier for the CWT credential configuration.

Formatuuid

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v2/credentials/compact/configurations/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "type": "string",  "claimMappings": {    "property1": {      "mapFrom": "string",      "required": true,      "defaultValue": "string"    },    "property2": {      "mapFrom": "string",      "required": true,      "defaultValue": "string"    }  },  "revocable": true,  "claimSourceId": "78e1b90c-401d-45bb-89c0-938da4d44c60",  "expiresIn": {    "years": 0,    "months": 0,    "weeks": 0,    "days": 0,    "hours": 0,    "minutes": 0,    "seconds": 0  }}

Update a CWT Credential configuration

PUT/v2/credentials/compact/configurations/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Unique identifier for the CWT credential configuration.

Formatuuid

Request Body

application/json

Update a CWT credential configuration

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X PUT "https://example.com/v2/credentials/compact/configurations/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "claimMappings": {      "property1": {},      "property2": {}    }  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "type": "string",  "claimMappings": {    "property1": {      "mapFrom": "string",      "required": true,      "defaultValue": "string"    },    "property2": {      "mapFrom": "string",      "required": true,      "defaultValue": "string"    }  },  "revocable": true,  "claimSourceId": "78e1b90c-401d-45bb-89c0-938da4d44c60",  "expiresIn": {    "years": 0,    "months": 0,    "weeks": 0,    "days": 0,    "hours": 0,    "minutes": 0,    "seconds": 0  }}

Delete a CWT Credential configuration

DELETE/v2/credentials/compact/configurations/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Unique identifier for the CWT credential configuration.

Formatuuid

Response Body

application/json

application/json

curl -X DELETE "https://example.com/v2/credentials/compact/configurations/497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty

How would you rate this page?

Last updated on

On this page