LearnCard Documentation
GithubStatusSupportLaunch App
  • 🚀Introduction
    • What is LearnCard?
    • Use Cases & Possibilities
    • Ecosystem Architecture
  • ⚡Quick Start
    • Setup & Prerequisites
    • Your First Integration
  • 📚Tutorials
    • Create a Credential
    • Create a Boost
    • Create a ConsentFlow
    • Create a Connected Website
    • Send xAPI Statements
    • Listen to Webhooks
  • ✅How-To Guides
    • Verify My Issuer
    • Connect Systems
      • Connect a Website
      • Connect a Game
    • Implement Flows
      • Claim Data after Guardian Consent
      • Connect via CHAPI
        • ⭐CHAPI Wallet Setup Guide
        • ↔️Translating to CHAPI documentation
        • 🖥️Demo Application
        • 🔰Using LearnCard to Interact with a CHAPI Wallet
        • 📝Cheat Sheets
          • Issuers
          • Wallets
    • Deploy Infrastructure
      • Remote Key Management
      • Generate API Tokens
      • Signing Authority
      • Connect to Independent Network
      • Build a Plugin
  • 🛠️SDKs & API Reference
    • LearnCard Wallet SDK
      • Authentication
      • Usage Examples
      • SDK Reference
      • Plugin API Reference
      • Integration Strategies
      • Deployment
      • Troubleshooting
      • Changelog
    • LearnCloud Network API
      • Authentication
      • Usage Examples
      • Architecture
      • Notifications & Webhooks
      • Profiles
      • Profile Managers
      • Credentials
      • Boosts
      • Presentations
      • Storage
      • Contracts
      • DID Metadata
      • Claim Hooks
      • Auth Grants
      • Utilities
      • Models
      • OpenAPI
    • LearnCloud Storage API
      • Authentication
      • Usage Examples
      • Architecture
      • Storage
      • Index
      • User
      • Custom Storage
      • Utilities
      • Models
      • xAPI Reference
    • Plugins
      • Crypto
      • DIDKit
      • DID Key
      • Dynamic Loader
      • VC
        • Expiration Sub-Plugin
      • VC-Templates
      • VC-API
      • Ceramic
      • IDX
      • VPQR
      • Ethereum
      • CHAPI
      • LearnCard Network
      • LearnCloud
      • LearnCard
      • Simple Signing
      • Claimable Boosts
    • LearnCard CLI
  • 🧠Core Concepts
    • Identities & Keys
      • Decentralized Identifiers (DIDs)
      • Seed Phrases
      • Network Profiles
      • Signing Authorities
      • Trust Registries
    • Credentials & Data
      • Verifiable Credentials (VCs)
      • Credential Lifecycle
      • Schemas, Types, & Categories
      • Building Verifiable Credentials
      • Boost Credentials
      • Getting Started with Boosts
      • Credential URIs
      • xAPI Data
      • General Best Practices & Troubleshooting
    • Consent & Permissions
      • ConsentFlow Overview
      • Consent Contracts
      • User Consent & Terms
      • Consent Transactions
      • Auto-Boosts
      • Writing Consented Data
      • Accessing Consented Data
      • GameFlow Overview
    • Network & Interactions
      • Network Vision & Principles
      • Key Network Procedures
      • Core Interaction Workflows
    • Architecture & Principles
      • Control Planes
      • Plugin System
      • Auth Grants and API Tokens
  • 🔗Development
    • Contributing
Powered by GitBook
On this page

Was this helpful?

  1. SDKs & API Reference
  2. LearnCloud Storage API

Index

PreviousStorageNextUser

Was this helpful?

🛠️

Deletes a CredentialRecord

delete

This endpoint deletes a CredentialRecord

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

Deletes all CredentialRecords

delete

This endpoint deletes all CredentialRecords

Authorizations
Responses
200
Successful response
application/json
Responseboolean
default
Error response
application/json
delete
DELETE /api/index HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
true
  • POSTGet CredentialRecords index
  • POSTCount records in index for query
  • POSTAdd to index
  • POSTAdd many to index
  • DELETEDeletes a CredentialRecord
  • PATCHUpdate a CredentialRecord
  • DELETEDeletes all CredentialRecords

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
default
Error response
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"
    }
  ]
}

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
default
Error response
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

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
default
Error response
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

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
default
Error response
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

Update a CredentialRecord

patch

This endpoint updates a CredentialRecord

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