BLOBs

This page covers configuration and management of View blobs objects.

Object Overview

BLOBs, or binary large objects, are unstructured data containers managed and accessible through a key-value store-like interface within View.

Endpoint, URL, and Supported Methods

Objects are managed via the Configuration server API at [http|https]://[hostname]:[port]/v1.0/tenants/[tenant-guid]/blobs

Supported methods include: GET HEAD PUT DELETE

Structure

Objects have the following structure:

{
    "GUID": "c3c8b73d-859b-48a2-bfaf-511e83423585",
    "TenantGUID": "00000000-0000-0000-0000-000000000000",
    "ContentType": "application/json",
    "Name": "botox",
    "Description": "My botox AI assistant",
    "Url": "./blobs/degault",
    "Length": 1276,
    "RefObjType": "assistant_config",
    "RefObjGUID": "[default]",
    "IsPublic": false,
    "MD5Hash": "851F017BDA502D5289FB9CC0E329F4",
    "SHA1Hash": "DC0E2BB71821F82DF10EBD8D135F9487BAAC9E",
    "SHA256Hash": "E27C697760B5C434079F0F82D52AFD3DBBFFC33B19453B2F10A3C736DC1D",
    "CreatedUtc": "2025-03-25T21:32:33.971195Z"
}
  • GUID GUID globally unique identifier for the object
  • TenantGUID GUID globally unique identifier for the tenant
  • ContentType string Content type for blob
  • Name string name of the object
  • Description string description of the object
  • Url string URL for the blob
  • RefObjType string Ref Object Type
  • IsPublic booleab Is public
  • MD5Hash stringMD5 hash format string
  • SHA1Hash string SHA1 hash format string
  • SHA256Hash string SHA256 hash format string
  • CreatedUtc datetime timestamp from creation, in UTC time

Create

To create, call PUT /v1.0/tenants/[tenant-guid]/blobs with the following properties using the Configuration server

curl --location --request PUT 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/blobs' \
--header 'content-type: application/json' \
--header 'Authorization: ••••••' \
--data '{
    "ContentType": "text/plain",
    "Name": "helloworld.txt",
    "Description": "A text file containing '\''Hello, world!'\''",
    "RefObjType": "[usermanaged]",
    "RefObjGUID": "[usermanaged]",
    "Data": "SGVsbG8sIHdvcmxkIQ=="
}'
import { ViewConfigurationSdk } from "view-sdk";

const api = new ViewConfigurationSdk(
  "http://localhost:8000/", //endpoint
  "default", //tenant Id
  "default" //access key
);

const createBlob = async () => {
  try {
    const response = await api.Blob.create({
      ContentType: "text/plain",
      Name: "helloworld.txt",
      Description: "A text file containing 'Hello, world!'",
      RefObjType: "[usermanaged]",
      RefObjGUID: "[usermanaged]",
      Data: "SGVsbG8sIHdvcmxkIQ==",
    });
    console.log(response, "Blob created successfully");
  } catch (err) {
    console.log("Error creating blob:", err);
  }
};

createBlob();
import view_sdk
from view_sdk import configuration

sdk = view_sdk.configure( access_key="default",base_url="localhost", tenant_guid= "00000000-0000-0000-0000-000000000000")

def createBlob():
    blob = configuration.Blob.create(
        ContentType="text/plain",
        Name="helloworld.txt",
        Description="A text file containing 'Hello, world!'",
        RefObjType="[usermanaged]",
        RefObjGUID="[usermanaged]",
        Data="SGVsbG8sIHdvcmxkIQ=="
    )
    print(blob)

createBlob()

Enumerate

Enumerate objects by using GET /v2.0/tenants/[tenant-guid]/blobs

curl --location 'http://view.homedns.org:8000/v2.0/tenants/00000000-0000-0000-0000-000000000000/blobs' \
--header 'Authorization: ••••••'
import { ViewConfigurationSdk } from "view-sdk";

const api = new ViewConfigurationSdk(
  "http://localhost:8000/", //endpoint
  "default", //tenant Id
  "default" //access key
);


const enumerateBlobs = async () => {
  try {
    const response = await api.Blob.enumerate();
    console.log(response, "Blobs fetched successfully");
  } catch (err) {
    console.log("Error fetching Blobs:", err);
  }
};

enumerateBlobs();
import view_sdk
from view_sdk import configuration

sdk = view_sdk.configure( access_key="default",base_url="localhost", tenant_guid= "00000000-0000-0000-0000-000000000000")

def enumerateBlobs():
    blobs = configuration.Blob.enumerate()
    print(blobs)

enumerateBlobs()

Read

To read an object by GUID, call GET /v1.0/tenants/[tenant-guid]/blobs/[blob-guid]. If the object exists, it will be returned as a JSON object in the response body. If it does not exist, a 404 will be returned with a NotFound error response.

curl --location 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/blobs/00000000-0000-0000-0000-000000000000' \
--header 'Authorization: ••••••'
import { ViewConfigurationSdk } from "view-sdk";

const api = new ViewConfigurationSdk(
  "http://localhost:8000/", //endpoint
  "default", //tenant Id
  "default" //access key
);
const readBlob = async () => {
  try {
    const response = await api.Blob.read(
      "431638f9-1da1-4dd2-b6de-e88acf990c8c"
    );
    console.log(response, "Blob read successfully");
  } catch (err) {
    console.log("Error reading Blob:", err);
  }
};

readBlob();
import view_sdk
from view_sdk import configuration

sdk = view_sdk.configure( access_key="default",base_url="localhost", tenant_guid= "00000000-0000-0000-0000-000000000000")

def readBlob():
    blob = configuration.Blob.retrieve("b1a953d8-2a51-496a-a272-52ebe326fd2d")
    print(blob)

readBlob()

Read with data

curl --location 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/blobs/00000000-0000-0000-0000-000000000000?incldata=null' \
--header 'Authorization: ••••••'
import { ViewConfigurationSdk } from "view-sdk";

const api = new ViewConfigurationSdk(
  "http://localhost:8000/", //endpoint
  "default", //tenant Id
  "default" //access key
);

const readBlobWithData = async () => {
  try {
    const response = await api.Blob.readIncludeData(
      "431638f9-1da1-4dd2-b6de-e88acf990c8c"
    );
    console.log(response, "Blob read successfully");
  } catch (err) {
    console.log("Error reading Blob:", err);
  }
};

readBlobWithData();
import view_sdk
from view_sdk import configuration

sdk = view_sdk.configure( access_key="default",base_url="localhost", tenant_guid= "00000000-0000-0000-0000-000000000000")

def readBlob():
    blob = configuration.Blob.retrieve("b1a953d8-2a51-496a-a272-52ebe326fd2d",True)
    print(blob)

readBlob()

Read all

o read all objects, call GET /v1.0/tenants/[tenant-guid]/blobs/. If the object exists, it will be returned as an array of JSON object in the response body

curl --location 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/blobs' \
--header 'Authorization: ••••••'
import { ViewConfigurationSdk } from "view-sdk";

const api = new ViewConfigurationSdk(
  "http://localhost:8000/", //endpoint
  "default", //tenant Id
  "default" //access key
);

const readAllBlobs = async () => {
  try {
    const response = await api.Blob.readAll();
    console.log(response, "All blobs fetched successfully");
  } catch (err) {
    console.log("Error fetching All blobs:", err);
  }
};

readAllBlobs();
import view_sdk
from view_sdk import configuration

sdk = view_sdk.configure( access_key="default",base_url="localhost", tenant_guid= "00000000-0000-0000-0000-000000000000")

def readAllBlobs():
    blobs = configuration.Blob.retrieve_all()
    print(blobs)

readAllBlobs()

Update

To update, call PUT /v1.0/tenants/[tenant-guid]/blobs/{blob-guid} with the object properties using the Configuration server

curl --location --request PUT 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/blobs/00000000-0000-0000-0000-000000000000' \
--header 'content-type: application/json' \
--header 'Authorization: ••••••' \
--data '{
    "ContentType": "text/plain",
    "Name": "helloworld.txt",
    "Description": "A text file containing '\''Hello, world, yet again!'\''",
    "RefObjType": "[usermanaged]",
    "RefObjGUID": "[usermanaged]",
    "Data": "SGVsbG8sIHdvcmxkLCB5ZXQgYWdhaW4h"
}'
import { ViewConfigurationSdk } from "view-sdk";

const api = new ViewConfigurationSdk(
  "http://localhost:8000/", //endpoint
  "default", //tenant Id
  "default" //access key
);

const updateBlob = async () => {
  try {
    const response = await api.Blob.update({
      GUID: "7f6eee35-fc32-4798-8ea7-e9e84775043e",
      ContentType: "text/plain",
      Name: "helloworldASH[UPDATED].txt",
      Description: "A text file containing 'Hello, world!'",
      RefObjType: "[usermanaged]",
      RefObjGUID: "[usermanaged]",
      Data: "SGVsbG8sIHdvcmxkIQ==",
    });
    console.log(response, "Blob updated successfully");
  } catch (err) {
    console.log("Error updating Blob:", err);
  }
};

updateBlob();
import view_sdk
from view_sdk import configuration

sdk = view_sdk.configure( access_key="default",base_url="localhost", tenant_guid= "00000000-0000-0000-0000-000000000000")

def updateBlob():
    blob = configuration.Blob.update("b1a953d8-2a51-496a-a272-52ebe326fd2d",
       ContentType="text/plain",
        Name="helloworld_updated.txt",
        Description="A text file containing 'Hello, world!'",
        RefObjType="[usermanaged]",
        RefObjGUID="[usermanaged]",
        Data="SGVsbG8sIHdvcmxkIQ=="
    )
    print(blob)

updateBlob()

Delete

To delete an object by GUID, call DELETE /v1.0/tenants/[tenant-guid]/blobs/[blob-guid].

curl --location --request DELETE 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/blobs/00000000-0000-0000-0000-000000000000' \
--header 'Authorization: ••••••' \
import { ViewConfigurationSdk } from "view-sdk";

const api = new ViewConfigurationSdk(
  "http://localhost:8000/", //endpoint
  "default", //tenant Id
  "default" //access key
);
const deleteBlob = async () => {
  try {
    const response = await api.Blob.delete(
      "7f6eee35-fc32-4798-8ea7-e9e84775043e"
    );
    console.log(response, "Blob deleted successfully");
  } catch (err) {
    console.log("Error deleting Blob:", err);
  }
};

deleteBlob();
import view_sdk
from view_sdk import configuration

sdk = view_sdk.configure( access_key="default",base_url="localhost", tenant_guid= "00000000-0000-0000-0000-000000000000")

def deleteBlob():
    blob = configuration.Blob.delete("b1a953d8-2a51-496a-a272-52ebe326fd2d")
    print(blob)

deleteBlob()

Check Existence

Note: the HEAD method can be used as an alternative to get to simply check the existence of the object. HEAD requests return either a 200/OK in the event the object exists, or a 404/Not Found if not. No response body is returned with a HEAD request.

curl --location --head 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/blobs/00000000-0000-0000-0000-000000000000' \
--header 'Authorization: ••••••'
import { ViewConfigurationSdk } from "view-sdk";

const api = new ViewConfigurationSdk(
  "http://localhost:8000/", //endpoint
  "default", //tenant Id
  "default" //access key
);

const blobExists = async () => {
  try {
    const response = await api.Blob.exists(
      "431638f9-1da1-4dd2-b6de-e88acf990c8c"
    );
    console.log(response, "Blob exists");
  } catch (err) {
    console.log("Error checking Blob:", err);
  }
};

blobExists();
import view_sdk
from view_sdk import configuration

sdk = view_sdk.configure( access_key="default",base_url="localhost", tenant_guid= "00000000-0000-0000-0000-000000000000")

def existsBlob():
    blob = configuration.Blob.exists("b1a953d8-2a51-496a-a272-52ebe326fd2d")
    print(blob)

existsBlob()