This page covers configuration and management of View objects.
Object Overview
Objects are files uploaded to buckets within View storage server, either by the View standard API or S3 API.
Endpoint, URL, and Supported Methods
Objects are managed via the storage server API at [http|https]://[hostname]:[port]/v1.0/tenants/[tenant-guid]/buckets/[bucket-guid]/objects
.
By default, the storage server is accessible on port 8001
for the View REST API, and 8002
for the S3-compatible API. Note: storage pools are not manageable via the S3 API.
Supported methods include: GET
HEAD
PUT
DELETE
Structure
Objects contain metadata about the file that has been uploaded. A fully populated storage pool using local disk is shown below.:
{
"GUID": "74ee4b8a-188e-4a73-8a42-3b7fb1ccb5e0",
"TenantGUID": "default",
"NodeGUID": "05a93a0c-bab0-4442-8444-a5863fabc9ec",
"PoolGUID": "default",
"BucketGUID": "example-data-bucket",
"OwnerGUID": "default",
"DataCatalogDocumentGUID": "4f811461-4fab-4a8c-98cc-056be52a4b38",
"DataFlowRequestGUID": "1404e880-be35-44fa-9805-e2bd15b5ced0",
"Key": "1.pdf",
"Version": "2",
"IsLatest": true,
"IsDeleteMarker": false,
"IsLocal": true,
"ContentType": "application/pdf",
"DocumentType": "Pdf",
"SourceUrl": "http://dcc249eaaf06:8001/v1.0/tenants/default/buckets/example-data-bucket/objects/1.pdf",
"MD5Hash": "5DB1D1E8426F5381BEAB883076033F9E",
"SHA1Hash": "09A31789FD9797C311B63C4D8EE9CC103B104066",
"SHA256Hash": "F36DFAC021555765E6A617481613AB047850B8AB7D84DBD7870DF00CF6A1796B",
"IsEncrypted": false,
"WriteMode": "GUID",
"CompressionType": "None",
"ContentLength": 1686283,
"CompressedLength": 0,
"EncryptedLength": 0,
"CompressionRatioPercent": 0,
"CompressionRatioX": 0,
"LastAccessUtc": "2024-10-25T15:49:58.000000Z",
"LastModifiedUtc": "2024-10-25T15:49:58.000000Z",
"CreatedUtc": "2024-10-25T15:49:58.000000Z",
"Owner": {
"GUID": "default",
"TenantGUID": "default",
"FirstName": "Default",
"LastName": "User",
"FullName": "Default User",
"Notes": "Default password is password",
"Email": "[email protected]",
"PasswordSha256": "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8",
"Active": true,
"CreatedUtc": "2024-07-10T05:09:31.000000Z"
}
}
Properties:
GUID
string
globally unique identifier for the objectTenantGUID
string
globally unique identifier for the tenantNodeGUID
string
globally unique identifier for the node where the object was writtenPoolGUID
string
globally unique identifier for the storage pool holding the objectBucketGUID
string
globally unique identifier for the bucket holding the objectOwnerGUID
string
globally unique identifier for the user that wrote the objectDataCatalogDocumentGUID
string
globally unique identifier for the data catalog object created for this objectDataFlowRequestGUID
string
globally unique identifier for the data flow request where the object was processedKey
string
the key for the object, i.e. the filenameVersion
string
the version of the objectIsLatest
bool
boolean indicating if this version is the latest version of the objectIsDeleteMarker
bool
boolean indicating whether or not the object is a delete markerIsLocal
bool
boolean indicating whether or not the object contents are stored locallyContentType
string
the content type of the objectDocumentType
string
the document type of the objectSourceUrl
string
the source URL for accessing the objectMD5Hash
string
the MD5 hash, as a hexadecimal stringSHA1Hash
string
the SHA1 hash, as a hexadecimal stringSHA256Hash
string
the SHA256 hash, as a hexadecimal stringIsEncrypted
bool
boolean indicating if the object is encrypted at restWriteMode
enum
the write mode used to write the object; valid values areGUID
,Key
CompressionType
enum
the compression type applied to the objectContentLength
long
the content length of the objectCompressedLength
long
the compressed length of the objectEncryptedLength
long
the encrypted length of the objectCompressionRatioPercent
decimal
the compression ratio for the objectCompressionRatioX
decimal
the compression ratio, represented as a multiplier, for the objectLastAccessUtc
datetime
timestamp from last access, in UTC timeLastModifiedUtc
datetime
timestamp from last modification, in UTC timeCreatedUtc
datetime
timestamp from creation, in UTC timeOwner
obj
metadata about the object owner
Create
To create, call PUT /v1.0/tenants/[tenant-guid]/buckets/[bucket-guid]/objects/[key]
with the body of the object as the request body.
curl -X PUT http://localhost:8001/v1.0/tenants/[tenant-guid]/buckets/[bucket-guid]/objects \
-H "Content-Type: application/json" \
-H "Authorization: Bearer [accesskey]" \
-d 'Hello, world!'
Read
To read an object by key, call GET /v1.0/tenants/[tenant-guid]/buckets/[bucket-guid]/objects/[key]
. This will return the body of the object. If the object does not exist, a 404 will be returned with a NotFound
error response.
Hello, world!
To read the metadata of an object, call GET /v1.0/tenants/[tenant-guid]/buckets/[bucket-guid]/objects/[key]?md
. This will return the JSON object below, which contains the properties described above. If the object does not exist, a 404 will be returned with a NotFound
error response.
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.
Delete
To delete an object by key, call DELETE /v1.0/tenants/[tenant-guid]/buckets/[bucket-guid]/objects/[key]
. If bucket versioning is enabled, a delete marker will be added, otherwise, the object will be deleted.