DE API Documentation

View on GitHub

Creating Tickets

URL Path: /secured/filesystem/tickets

HTTP Method: POST

Error Codes: ERR_NOT_A_USER, ERR_DOES_NOT_EXIST, ERR_NOT_WRITEABLE

Request Parameters:

Request Body:

{
    "paths" : [
        "/path/to/file/or/directory",
        "/path/to/another/file/or/directory"
    ]
}

Response Body:

{
    "user" : "<username>",
    "tickets" : [
        {
            "path"              : "/path/to/file/or/directory",
            "ticket-id"         : "<ticket-id>",
            "download-url"      : "http://127.0.0.1:8080/d/<ticket-id>",
            "download-page-url" : "http://127.0.0.1:8080/<ticket-id>"
        }
    ]
}

Curl Command:

curl -H "$AUTH_HEADER" -d '{"paths":"/path/to/file/or/directory","/path/to/another/file/or/directory"]}' 'http://127.0.0.1:3000/secured/filesystem/tickets?public=1'

Listing Tickets

URL Path: /secured/filesystem/list-tickets

HTTP Method: POST

Error Codes: ERR_NOT_A_USER, ERR_DOES_NOT_EXIST, ERR_NOT_WRITEABLE

Request Parameters:

Request Body:

{
    "paths" : ["list of paths to look up tickets for"]
}

Response Body:

{
    "tickets" : {
        "/path/to/file" : [
            {
                "path"              : "/path/to/file",
                "ticket-id"         : "<ticket-id>",
                "download-url"      : "http://127.0.0.1:8080/d/<ticket-id>",
                "download-page-url" : "http://127.0.0.1:8080/<ticket-id>"
            }
        ],
        "/path/to/dir"  : [
            {
                "path"              : "/path/to/dir",
                "ticket-id"         : "<ticket-id>",
                "download-url"      : "http://127.0.0.1:8080/d/<ticket-id>",
                "download-page-url" : "http://127.0.0.1:8080/<ticket-id>"
            }
        ]
    }
}

Curl Command:

curl -H "$AUTH_HEADER" -d '{"paths":["/path/to/file","/path/to/dir"]}' http://127.0.0.1:3000/secured/filesystem/list-tickets

Deleting Tickets

URL Path: /secured/filesystem/delete-tickets

HTTP Method: POST

Error Codes: ERR_NOT_A_USER, ERR_DOES_NOT_EXIST, ERR_NOT_WRITEABLE

Request Parameters:

Request Body:

{
    "tickets" : ["ticket-id1", "ticket-id2"]
}

Response Body:

{
    "tickets" : ["ticket-id1", "ticket-id2"]
}

Curl Command:

curl -H "$AUTH_HEADER" -d '{"tickets":["ticket-id1","ticket-id2"]}' http://127.0.0.1:4000/secured/filesystem/delete-tickets