Index
This endpoint allows the user to query their CredentialRecords index
25
true
newestFirst
Possible values: true
Successful response
Invalid input data
Authorization not provided
Insufficient access
Internal server error
POST /api/index/get HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 140
{
"limit": 25,
"cursor": "text",
"query": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"encrypt": true,
"sort": "newestFirst",
"includeAssociatedDids": true
}
{
"cursor": "text",
"hasMore": true,
"records": [
{
"encryptedRecord": {
"protected": "text",
"iv": "text",
"ciphertext": "text",
"tag": "text",
"aad": "text",
"recipients": [
{
"header": {
"alg": "text",
"iv": "text",
"tag": "text",
"epk": {
"kty": "text",
"crv": "text",
"x": "text",
"y": "text",
"n": "text",
"d": "text"
},
"kid": "text",
"apv": "text",
"apu": "text"
},
"encrypted_key": "text"
}
]
},
"fields": [
"text"
],
"id": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
}
This endpoint allows the user to see how many records they have in their index for a query
true
true
Successful response
Invalid input data
Authorization not provided
Insufficient access
Internal server error
POST /api/index/count HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 92
{
"query": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"encrypt": true,
"includeAssociatedDids": true
}
1
This endpoint adds a CredentialRecord to the user's index
Successful response
Invalid input data
Authorization not provided
Insufficient access
Internal server error
POST /api/index/add HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 370
{
"record": {
"encryptedRecord": {
"protected": "text",
"iv": "text",
"ciphertext": "text",
"tag": "text",
"aad": "text",
"recipients": [
{
"header": {
"alg": "text",
"iv": "text",
"tag": "text",
"epk": {
"kty": "text",
"crv": "text",
"x": "text",
"y": "text",
"n": "text",
"d": "text"
},
"kid": "text",
"apv": "text",
"apu": "text"
},
"encrypted_key": "text"
}
]
},
"fields": [
"text"
],
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
true
This endpoint adds multiple CredentialRecords to the user's index
Successful response
Invalid input data
Authorization not provided
Insufficient access
Internal server error
POST /api/index/addMany HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 373
{
"records": [
{
"encryptedRecord": {
"protected": "text",
"iv": "text",
"ciphertext": "text",
"tag": "text",
"aad": "text",
"recipients": [
{
"header": {
"alg": "text",
"iv": "text",
"tag": "text",
"epk": {
"kty": "text",
"crv": "text",
"x": "text",
"y": "text",
"n": "text",
"d": "text"
},
"kid": "text",
"apv": "text",
"apu": "text"
},
"encrypted_key": "text"
}
]
},
"fields": [
"text"
],
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
}
true
This endpoint deletes a CredentialRecord
Successful response
Invalid input data
Authorization not provided
Insufficient access
Not found
Internal server error
DELETE /api/index/{id} HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
true
This endpoint updates a CredentialRecord
Successful response
Invalid input data
Authorization not provided
Insufficient access
Not found
Internal server error
PATCH /api/index/{id} HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 383
{
"updates": {
"encryptedRecord": {
"protected": "text",
"iv": "text",
"ciphertext": "text",
"tag": "text",
"aad": "text",
"recipients": [
{
"header": {
"alg": "text",
"iv": "text",
"tag": "text",
"epk": {
"kty": "text",
"crv": "text",
"x": "text",
"y": "text",
"n": "text",
"d": "text"
},
"kid": "text",
"apv": "text",
"apu": "text"
},
"encrypted_key": "text"
}
]
},
"fields": [
"text"
],
"id": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
true
This endpoint deletes all CredentialRecords
Successful response
Authorization not provided
Insufficient access
Internal server error
DELETE /api/index HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
true
Was this helpful?