Pterodactyldocs
Client server file manager

Compress file

Compresses the specified file

POST/api/client/servers/{server}/files/compress

Authorization

ClientToken
AuthorizationBearer <token>

Client API key (generated at /account/api)

In: header

Path Parameters

server*string

Server identifier (short 8-character ID)

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/client/servers/1a7ce997/files/compress" \  -H "Content-Type: application/json" \  -d '{    "root": "/",    "files": [      "abc"    ]  }'
{  "object": "file_object",  "attributes": {    "name": "archive-2020-08-23T220805Z.tar.gz",    "mode": "-rw-------",    "size": 0,    "is_file": true,    "is_symlink": false,    "is_editable": false,    "mimetype": "application/tar+gzip",    "created_at": "2020-08-23T22:08:05+00:00",    "modified_at": "2020-08-23T22:08:05+00:00"  }}