Endpoint

/v1/files/{ref}/streams/{stream_id}/data

GET

Return the contents of the file as an HTTP octet stream. The etag returned by this method represents the whole state of this file. In another word, if you are reading just a portion of the data, etag could be invalid because of other changes happened to the stream, even the specific portion of data you read is still intact.

Parameters

Name Description Required
ref The file ID or the absolute path to the file system object. File IDs can be found in the id field of responses of APIs that return file attributes. You must URL-encode the paths. The APIs & Tools page in the Qumulo Core Web UI URL-encodes the paths. Yes
stream_id Stream ID (uint64) to be modified Yes
snapshot The snapshot ID that specifies the version of the filesystem to use. If not specified, use the head version. No
offset Read data from the requested stream starting at the given 64-bit integer offset. If the offset is larger than the size of the stream, the read will succeed and no data will be returned. If not specified the offset will 0. No
length Read up to length bytes from the requested stream. If the read extends beyond the end of the stream, the read will return as many bytes as possible, up to length. Will read the whole file if not specified. No

Response

Codes

Code Description
200 Return value on success

PUT

Replace the contents of the stream with the body of the request. The target stream must already exist, and the content-type of the request must be Application/Octet-stream.

Parameters

Name Description Required
ref The file ID or the absolute path to the file system object. File IDs can be found in the id field of responses of APIs that return file attributes. You must URL-encode the paths. The APIs & Tools page in the Qumulo Core Web UI URL-encodes the paths. Yes
stream_id Stream ID (uint64) to be modified Yes
If-Match ETag for expected version No

Request

Schema

{
  "type": "object"
}

Response

Codes

Code Description
200 Return value on success

Schema

{
  "description": "api_named_stream_attributes",
  "type": "object",
  "properties": {
    "name": {
      "description": "name",
      "type": "string"
    },
    "id": {
      "description": "id",
      "type": "string"
    },
    "size": {
      "description": "size",
      "type": "string"
    },
    "datablocks": {
      "description": "datablocks",
      "type": "string"
    },
    "data_revision": {
      "description": "data_revision",
      "type": "string"
    }
  }
}

PATCH

Set the contents of the stream, at the given offset, to the body of the request. The target stream must already exist, and the Content-Type of the request must be application/octet-stream.

Parameters

Name Description Required
ref The file ID or the absolute path to the file system object. File IDs can be found in the id field of responses of APIs that return file attributes. You must URL-encode the paths. The APIs & Tools page in the Qumulo Core Web UI URL-encodes the paths. Yes
stream_id Stream ID (uint64) to be modified Yes
offset Write the provided data at the given 64-bit integer offset. If the offset is greater than the size of the stream, the stream will be zero-extended up to offset before the data is written. (default: 0) No
If-Match ETag for expected version No

Request

Schema

{
  "type": "object"
}

Response

Codes

Code Description
200 Return value on success

Schema

{
  "description": "api_named_stream_attributes",
  "type": "object",
  "properties": {
    "name": {
      "description": "name",
      "type": "string"
    },
    "id": {
      "description": "id",
      "type": "string"
    },
    "size": {
      "description": "size",
      "type": "string"
    },
    "datablocks": {
      "description": "datablocks",
      "type": "string"
    },
    "data_revision": {
      "description": "data_revision",
      "type": "string"
    }
  }
}