DE API Documentation

View on GitHub

File Type Endpoints

NOTES: If a path appears in a query string parameter, URL encode it first.

Error code maps follow the general format of data-info’s errors:

{
    err_code: "ERR_CODE_STRING",
    ...
}

Currently Supported File Types

Refer to heuristomancer’s documentation, or make a request against the endpoint below.

Get the list of supported file types

This endpoint delegates to data-info’s GET /file-types endpoint.

URL Path: /secured/filetypes/type-list

HTTP Method: GET

Error Codes: None

Request Query Parameters:

Response Body:

{
    "types" : ["csv, "tsv"]
}

Curl Command:

curl -H "$AUTH_HEADER" http://terrain.example.org:31325/secured/filetypes/type-list

Add/update/unset a file type of a file

This endpoint delegates (after looking up a UUID for the file path provided) to data-info’s PUT /data/:data-id/type endpoint.

URL Path: /secured/filetypes/type

HTTP Method: POST

Error Codes: ERR_NOT_OWNER, ERR_BAD_OR_MISSING_FIELD, ERR_DOES_NOT_EXIST, ERR_NOT_A_USER, ERR_NOT_A_FILE

Request Query Parameters:

Request Body:

{
    "path" : "/path/to/irods/file",
    "type" : "csv"
} If you want to reset the type so that it's blank, pass in a empty string for the type, like in the following:

{
    "path" : "/path/to/irods/file",
    "type" : ""
}

Response Body:

{
    "path" : "/path/to/irods/file",
    "type" : "csv"
}

Curl Command:

curl -H "$AUTH_HEADER" -d '{"path" : "/path/to/irods/file","type":"csv"}' 'http://terrain.example.org:31325/secured/filetypes/type'