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 object
  • TenantGUID string globally unique identifier for the tenant
  • NodeGUID string globally unique identifier for the node where the object was written
  • PoolGUID string globally unique identifier for the storage pool holding the object
  • BucketGUID string globally unique identifier for the bucket holding the object
  • OwnerGUID string globally unique identifier for the user that wrote the object
  • DataCatalogDocumentGUID string globally unique identifier for the data catalog object created for this object
  • DataFlowRequestGUID string globally unique identifier for the data flow request where the object was processed
  • Key string the key for the object, i.e. the filename
  • Version string the version of the object
  • IsLatest bool boolean indicating if this version is the latest version of the object
  • IsDeleteMarker bool boolean indicating whether or not the object is a delete marker
  • IsLocal bool boolean indicating whether or not the object contents are stored locally
  • ContentType string the content type of the object
  • DocumentType string the document type of the object
  • SourceUrl string the source URL for accessing the object
  • MD5Hash string the MD5 hash, as a hexadecimal string
  • SHA1Hash string the SHA1 hash, as a hexadecimal string
  • SHA256Hash string the SHA256 hash, as a hexadecimal string
  • IsEncrypted bool boolean indicating if the object is encrypted at rest
  • WriteMode enum the write mode used to write the object; valid values are GUID, Key
  • CompressionType enum the compression type applied to the object
  • ContentLength long the content length of the object
  • CompressedLength long the compressed length of the object
  • EncryptedLength long the encrypted length of the object
  • CompressionRatioPercent decimal the compression ratio for the object
  • CompressionRatioX decimal the compression ratio, represented as a multiplier, for the object
  • LastAccessUtc datetime timestamp from last access, in UTC time
  • LastModifiedUtc datetime timestamp from last modification, in UTC time
  • CreatedUtc datetime timestamp from creation, in UTC time
  • Owner 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.