Voedger Internals
  • Introduction
  • 💡Concepts
    • Event Sourcing & CQRS
    • Editions (deprecated)
      • Community Edition
      • Standart Edition
      • Standart Edition (v1)
  • 🚀Server
    • Overview (Server)
    • Design
      • Query Processor
      • API Gateway implementation
      • N1 Cluster
      • N3 Cluster
      • N5 Cluster
      • Orchestration
      • Sequences
      • Packages overview
        • sys
        • registry
    • Features
      • API Gateway
        • API v2
          • Conventions
            • API URL
            • HTTP methods and processors
            • Naming conventions
            • Query constraints
            • Error handling
          • Documents and records
            • Create document or record
            • Update document or record
            • Deactivate document or record
            • Read document or record
            • Read from CDoc collection
          • Queries
            • Read from query
          • Views
            • Read from view
          • Commands
            • Execute command
          • BLOBs
            • Create BLOB
            • Read BLOB
          • Temporary BLOBs
            • Create temporary BLOB
            • Read temporary BLOB
          • Schemas
            • List app workspaces
            • List workspace roles
            • Read workspace role schema
        • API v1
          • API Conventions
          • BLOBs
      • Admin Endpoint
      • Clusters
        • Bootstrap
        • Monitoring
        • Secure prometheus and grafana
        • Alerting
        • Maintenance
          • SELECT, UPDATE
      • VVMs
      • Applications
        • Deploy Application
        • Sidecar Applications
      • AuthNZ
        • Issue Principal Token
        • Refresh Principal Token
        • Enrich Principal Token
        • ACL Rules
        • Global Roles
      • Data types
        • Core types
        • Small integers
        • Uniques With Multiple Fields
        • Verifiable Fields
      • Workspaces
        • Create Workspace
        • Deactivate Workspace
        • See also (Workspaces)
      • Invites
        • Invite to Workspace
        • Join Workspace
        • Leave Workspace
        • Cancel sent Invite
        • Cancel accepted Invite
        • Update Invite roles
      • Users
        • Create a new user
        • Change user password
        • Send Email
        • Reset password
        • Change Email
      • Notifications
        • Heartbeats
      • Devices
        • Create a new device
        • Join device to workspace
      • Jobs
      • DMBS Drivers
        • AmazonDB Driver
      • Frozen
        • Ephemeral Storage
        • Storage Extensions
  • 🛠️Framework
    • Overview (Framework)
    • Features
      • vpm
      • vpm init
      • vpm tidy
      • vpm baseline
      • vpm orm
      • vpm build
      • API for testing
  • Development
    • Requirements Management
    • Requirements Management (Overview)
Powered by GitBook
On this page
  • Motivation
  • Functional design
  • Headers
  • Parameters
  • Body
  • Result
  • Perimssions
  • Technical design
  • Components

Was this helpful?

Edit on GitHub
  1. 🚀Server
  2. Features
  3. API Gateway
  4. API v2
  5. BLOBs

Create BLOB

Motivation

Creates a new BLOB with the uploaded binary data

Functional design

  • POST /api/v2/apps/{owner}/{app}/workspaces/{wsid}/docs/{pkg}.{table}/blobs/{fieldName} Creates a new BLOB with the uploaded binary data. The ID of the BLOB is returned in the response and can be used to write the BLOB to specified field of a document or record when creating or updating record.

Headers

Key
Value

Authorization

Bearer {PrincipalToken}

Content-Type

BLOB content type

Blob-Name

BLOB name, optional

Parameters

Parameter
Type
Description

owner

string

name of a user who owns the application

app

string

name of an application

wsid

int64

the ID of workspace

pkg, table

string

identifies a table (document or record)

fieldName

string

name of the field in document which should keep the BLOB

Body

BLOB data.

Result

Code
Description
Body

201

Created

blob ID, see example below

400

Bad Request

401

Unauthorized

403

Forbidden

413

Payload Too Large

415

Unsupported Media Type

429

Too Many Requests

500

Internal Server Error

503

Service Unavailable

Example response 201:

{
    "BlobID": 123456789, 
}

Perimssions

  • Execution of this function is granted to role sys.BLOBUploader which is by default granted to sys.WorkspaceOwner.

Technical design

Components

  • ~cmp.sysBlobOwnerRecord~❓ extend pkg/sys/Workspace/wdoc.sys.BLOB with new fields:

    • OwnerRecord qname NOT NULL

    • OwnerRecordField varchar NOT NULL

    • OwnerRecordID ref

  • pkg/router

    • ~cmp.routerBlobsCreatePathHandler~ ❓: Create BLOB path handler

  • pkg/sys/it

    • ~it.TestBlobsCreate~: integration test for creating BLOBs

PreviousBLOBsNextRead BLOB

Last updated 6 days ago

Was this helpful?

error object
error object
error object
error object
error object
error object
error object
error object