bus

Get object

Returns an object's metadata or full object data.

get/bus/object/{key}

Path parameters

keystring required
Example:folder/file

The key of the object to fetch

Query parameters

bucketstring required

The name of the bucket.

Example:default

The name of the bucket the object is in

onlymetadataboolean

If true, only returns object metadata without data

Response

Successfully retrieved object

metadataObjectUserMetadata

User-defined metadata about an object provided through X-Sia-Meta- headers

bucketstring

The name of the bucket.

etagstring

The ETag of the object

healthnumber float

The health of the object

modTimestring date-time

When the object was last modified

keystring

The key of the object

sizeinteger

The size of the object in bytes

mimeTypestring

The MIME type of the object

encryptionKeystring

A key used to encrypt and decrypt data. The key is either a regular key (key) or a salted key (skey). The latter requires a seed to be used for encryption and decryption.

Example response

{
  "bucket": "default",
  "etag": "W/\"33a64df551425fcc55e4d42a148795d9f25f89d4\""
}

Changes

Changed in 5 of the 50 revisions of this API.46

  • c38282599c5a13See the full diff
    • the allOf[subschema #3]/slabs/items/slab/minShards response's property type/format changed from integer/uint8 to / for status 200

      response-property-type-changed

    • removed the pattern .* from the path request parameter key

      request-parameter-pattern-removed

    • for the path request parameter key, the type/format was generalized from string/ to /

      request-parameter-type-generalized

    • added RedundancySettingsMinShards subschema #2 to the allOf[subschema #3]/slabs/items/slab/minShards response property allOf list for the response status 200

      response-property-all-of-added

  • 922f156353c912See the full diff
    • removed the media type text/plain for the response with the status 404

      response-media-type-removed

    • api tag bus added

      api-tag-added

    • added the non-success response with the status 500

      response-non-success-status-added

    • added the pattern .* to the path request parameter key

      request-parameter-pattern-added

    • endpoint added

      endpoint-added

    • api path removed without deprecation

      api-path-removed-without-deprecation

    This revision also has 99 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog