API blob - RapturePlatform/Rapture GitHub Wiki

Blob API

The Blob api is used to manipulate large opaque objects that have names (displaynames) like other data but do not have any insight to be gained from their contents from within Rapture. The RESTful API can be used to efficiently download a blob as a stream (or upload it)

createBlobRepo

HttpBlobApi blobApi = new HttpBlobApi(loginApi);
void retVal = blobApi.createBlobRepo(blobRepoUri, config, metaConfig);
retVal = baseAPI.doBlob_CreateBlobRepo(blobRepoUri, config, metaConfig);

Entitlement: /repo/write

Creates a repository for unstructured data.

Function Parameters

Parameter Type Description
blobRepoUri String
config String
metaConfig String

Return value

Type Description
void

getBlobRepoConfig

HttpBlobApi blobApi = new HttpBlobApi(loginApi);
BlobRepoConfig retVal = blobApi.getBlobRepoConfig(blobRepoUri);
retVal = baseAPI.doBlob_GetBlobRepoConfig(blobRepoUri);

Entitlement: /repo/read

Retrieves blob repository information

Function Parameters

Parameter Type Description
blobRepoUri String

Return value

Type Description
BlobRepoConfig
Types used in this function

BlobRepoConfig

Defines a BlobRepository.

Field Type
description String
config String
authority String
metaConfig String

getBlobRepoConfigs

HttpBlobApi blobApi = new HttpBlobApi(loginApi);
List<BlobRepoConfig> retVal = blobApi.getBlobRepoConfigs();
retVal = baseAPI.doBlob_GetBlobRepoConfigs();

Entitlement: /repo/read

Retrieves a collection of objects that contain the configuration information for all the defined blob repositories.

Function Parameters

This function takes no parameters.

Return value

Type Description
List

deleteBlobRepo

HttpBlobApi blobApi = new HttpBlobApi(loginApi);
void retVal = blobApi.deleteBlobRepo(repoUri);
retVal = baseAPI.doBlob_DeleteBlobRepo(repoUri);

Entitlement: /repo/write

This method removes a blob Repository and its data from the Rapture system. There is no undo.

Function Parameters

Parameter Type Description
repoUri String

Return value

Type Description
void

blobRepoExists

HttpBlobApi blobApi = new HttpBlobApi(loginApi);
boolean retVal = blobApi.blobRepoExists(repoUri);
retVal = baseAPI.doBlob_BlobRepoExists(repoUri);

Entitlement: /repo/list

This api call can be used to determine whether a given repo exists.

Function Parameters

Parameter Type Description
repoUri String

Return value

Type Description
boolean

blobExists

HttpBlobApi blobApi = new HttpBlobApi(loginApi);
boolean retVal = blobApi.blobExists(blobUri);
retVal = baseAPI.doBlob_BlobExists(blobUri);

Entitlement: /data/list/$f(blobUri)

This api call can be used to determine whether a given blob exists.

Function Parameters

Parameter Type Description
blobUri String

Return value

Type Description
boolean

addBlobContent

HttpBlobApi blobApi = new HttpBlobApi(loginApi);
void retVal = blobApi.addBlobContent(blobUri, content);
retVal = baseAPI.doBlob_AddBlobContent(blobUri, content);

Entitlement: /data/write/$f(blobUri)

Appends to a blob.

Function Parameters

Parameter Type Description
blobUri String
content byte[]

Return value

Type Description
void

putBlob

HttpBlobApi blobApi = new HttpBlobApi(loginApi);
void retVal = blobApi.putBlob(blobUri, content, contentType);
retVal = baseAPI.doBlob_PutBlob(blobUri, content, contentType);

Entitlement: /data/write/$f(blobUri)

Stores a blob in one hit, assuming a String representation. If append, adds to any content already existing

Function Parameters

Parameter Type Description
blobUri String
content byte[]
contentType String

Return value

Type Description
void

getBlob

HttpBlobApi blobApi = new HttpBlobApi(loginApi);
BlobContainer retVal = blobApi.getBlob(blobUri);
retVal = baseAPI.doBlob_GetBlob(blobUri);

Entitlement: /data/read/$f(blobUri)

Retrieves a blob and its metadata. The blob is represented as a byte array.

Function Parameters

Parameter Type Description
blobUri String

Return value

Type Description
BlobContainer
Types used in this function

BlobContainer

Describes a blob repository.

Field Type
headers Map(String, String)
content ByteArray

deleteBlob

HttpBlobApi blobApi = new HttpBlobApi(loginApi);
void retVal = blobApi.deleteBlob(blobUri);
retVal = baseAPI.doBlob_DeleteBlob(blobUri);

Entitlement: /data/write/$f(blobUri)

Removes a blob from the backing store. There is no undo.

Function Parameters

Parameter Type Description
blobUri String

Return value

Type Description
void

getBlobSize

HttpBlobApi blobApi = new HttpBlobApi(loginApi);
Long retVal = blobApi.getBlobSize(blobUri);
retVal = baseAPI.doBlob_GetBlobSize(blobUri);

Entitlement: /data/list/$f(blobUri)

Retrieves the number of bytes in a blob.

Function Parameters

Parameter Type Description
blobUri String

Return value

Type Description
Long

getBlobMetaData

HttpBlobApi blobApi = new HttpBlobApi(loginApi);
Map<String,String> retVal = blobApi.getBlobMetaData(blobUri);
retVal = baseAPI.doBlob_GetBlobMetaData(blobUri);

Entitlement: /data/list/$f(blobUri)

Retrieves all metadata associated with a blob.

Function Parameters

Parameter Type Description
blobUri String

Return value

Type Description
Map<String,String>

listBlobsByUriPrefix

HttpBlobApi blobApi = new HttpBlobApi(loginApi);
Map<String,RaptureFolderInfo> retVal = blobApi.listBlobsByUriPrefix(uriPrefix, depth);
retVal = baseAPI.doBlob_ListBlobsByUriPrefix(uriPrefix, depth);

Entitlement: /data/list/$f(uriPrefix)

Returns full pathnames for an entire subtree as a map of the path to RFI.

Function Parameters

Parameter Type Description
uriPrefix String
depth int

Return value

Type Description
Map<String,RaptureFolderInfo>

deleteBlobsByUriPrefix

HttpBlobApi blobApi = new HttpBlobApi(loginApi);
List<String> retVal = blobApi.deleteBlobsByUriPrefix(uriPrefix);
retVal = baseAPI.doBlob_DeleteBlobsByUriPrefix(uriPrefix);

Entitlement: /data/write/$f(uriPrefix)

Removes a folder and its contents recursively, including empty subfolders. Validates entitlement on individual blobs and folders. Returns a list of the blobs and folders removed.

Function Parameters

Parameter Type Description
uriPrefix String

Return value

Type Description
List
⚠️ **GitHub.com Fallback** ⚠️