Files

List a directory

GET
/game-servers/{slice}/files

One page of a directory's entries. Directories always sort before files; sort and direction order within each group.

search is a plain case-insensitive substring match on the entry name, applied to the whole directory before paging, so a match on page 4 is still found.

A directory that does not exist is a 404, distinct from an empty one, which is a 200 with no entries.

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

directory?string

Absolute path from the server root. Defaults to /.

Default"/"
search?string
Lengthlength <= 255
sort?string
Default"name"

Value in

  • "name"
  • "size"
  • "modified"
direction?string
Default"asc"

Value in

  • "asc"
  • "desc"
page?integer
Range1 <= value
Default1
per_page?integer
Range1 <= value <= 500
Default100

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?directory=%2Fplugins"
{  "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"    }  ],  "meta": {    "directory": "string",    "current_page": 0,    "per_page": 0,    "total": 0,    "last_page": 0  }}