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

Custom Storage

PreviousUserNextUtilities

Was this helpful?

๐Ÿ› ๏ธ
  • POSTCreate a document in custom storage
  • POSTCreate a document in custom storage
  • POSTRead custom documents from storage
  • POSTCount custom documents from storage
  • POSTUpdate custom documents in storage
  • POSTDelete custom documents in storage

Create a document in custom storage

post

This endpoint allows the user to create a document in their custom store.

Authorizations
Body
itemany ofRequired
or
Responses
200
Successful response
application/json
Responseboolean
default
Error response
application/json
post
POST /api/custom-storage/create HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 368

{
  "item": {
    "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

Create a document in custom storage

post

This endpoint allows the user to create a document in their custom store.

Authorizations
Body
itemsany ofRequired
or
Responses
200
Successful response
application/json
Responseboolean
default
Error response
application/json
post
POST /api/custom-storage/create-many HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 371

{
  "items": [
    {
      "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

Read custom documents from storage

post

This endpoint allows the user to query for documents in their custom store.

Authorizations
Body
limitnumberOptionalDefault: 25
cursorstringOptional
queryany ofOptional
or
encryptbooleanOptionalDefault: true
includeAssociatedDidsbooleanOptionalDefault: true
Responses
200
Successful response
application/json
Responseany of
or
default
Error response
application/json
post
POST /api/custom-storage/read HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 119

{
  "limit": 25,
  "cursor": "text",
  "query": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "encrypt": true,
  "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"
      ],
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  ]
}

Count custom documents from storage

post

This endpoint allows the user to count documents in their custom store.

Authorizations
Body
queryany ofOptional
anyOptional
or
includeAssociatedDidsbooleanOptionalDefault: true
Responses
200
Successful response
application/json
Responsenumber
default
Error response
application/json
post
POST /api/custom-storage/count HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 43

{
  "query": null,
  "includeAssociatedDids": true
}
1

Update custom documents in storage

post

This endpoint allows the user to update documents in their custom store.

Authorizations
Body
queryany ofOptional
anyOptional
or
updateany ofRequired
or
includeAssociatedDidsbooleanOptionalDefault: true
Responses
200
Successful response
application/json
Responsenumber
default
Error response
application/json
post
POST /api/custom-storage/update HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 412

{
  "query": null,
  "update": {
    "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"
  },
  "includeAssociatedDids": true
}
1

Delete custom documents in storage

post

This endpoint allows the user to delete documents in their custom store.

Authorizations
Body
queryany ofOptional
anyOptional
or
includeAssociatedDidsbooleanOptionalDefault: true
Responses
200
Successful response
application/json
Responseany of
numberOptional
or
boolean ยท enumOptionalPossible values:
default
Error response
application/json
post
POST /api/custom-storage/delete HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 43

{
  "query": null,
  "includeAssociatedDids": true
}
1