Mounts

Mounting a snapshot and browsing or downloading its files.

6 endpoints · Plakar Control Plane v0.18 · Base URL, authentication and errors

Mount a snapshot

POST /api/v1/mnt
Badge

Query parameters

  • organization_id string<uuid>
    Organization to act on, at or below the caller’s. Defaults to the caller’s.

Request body application/json required

  • snapshot_id string
  • snapshot_path string
  • store_id string<uuid>

Response 200 OK application/json

  • mount_id string<uuid>

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl -X POST 'https://pcp.example.com/api/v1/mnt' \
  -H 'Authorization: Bearer <badge>' \
  -H 'Content-Type: application/json' \
  -d '{
  "snapshot_id": "string",
  "snapshot_path": "string",
  "store_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90"
}'

Response 200

{
  "mount_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90"
}

Get a mount

GET /api/v1/mnt/{mount_id}
Badge

Path parameters

  • mount_id string required

Query parameters

  • organization_id string<uuid>
    Organization to act on, at or below the caller’s. Defaults to the caller’s.

Response 200 OK application/json

  • id string<uuid>
  • snapshot_id string
  • snapshot_path string
  • state string
  • store_id string<uuid>
  • type string

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl 'https://pcp.example.com/api/v1/mnt/{mount_id}' \
  -H 'Authorization: Bearer <badge>'

Response 200

{
  "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
  "snapshot_id": "string",
  "snapshot_path": "string",
  "state": "string",
  "store_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
  "type": "string"
}

Unmount a snapshot

DELETE /api/v1/mnt/{mount_id}
Badge

Path parameters

  • mount_id string required

Query parameters

  • organization_id string<uuid>
    Organization to act on, at or below the caller’s. Defaults to the caller’s.

Response 200 OK

No response body.

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl -X DELETE 'https://pcp.example.com/api/v1/mnt/{mount_id}' \
  -H 'Authorization: Bearer <badge>'

Browse a mounted snapshot

GET /api/v1/mnt/{mount_id}/browse/{path}
Badge

Path parameters

  • mount_id string required
  • path string required
    A path. It may contain slashes.

Query parameters

  • organization_id string<uuid>
    Organization to act on, at or below the caller’s. Defaults to the caller’s.

Response 200 The directory entries application/json

  • mod_time string<date-time>
  • mode integer
    Max: 4.294967295e+09
  • name string
  • size integer<int64>

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl 'https://pcp.example.com/api/v1/mnt/{mount_id}/browse/{path}' \
  -H 'Authorization: Bearer <badge>'

Response 200

[
  {
    "mod_time": "2026-01-01T00:00:00Z",
    "mode": 0,
    "name": "string",
    "size": 0
  }
]

Download a mounted file

GET /api/v1/mnt/{mount_id}/download/{path}
No authentication
The signature is the credential.

Path parameters

  • mount_id string required
  • path string required
    A path. It may contain slashes.

Query parameters

  • signature string required
    Signature returned by the sign-url endpoint.
  • render string
    How to render the file.
    Allowed: auto, text, text_styled, code Default: "auto"
  • download boolean
    Send the file as an attachment.
    Default: false

Response 200 The file, raw or rendered application/octet-stream

Errors

  • 400 Bad Request (validation or deserialization error)
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl 'https://pcp.example.com/api/v1/mnt/{mount_id}/download/{path}'

Sign a download URL for a mounted file

POST /api/v1/mnt/{mount_id}/sign-url/{path}
Badge

Path parameters

  • mount_id string required
  • path string required
    A path. It may contain slashes.

Query parameters

  • organization_id string<uuid>
    Organization to act on, at or below the caller’s. Defaults to the caller’s.

Response 200 The signature application/json

  • signature string

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl -X POST 'https://pcp.example.com/api/v1/mnt/{mount_id}/sign-url/{path}' \
  -H 'Authorization: Bearer <badge>'

Response 200

{
  "signature": "string"
}