Projects: Resources¶
Bastion¶
List Bastions¶
SSH/SFTP Containers
GET /api/projects/{project-id}/bastions
OAuth authorization required: project_read
Schema
bastions: Arrayid: Integername: Stringstatus: Stringnode_id: Integerip_addr: Stringcreated_at: DateTimeupdated_at: DateTimeport: Integerpw_auth: Boolean | If true, password auth is enabled.username: Stringpassword: Stringon_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 totruewhen 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: Stringauthorization: String | Optional.
Schema
event_id: Integer | The rebuild event.bastion: Objectid: Integername: Stringstatus: Stringnode_id: Integerip_addr: Stringcreated_at: DateTimeupdated_at: DateTimeport: Integerpw_auth: Boolean | If true, password auth is enabled.username: Stringpassword: 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 totruewhen 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 includesnode_status. See View Container.
Events¶
GET /api/projects/{project-id}/events
OAuth authorization required: project_read
Schema
event_log: Arrayid: Integerlocale: Stringstatus: Stringnotice: Booleanstate_reason: Stringevent_code: Stringdescription: Stringcreated_at: DateTimeupdated_at: DateTimeaudit: Objectid: Integerip_addr: Stringevent: Stringraw_data: Stringcreated_at: DateTimeupdated_at: DateTimeuser: Objectid: Integername: 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 includesnode_status. See View Container Service.container_images:Array<ContainerImage>