Skip to content

Projects: Resources

Bastion

List Bastions

SSH/SFTP Containers

GET /api/projects/{project-id}/bastions

OAuth authorization required: project_read

Schema
  • bastions: Array
    • id: Integer
    • name: String
    • status: String
    • node_id: Integer
    • ip_addr: String
    • created_at: DateTime
    • updated_at: DateTime
    • port: Integer
    • pw_auth: Boolean | If true, password auth is enabled.
    • username: String
    • password: String
    • on_latest_image: Boolean | Whether the bastion runs the current configured bastion image. Stored, not checked live: it's refreshed by the nightly image update on nodes that are online at the time, and set back to true when the bastion is rebuilt. It can be out of date until the next successful nightly refresh, usually within a day.
    • node_status: Object | Status of the node running this bastion. See Node status.

Reset Bastion Password

POST /api/projects/{project-id}/bastions/{id}/reset_password

OAuth authorization required: project_write

Generates a new password and rebuilds the bastion (SSH) container. The rebuild disconnects any open SSH, SFTP, and cloud shell sessions, and the new password takes effect once the rebuild completes. Host keys are kept, so clients do not see a changed-key warning. The password is rotated even while password auth (pw_auth) is disabled.

The SSH port and the project's volumes are unchanged.

Responds with 202 Accepted, the event_id of the rebuild, and the bastion, including its new password.

If the rebuild cannot be started, the password is left unchanged. When that is because the bastion's node is in maintenance or offline (or it has no node), the response is 409 Conflict with errors, code (node_maintenance or node_offline), and the bastion's node_status; this previously returned 422. See Refused and deferred actions. Otherwise, for example when another action is in progress on the bastion, the response is 422 Unprocessable Entity with errors. The callback is normally not called in either case. If the rebuild is refused after its event was created, for example because another action started at the same moment, the event is canceled and the callback reports the failure. A callback that isn't an object with a string url is also rejected with 422.

Request
  • callback: Object | Optional. Notified when the rebuild finishes, whether it succeeded or failed, so you can tell when the new password is live. See API callbacks.
    • url: String
    • authorization: String | Optional.
Schema
  • event_id: Integer | The rebuild event.
  • bastion: Object
    • id: Integer
    • name: String
    • status: String
    • node_id: Integer
    • ip_addr: String
    • created_at: DateTime
    • updated_at: DateTime
    • port: Integer
    • pw_auth: Boolean | If true, password auth is enabled.
    • username: String
    • password: String | The new password.
    • on_latest_image: Boolean | Whether the bastion runs the current configured bastion image. Stored, not checked live: it's refreshed by the nightly image update on nodes that are online at the time, and set back to true when the bastion is rebuilt. It can be out of date until the next successful nightly refresh, usually within a day.
    • node_status: Object | Status of the node running this bastion. See Node status.

Containers

GET /api/projects/{project-id}/containers

OAuth authorization required: project_read

Schema

  • containers: Array<Container> | Each includes node_status. See View Container.

Events

GET /api/projects/{project-id}/events

OAuth authorization required: project_read

Schema
  • event_log: Array
    • id: Integer
    • locale: String
    • status: String
    • notice: Boolean
    • state_reason: String
    • event_code: String
    • description: String
    • created_at: DateTime
    • updated_at: DateTime
    • audit: Object
      • id: Integer
      • ip_addr: String
      • event: String
      • raw_data: String
      • created_at: DateTime
      • updated_at: DateTime
      • user: Object
        • id: Integer
        • name: String

Images

GET /api/project/{project-id}/images

OAuth authorization required: project_read

Schema

  • container_images: Array<ContainerImage>

Services

GET /api/projects/{project-id}/services

OAuth authorization required: project_read

Schema

  • container_services: Array<ContainerService> | Each includes node_status. See View Container Service.
  • container_images: Array<ContainerImage>