DE API Documentation

View on GitHub

Reading a chunk of a file

URL Path: /secured/filesystem/read-chunk

This endpoint delegates to data-info’s /data/:data-id/chunks/:position/:size, after looking up the UUID corresponding to the path it was passed.

HTTP Method: POST

Error Codes_: ERR_DOES_NOT_EXIST, ERR_NOT_READABLE, ERR_NOT_A_USER

Request Query Parameters_:

Request Body:

{
    "path"       : "/iplant/home/wregglej/testfile",
    "position"   : "20",
    "chunk-size" : "7"
}

Response:

{
    "path"       : "/iplant/home/wregglej/testfile",
    "user"       : "wregglej",
    "start"      : "20",
    "chunk-size" : "7",
    "file-size"  : "33",
    "chunk"      : "0\n12345"
}

Curl Command:

curl -H "$AUTH_HEADER" -H "Content-Type:application/json" -d '{"path" : "/iplant/home/wregglej/testfile", "position" : "20", "chunk-size" : "7"}' http://127.0.0.1:31360/secured/filesystem/read-chunk

Notes: