Index
This endpoint allows the user to query their CredentialRecords index
Authorizations
Body
limitnumberOptionalDefault:
25
cursorstringOptional
queryany ofOptional
or
encryptbooleanOptionalDefault:
true
sortstring · enumOptionalDefault:
newestFirst
Possible values: includeAssociatedDidsbooleanOptionalDefault:
true
Responses
200
Successful response
application/json
Responseany of
or
400
Invalid input data
application/json
401
Authorization not provided
application/json
403
Insufficient access
application/json
500
Internal server error
application/json
post
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
Authorizations
Body
queryany ofOptional
or
encryptbooleanOptionalDefault:
true
includeAssociatedDidsbooleanOptionalDefault:
true
Responses
200
Successful response
application/json
Responseany of
integerOptional
400
Invalid input data
application/json
401
Authorization not provided
application/json
403
Insufficient access
application/json
500
Internal server error
application/json
post
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
Authorizations
Body
recordany ofRequired
or
Responses
200
Successful response
application/json
Responseboolean
400
Invalid input data
application/json
401
Authorization not provided
application/json
403
Insufficient access
application/json
500
Internal server error
application/json
post
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
Authorizations
Body
recordsany ofRequired
or
Responses
200
Successful response
application/json
Responseboolean
400
Invalid input data
application/json
401
Authorization not provided
application/json
403
Insufficient access
application/json
500
Internal server error
application/json
post
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
Authorizations
Path parameters
idstringRequired
Responses
200
Successful response
application/json
Responseboolean
400
Invalid input data
application/json
401
Authorization not provided
application/json
403
Insufficient access
application/json
404
Not found
application/json
500
Internal server error
application/json
delete
DELETE /api/index/{id} HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
true
This endpoint updates a CredentialRecord
Authorizations
Path parameters
idstringRequired
Body
updatesany ofRequired
or
Responses
200
Successful response
application/json
Responseboolean
400
Invalid input data
application/json
401
Authorization not provided
application/json
403
Insufficient access
application/json
404
Not found
application/json
500
Internal server error
application/json
patch
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
Authorizations
Responses
200
Successful response
application/json
Responseboolean
401
Authorization not provided
application/json
403
Insufficient access
application/json
500
Internal server error
application/json
delete
DELETE /api/index HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
true
Was this helpful?