Files

Read one entry's metadata

GET
/game-servers/{slice}/files/stat

The size, mode and mimetype of a single file or directory, without transferring it.

The node exposes no per-file stat, so this lists the parent directory and picks the entry out of it. Statting ten files in one directory therefore costs ten listings of that directory — list it once instead.

Authorization

orgApiKey game-servers.files.read
AuthorizationBearer <token>

An organisation API key, prefixed tbk_. Create one under Organisation to API keys; the plaintext is shown once.

The scopes listed on each operation are the abilities the key must carry. They are not OAuth scopes and are not negotiated per request.

In: header

Scope: game-servers.files.read

Path Parameters

slice*string

The server's UUID, as returned by the list endpoint.

Formatuuid

Query Parameters

file*string

Absolute path from the server root. A .. segment is refused rather than resolved — whether /a/link/../b means /b depends on whether link is a symlink, which only the node knows.

Lengthlength <= 1024

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/game-servers/497f6eca-6276-4993-bfeb-53cbbbba6f08/files/stat?file=%2Fserver.properties"
{  "data": {    "name": "server.properties",    "path": "/plugins/server.properties",    "is_file": true,    "is_symlink": true,    "size": 0,    "mode": "-rw-r--r--",    "mode_bits": "0644",    "mimetype": "string",    "modified_at": "2019-08-24T14:15:22Z"  }}