Create Share
POST /v1/shares
Expose a port of your VM at an HTTPS URL, returned as url. Pass vm_id, or
session_id to use that session's current VM; the VM must be active, and the share
only works while it stays active. A private share (is_public false, the default)
answers only requests that carry your own API key or bearer token; a public share is
open to anyone with the URL.
Authentication
Requires authentication via: OAuth2PasswordBearer.
Parameters
| Name | In | Type | Required | Description | Constraints |
|---|---|---|---|---|---|
X-API-Key | header | string | null | No | nullable |
Request Body
Required: Yes
application/json
Resolved schema:
{
"properties": {
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Session Id"
},
"vm_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Vm Id"
},
"port": {
"type": "integer",
"maximum": 65535,
"minimum": 1,
"title": "Port"
},
"is_public": {
"type": "boolean",
"title": "Is Public",
"default": false
}
},
"type": "object",
"required": [
"port"
],
"title": "ShareCreateRequest"
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
session_id | string | null | No | nullable | |
vm_id | string | null | No | nullable | |
port | integer | Yes | min=1, max=65535 | |
is_public | boolean | No | default=false |
Responses
200
Successful Response
application/json
Resolved schema:
{}
400
Neither session_id nor vm_id was given, session_id is not a valid UUID, the session has no VM, or the VM is not active.
No response body.
401
No credentials, or the Bearer token / X-API-Key is invalid.
No response body.
403
The account is disabled, or a guest token was used; or the session or VM belongs to another account.
No response body.
404
Session or VM not found.
No response body.
422
Validation Error
application/json
Resolved schema:
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
detail | array<object> | No | ||
detail[] | object | No | ||
detail[].loc | array<string | integer> | No | ||
detail[].loc[] | string | integer | No | ||
detail[].msg | string | No | ||
detail[].type | string | No |
429
Rate limit exceeded. Retry later.
No response body.