API blob - RapturePlatform/Rapture GitHub Wiki
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)
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.
Parameter | Type | Description |
---|---|---|
blobRepoUri | String | |
config | String | |
metaConfig | String |
Type | Description |
---|---|
void |
HttpBlobApi blobApi = new HttpBlobApi(loginApi);
BlobRepoConfig retVal = blobApi.getBlobRepoConfig(blobRepoUri);
retVal = baseAPI.doBlob_GetBlobRepoConfig(blobRepoUri);
Entitlement: /repo/read
Retrieves blob repository information
Parameter | Type | Description |
---|---|---|
blobRepoUri | String |
Type | Description |
---|---|
BlobRepoConfig |
Defines a BlobRepository.
Field | Type |
---|---|
description | String |
config | String |
authority | String |
metaConfig | String |
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.
This function takes no parameters.
Type | Description |
---|---|
List |
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.
Parameter | Type | Description |
---|---|---|
repoUri | String |
Type | Description |
---|---|
void |
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.
Parameter | Type | Description |
---|---|---|
repoUri | String |
Type | Description |
---|---|
boolean |
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.
Parameter | Type | Description |
---|---|---|
blobUri | String |
Type | Description |
---|---|
boolean |
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.
Parameter | Type | Description |
---|---|---|
blobUri | String | |
content | byte[] |
Type | Description |
---|---|
void |
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
Parameter | Type | Description |
---|---|---|
blobUri | String | |
content | byte[] | |
contentType | String |
Type | Description |
---|---|
void |
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.
Parameter | Type | Description |
---|---|---|
blobUri | String |
Type | Description |
---|---|
BlobContainer |
Describes a blob repository.
Field | Type |
---|---|
headers | Map(String, String) |
content | ByteArray |
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.
Parameter | Type | Description |
---|---|---|
blobUri | String |
Type | Description |
---|---|
void |
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.
Parameter | Type | Description |
---|---|---|
blobUri | String |
Type | Description |
---|---|
Long |
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.
Parameter | Type | Description |
---|---|---|
blobUri | String |
Type | Description |
---|---|
Map<String,String> |
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.
Parameter | Type | Description |
---|---|---|
uriPrefix | String | |
depth | int |
Type | Description |
---|---|
Map<String,RaptureFolderInfo> |
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.
Parameter | Type | Description |
---|---|---|
uriPrefix | String |
Type | Description |
---|---|
List |