Index

Get CredentialRecords index

post

This endpoint allows the user to query their CredentialRecords index

Authorizations
Body
limitnumberOptionalDefault: 25
cursorstringOptional
queryany ofOptional
or
encryptbooleanOptionalDefault: true
sortstring · enumOptionalDefault: newestFirstPossible values:
includeAssociatedDidsbooleanOptionalDefault: true
Responses
200
Successful response
application/json
Responseany of
or
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"
    }
  ]
}

Count records in index for query

post

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
or
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

Add to index

post

This endpoint adds a CredentialRecord to the user's index

Authorizations
Body
recordany ofRequired
or
Responses
200
Successful response
application/json
Responseboolean
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

Add many to index

post

This endpoint adds multiple CredentialRecords to the user's index

Authorizations
Body
recordsany ofRequired
or
Responses
200
Successful response
application/json
Responseboolean
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

Deletes a CredentialRecord

delete

This endpoint deletes a CredentialRecord

Authorizations
Path parameters
idstringRequired
Responses
200
Successful response
application/json
Responseboolean
delete
DELETE /api/index/{id} HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
true

Update a CredentialRecord

patch

This endpoint updates a CredentialRecord

Authorizations
Path parameters
idstringRequired
Body
updatesany ofRequired
or
Responses
200
Successful response
application/json
Responseboolean
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

Deletes all CredentialRecords

delete

This endpoint deletes all CredentialRecords

Authorizations
Responses
200
Successful response
application/json
Responseboolean
delete
DELETE /api/index HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
true

Was this helpful?