Skip to content
NebulaCtrldocs
HTTP APIEndpoints

Shell

Open a shell in a running instance from the browser, and list, download and upload its files. Administrators and owners only. Each operation lists its method and path, parameters, request body, responses and an example call.

GET/api/v1/services/{id}/shell/availability

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Path Parameters

id*string

Service id.

Query Parameters

environmentId*string

Environment id.

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/services/string/shell/availability?environmentId=string"
{  "$schema": "https://example.com/AvailabilityOutputBody.json",  "allowed": true,  "canUpload": true,  "code": "ok",  "idleTimeoutSeconds": 0,  "maxFileBytes": 0,  "maxSessionSeconds": 0,  "message": "string"}
GET/api/v1/services/{id}/shell/download

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Path Parameters

id*string

Service id.

Query Parameters

environmentId*string

Environment id.

pod?string

Instance name.

Length1 <= length
path?string

Absolute path of a file, or of a directory with archive=true.

Length1 <= length
archive?boolean

Download a directory as a tar archive.

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/services/string/shell/download?environmentId=string"
"string"
GET/api/v1/services/{id}/shell/files

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Path Parameters

id*string

Service id.

Query Parameters

environmentId*string

Environment id.

pod?string

Instance name.

Length1 <= length
path?string

Absolute directory path inside the container.

Length1 <= length

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/services/string/shell/files?environmentId=string"
{  "$schema": "https://example.com/ListOutputBody.json",  "entries": [    {      "kind": "file",      "modTime": "string",      "mode": "string",      "name": "string",      "size": 0,      "target": "string"    }  ],  "path": "string",  "truncated": true}
POST/api/v1/services/{id}/shell/sessions

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Path Parameters

id*string

Service id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/api/v1/services/string/shell/sessions" \  -H "Content-Type: application/json" \  -d '{    "cols": 1,    "environmentId": "string",    "pod": "string",    "rows": 1  }'
{  "$schema": "https://example.com/OpenOutputBody.json",  "expiresAt": "2019-08-24T14:15:22Z",  "idleTimeoutSeconds": 0,  "maxSessionSeconds": 0,  "sessionId": "string",  "streamPath": "string",  "ticket": "string"}
POST/api/v1/services/{id}/shell/upload

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Path Parameters

id*string

Service id.

Query Parameters

environmentId*string

Environment id.

pod?string

Instance name.

Length1 <= length
dir?string

Absolute directory inside the container.

Length1 <= length
name?string

File name to create in the directory; a file of that name is replaced.

Length1 <= length <= 255

Request Body

application/octet-stream

TypeScript Definitions

Use the request body type in TypeScript.

body*file
Formatbinary

Response Body

application/problem+json

curl -X POST "https://example.com/api/v1/services/string/shell/upload?environmentId=string" \  -H "Content-Type: application/octet-stream" \  -d 'string'
Empty