NAV
Ruby Python cURL

ui-vmm JSON:API v0.2

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Base URLs:

License: BSD-3-Clause

Authentication

Certificate

certificate list

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/certificate.list',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/certificate.list', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/certificate.list \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/certificate.list

Displays a list of certificates on the server

Body parameter

{
  "provider": "string",
  "server_id": 0
}

Parameters

Name In Type Required Description
body body certificate.list true none

Responses

Status Meaning Description Schema

certificate revoke

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/certificate.revoke',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/certificate.revoke', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/certificate.revoke \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/certificate.revoke

Revokes the specified certificate on the server

Body parameter

{
  "certificate_fingerprint": "string",
  "provider": "lxd",
  "server_id": 0
}

Parameters

Name In Type Required Description
body body certificate.revoke true none

Responses

Status Meaning Description Schema

Config

config get

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json'
}

result = RestClient.post 'https://example.com/api/v1/config.get',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json'
}

r = requests.post('https://example.com/api/v1/config.get', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/config.get \
  -H 'Content-Type: application/vnd.api+json'

POST /v1/config.get

displays some options from the config file

Body parameter

{}

Responses

Status Meaning Description Schema

Event

event auth

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/event.auth',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/event.auth', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/event.auth \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/event.auth

Authorizes the specified stream, if it exists

Body parameter

{
  "stream": "string"
}

Parameters

Name In Type Required Description
body body event.auth true none

Responses

Status Meaning Description Schema

event subscribe

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json'
}

result = RestClient.post 'https://example.com/api/v1/event.subscribe',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json'
}

r = requests.post('https://example.com/api/v1/event.subscribe', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/event.subscribe \
  -H 'Content-Type: application/vnd.api+json'

POST /v1/event.subscribe

Establishes a socket connection for data transfer

Body parameter

{
  "stream": "string"
}

Parameters

Name In Type Required Description
body body event.subscribe true none

Responses

Status Meaning Description Schema

Health

health alive

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json'
}

result = RestClient.post 'https://example.com/api/v1/health.alive',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json'
}

r = requests.post('https://example.com/api/v1/health.alive', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/health.alive \
  -H 'Content-Type: application/vnd.api+json'

POST /v1/health.alive

returns an ok status if the instance is ready to handle HTTP requests

Body parameter

{}

Responses

Status Meaning Description Schema

health ready

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json'
}

result = RestClient.post 'https://example.com/api/v1/health.ready',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json'
}

r = requests.post('https://example.com/api/v1/health.ready', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/health.ready \
  -H 'Content-Type: application/vnd.api+json'

POST /v1/health.ready

returns an ok status if the instance is ready to handle HTTP requests

Body parameter

{}

Responses

Status Meaning Description Schema

Image

image delete

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/image.delete',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/image.delete', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/image.delete \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/image.delete

Removes the specified image on the server

Body parameter

{
  "image_fingerprint": "string",
  "provider": "lxd",
  "server_id": 0
}

Parameters

Name In Type Required Description
body body image.delete true none

Responses

Status Meaning Description Schema

image list

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/image.list',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/image.list', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/image.list \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/image.list

Displays a list of images on the server

Body parameter

{
  "provider": "lxd",
  "server_id": 0
}

Parameters

Name In Type Required Description
body body image.list true none

Responses

Status Meaning Description Schema

image serverlist

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/image.serverList',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/image.serverList', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/image.serverList \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/image.serverList

Displays a list of images on the server

Body parameter

{
  "provider": "lxd",
  "server_id": 0
}

Parameters

Name In Type Required Description
body body image.serverList true none

Responses

Status Meaning Description Schema

Instance

instance action

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/instance.action',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/instance.action', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/instance.action \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/instance.action

Will perform an action with the instance, for example stop-force

Body parameter

{
  "instance_id": 0,
  "instance_status": "string",
  "provider": "string"
}

Parameters

Name In Type Required Description
body body instance.action true none

Responses

Status Meaning Description Schema

instance add

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/instance.add',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/instance.add', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/instance.add \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/instance.add

Will perform an action with the instance, for example stop-force

Body parameter

{
  "instance_id": 0,
  "instance_status": "string",
  "provider": "string"
}

Parameters

Name In Type Required Description
body body instance.add true none

Responses

Status Meaning Description Schema

instance get

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/instance.get',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/instance.get', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/instance.get \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/instance.get

will display information about the instance(s) from the server available to the user

Body parameter

{
  "instance_name": "string",
  "provider": "string",
  "server_id": 0
}

Parameters

Name In Type Required Description
body body instance.get true none

Responses

Status Meaning Description Schema

instance list

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/instance.list',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/instance.list', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/instance.list \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/instance.list

will display information about the instance(s) from the server available to the user

Body parameter

{
  "instance_id": 0,
  "provider": "string",
  "server_id": 0
}

Parameters

Name In Type Required Description
body body instance.list true none

Responses

Status Meaning Description Schema

Network

network list

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/network.list',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/network.list', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/network.list \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/network.list

Displays a list of networks on the server

Body parameter

{
  "provider": "string",
  "server_id": 0
}

Parameters

Name In Type Required Description
body body network.list true none

Responses

Status Meaning Description Schema

Pool

pool list

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/pool.list',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/pool.list', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/pool.list \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/pool.list

Displays a list of pools on the server

Body parameter

{
  "provider": "string",
  "server_id": 0
}

Parameters

Name In Type Required Description
body body pool.list true none

Responses

Status Meaning Description Schema

Profile

profile delete

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/profile.delete',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/profile.delete', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/profile.delete \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/profile.delete

Removes the specified profile on the server

Body parameter

{
  "profile_name": "string",
  "provider": "lxd",
  "server_id": 0
}

Parameters

Name In Type Required Description
body body profile.delete true none

Responses

Status Meaning Description Schema

profile list

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/profile.list',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/profile.list', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/profile.list \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/profile.list

Displays of profiles on the server

Body parameter

{
  "provider": "string",
  "server_id": 0
}

Parameters

Name In Type Required Description
body body profile.list true none

Responses

Status Meaning Description Schema

profile update

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/profile.update',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/profile.update', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/profile.update \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/profile.update

Displays of profiles on the server

Body parameter

{
  "profile_body": "string",
  "profile_name": "string",
  "profile_rename": "string",
  "provider": "lxd",
  "server_id": 0
}

Parameters

Name In Type Required Description
body body profile.update true none

Responses

Status Meaning Description Schema

Server

server add

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/server.add',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/server.add', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/server.add \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/server.add

Will add the server to the database

Body parameter

{
  "server_host": "127.0.0.1",
  "server_password": "string",
  "server_path": "string",
  "server_port": "8443",
  "server_protocol": "lxd"
}

Parameters

Name In Type Required Description
body body server.add true none

Responses

Status Meaning Description Schema

server get

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/server.get',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/server.get', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/server.get \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/server.get

Will display information about the server(s) available to the user

Body parameter

{
  "provider": "string",
  "server_id": 0
}

Parameters

Name In Type Required Description
body body server.get true none

Responses

Status Meaning Description Schema

server list

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/server.list',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/server.list', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/server.list \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/server.list

Will display information about the server(s) available to the user

Body parameter

{
  "provider": "string",
  "server_id": 0
}

Parameters

Name In Type Required Description
body body server.list true none

Responses

Status Meaning Description Schema

server verify

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/server.verify',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/server.verify', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/server.verify \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/server.verify

Will check the connection to the server

Body parameter

{
  "server_host": "127.0.0.1",
  "server_password": "string",
  "server_path": "string",
  "server_port": "8443",
  "server_protocol": "lxd"
}

Parameters

Name In Type Required Description
body body server.verify true none

Responses

Status Meaning Description Schema

Simplestream

simplestream add

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/simplestream.add',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/simplestream.add', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/simplestream.add \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/simplestream.add

It will add the product to the simplestream server

Body parameter

{
  "product_aliases": "string",
  "product_arch": "string",
  "product_os": "string",
  "product_release": "string",
  "product_release_title": "string",
  "product_variant": "string"
}

Parameters

Name In Type Required Description
body body simplestream.add true none

Responses

Status Meaning Description Schema

simplestream images

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json'
}

result = RestClient.get 'https://example.com/api/v1/simplestream.images',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json'
}

r = requests.get('https://example.com/api/v1/simplestream.images', headers = headers)

print(r.json())

# You can also use wget
curl -X GET https://example.com/api/v1/simplestream.images \
  -H 'Content-Type: application/vnd.api+json'

GET /v1/simplestream.images

Displays image files on a simplestream server

Body parameter

{}

Responses

Status Meaning Description Schema

simplestream list

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json'
}

result = RestClient.get 'https://example.com/api/v1/simplestream.list',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json'
}

r = requests.get('https://example.com/api/v1/simplestream.list', headers = headers)

print(r.json())

# You can also use wget
curl -X GET https://example.com/api/v1/simplestream.list \
  -H 'Content-Type: application/vnd.api+json'

GET /v1/simplestream.list

Displays a list of images on the simplestream server

Body parameter

{}

Responses

Status Meaning Description Schema

simplestream upload

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/simplestream.upload',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/simplestream.upload', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/simplestream.upload \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/simplestream.upload

It will upload image files to simplestream server

Body parameter

{
  "file": "string",
  "payload": {
    "product_id": "string",
    "product_version_serial": "string"
  }
}

Parameters

Name In Type Required Description
body body simplestream.upload true none

Responses

Status Meaning Description Schema

Ssh-Key

ssh-key add

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/ssh-key.add',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/ssh-key.add', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/ssh-key.add \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/ssh-key.add

It will add the user's ssh key to the database, after which this key will be added to new instances

Body parameter

{
  "key_name": "string",
  "key_public": "string"
}

Parameters

Name In Type Required Description
body body ssh-key.add true none

Responses

Status Meaning Description Schema

ssh-key delete

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/ssh-key.delete',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/ssh-key.delete', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/ssh-key.delete \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/ssh-key.delete

Will remove the user's ssh-key from the database

Body parameter

{
  "key_id": 0
}

Parameters

Name In Type Required Description
body body ssh-key.delete true none

Responses

Status Meaning Description Schema

ssh-key get

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/ssh-key.get',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/ssh-key.get', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/ssh-key.get \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/ssh-key.get

Displays a list of user ssh-keys

Body parameter

{}

Responses

Status Meaning Description Schema

Token

token create

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/token.create',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/token.create', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/token.create \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/token.create

Generates a token for working with the api. It is possible to revoke all other tokens with the system.api type

Body parameter

{
  "token_lifetime": 0,
  "token_revoke_all": true
}

Parameters

Name In Type Required Description
body body token.create true none

Responses

Status Meaning Description Schema

token get

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/token.get',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/token.get', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/token.get \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/token.get

Displays a list of user tokens

Body parameter

{}

Responses

Status Meaning Description Schema

token revoke

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/token.revoke',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/token.revoke', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/token.revoke \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/token.revoke

Revokes the specified user token

Body parameter

{
  "token_name": "string"
}

Parameters

Name In Type Required Description
body body token.revoke true none

Responses

Status Meaning Description Schema

User

user assertionget

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json'
}

result = RestClient.post 'https://example.com/api/v1/user.assertionGet',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json'
}

r = requests.post('https://example.com/api/v1/user.assertionGet', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/user.assertionGet \
  -H 'Content-Type: application/vnd.api+json'

POST /v1/user.assertionGet

Body parameter

{
  "user_login": "string"
}

Parameters

Name In Type Required Description
body body user.assertionGet true none

Responses

Status Meaning Description Schema

user assertionverify

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json'
}

result = RestClient.post 'https://example.com/api/v1/user.assertionVerify',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json'
}

r = requests.post('https://example.com/api/v1/user.assertionVerify', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/user.assertionVerify \
  -H 'Content-Type: application/vnd.api+json'

POST /v1/user.assertionVerify

Body parameter

{
  "user_login": "string"
}

Parameters

Name In Type Required Description
body body user.assertionVerify true none

Responses

Status Meaning Description Schema

user credentialdelete

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/user.credentialDelete',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/user.credentialDelete', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/user.credentialDelete \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/user.credentialDelete

Body parameter

{}

Responses

Status Meaning Description Schema

user credentialget

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/user.credentialGet',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/user.credentialGet', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/user.credentialGet \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/user.credentialGet

Body parameter

{}

Responses

Status Meaning Description Schema

user credentialmake

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json'
}

result = RestClient.post 'https://example.com/api/v1/user.credentialMake',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json'
}

r = requests.post('https://example.com/api/v1/user.credentialMake', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/user.credentialMake \
  -H 'Content-Type: application/vnd.api+json'

POST /v1/user.credentialMake

Body parameter

{
  "user_email": "string",
  "user_login": "string",
  "user_register": true
}

Parameters

Name In Type Required Description
body body user.credentialMake true none

Responses

Status Meaning Description Schema

user emailchange

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/user.emailChange',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/user.emailChange', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/user.emailChange \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/user.emailChange

Сhanging a user mailbox

Body parameter

{
  "user_code": "string",
  "user_email": "string"
}

Parameters

Name In Type Required Description
body body user.emailChange true none

Responses

Status Meaning Description Schema

user get

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/user.get',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/user.get', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/user.get \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/user.get

Will return the user's token

Body parameter

{}

Responses

Status Meaning Description Schema

user login

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json'
}

result = RestClient.post 'https://example.com/api/v1/user.login',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json'
}

r = requests.post('https://example.com/api/v1/user.login', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/user.login \
  -H 'Content-Type: application/vnd.api+json'

POST /v1/user.login

Will authorize the user and return his token

Body parameter

{
  "user_login": "string",
  "user_password": "string"
}

Parameters

Name In Type Required Description
body body user.login true none

Responses

Status Meaning Description Schema

user logout

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/user.logout',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/user.logout', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/user.logout \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/user.logout

Deactivates the current token

Body parameter

{}

Responses

Status Meaning Description Schema

user passwordchange

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/user.passwordChange',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/user.passwordChange', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/user.passwordChange \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/user.passwordChange

change user password

Body parameter

{
  "user_password": "string",
  "user_passwordRepeat": "string"
}

Parameters

Name In Type Required Description
body body user.passwordChange true none

Responses

Status Meaning Description Schema

user passwordlock

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/user.passwordLock',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/user.passwordLock', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/user.passwordLock \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/user.passwordLock

password change lock

Body parameter

{
  "user_code": "string",
  "user_password_locked": true
}

Parameters

Name In Type Required Description
body body user.passwordLock true none

Responses

Status Meaning Description Schema

user recovery

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json'
}

result = RestClient.post 'https://example.com/api/v1/user.recovery',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json'
}

r = requests.post('https://example.com/api/v1/user.recovery', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/user.recovery \
  -H 'Content-Type: application/vnd.api+json'

POST /v1/user.recovery

password recovery

Body parameter

{
  "user_code": "string",
  "user_email": "string",
  "user_password": "string",
  "user_passwordRepeat": "string"
}

Parameters

Name In Type Required Description
body body user.recovery true none

Responses

Status Meaning Description Schema

user register

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json'
}

result = RestClient.post 'https://example.com/api/v1/user.register',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json'
}

r = requests.post('https://example.com/api/v1/user.register', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/user.register \
  -H 'Content-Type: application/vnd.api+json'

POST /v1/user.register

User registration

Body parameter

{
  "user_code": "string",
  "user_email": "string",
  "user_login": "string",
  "user_password": "string",
  "user_passwordRepeat": "string"
}

Parameters

Name In Type Required Description
body body user.register true none

Responses

Status Meaning Description Schema

Volume

volume list

Code samples

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/vnd.api+json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post 'https://example.com/api/v1/volume.list',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/vnd.api+json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://example.com/api/v1/volume.list', headers = headers)

print(r.json())

# You can also use wget
curl -X POST https://example.com/api/v1/volume.list \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {access-token}'

POST /v1/volume.list

Displays a list of volumes on the server

Body parameter

{
  "provider": "string",
  "server_id": 0
}

Parameters

Name In Type Required Description
body body volume.list true none

Responses

Status Meaning Description Schema

Schemas

certificate.list

{
  "provider": "string",
  "server_id": 0
}

Properties

Name Type Required Restrictions Description
provider string true none none
server_id integer true none none

certificate.revoke

{
  "certificate_fingerprint": "string",
  "provider": "lxd",
  "server_id": 0
}

Properties

Name Type Required Restrictions Description
certificate_fingerprint string true none none
provider string true none none
server_id integer true none none

event.auth

{
  "stream": "string"
}

Properties

Name Type Required Restrictions Description
stream string true none none

event.subscribe

{
  "stream": "string"
}

Properties

Name Type Required Restrictions Description
stream string true none none

image.delete

{
  "image_fingerprint": "string",
  "provider": "lxd",
  "server_id": 0
}

Properties

Name Type Required Restrictions Description
image_fingerprint string true none none
provider string true none none
server_id integer true none none

image.list

{
  "provider": "lxd",
  "server_id": 0
}

Properties

Name Type Required Restrictions Description
provider string true none none
server_id integer true none none

image.serverList

{
  "provider": "lxd",
  "server_id": 0
}

Properties

Name Type Required Restrictions Description
provider string true none none
server_id integer true none none

instance.action

{
  "instance_id": 0,
  "instance_status": "string",
  "provider": "string"
}

Properties

Name Type Required Restrictions Description
instance_id integer true none none
instance_status string false none none
provider string true none none

instance.add

{
  "instance_id": 0,
  "instance_status": "string",
  "provider": "string"
}

Properties

Name Type Required Restrictions Description
instance_id integer true none none
instance_status string false none none
provider string true none none

instance.get

{
  "instance_name": "string",
  "provider": "string",
  "server_id": 0
}

Properties

Name Type Required Restrictions Description
instance_name string false none none
provider string true none none
server_id integer false none none

instance.list

{
  "instance_id": 0,
  "provider": "string",
  "server_id": 0
}

Properties

Name Type Required Restrictions Description
instance_id integer false none none
provider string true none none
server_id integer false none none

network.list

{
  "provider": "string",
  "server_id": 0
}

Properties

Name Type Required Restrictions Description
provider string true none none
server_id integer true none none

pool.list

{
  "provider": "string",
  "server_id": 0
}

Properties

Name Type Required Restrictions Description
provider string true none none
server_id integer true none none

profile.delete

{
  "profile_name": "string",
  "provider": "lxd",
  "server_id": 0
}

Properties

Name Type Required Restrictions Description
profile_name string true none none
provider string true none none
server_id integer true none none

profile.list

{
  "provider": "string",
  "server_id": 0
}

Properties

Name Type Required Restrictions Description
provider string true none none
server_id integer true none none

profile.update

{
  "profile_body": "string",
  "profile_name": "string",
  "profile_rename": "string",
  "provider": "lxd",
  "server_id": 0
}

Properties

Name Type Required Restrictions Description
profile_body string true none none
profile_name string true none none
profile_rename string false none none
provider string true none none
server_id integer true none none

server.add

{
  "server_host": "127.0.0.1",
  "server_password": "string",
  "server_path": "string",
  "server_port": "8443",
  "server_protocol": "lxd"
}

Properties

Name Type Required Restrictions Description
server_host string true none none
server_password string true none none
server_path string false none none
server_port integer true none none
server_protocol string true none none

server.get

{
  "provider": "string",
  "server_id": 0
}

Properties

Name Type Required Restrictions Description
provider string true none none
server_id integer true none none

server.list

{
  "provider": "string",
  "server_id": 0
}

Properties

Name Type Required Restrictions Description
provider string true none none
server_id integer true none none

server.verify

{
  "server_host": "127.0.0.1",
  "server_password": "string",
  "server_path": "string",
  "server_port": "8443",
  "server_protocol": "lxd"
}

Properties

Name Type Required Restrictions Description
server_host integer true none none
server_password string true none none
server_path string false none none
server_port integer true none none
server_protocol string true none none

simplestream.add

{
  "product_aliases": "string",
  "product_arch": "string",
  "product_os": "string",
  "product_release": "string",
  "product_release_title": "string",
  "product_variant": "string"
}

Properties

Name Type Required Restrictions Description
product_aliases string false none none
product_arch string true none none
product_os string true none none
product_release string true none none
product_release_title string false none none
product_variant string false none none

simplestream.upload

{
  "file": "string",
  "payload": {
    "product_id": "string",
    "product_version_serial": "string"
  }
}

Properties

Name Type Required Restrictions Description
file string(binary) true none none
payload object true none none
» product_id string true none none
» product_version_serial string true none none

ssh-key.add

{
  "key_name": "string",
  "key_public": "string"
}

Properties

Name Type Required Restrictions Description
key_name string true none none
key_public string true none none

ssh-key.delete

{
  "key_id": 0
}

Properties

Name Type Required Restrictions Description
key_id integer true none none

token.create

{
  "token_lifetime": 0,
  "token_revoke_all": true
}

Properties

Name Type Required Restrictions Description
token_lifetime integer true none none
token_revoke_all boolean false none none

token.revoke

{
  "token_name": "string"
}

Properties

Name Type Required Restrictions Description
token_name string true none none

user.assertionGet

{
  "user_login": "string"
}

Properties

Name Type Required Restrictions Description
user_login string true none none

user.assertionVerify

{
  "user_login": "string"
}

Properties

Name Type Required Restrictions Description
user_login string true none none

user.credentialMake

{
  "user_email": "string",
  "user_login": "string",
  "user_register": true
}

Properties

Name Type Required Restrictions Description
user_email string false none none
user_login string true none none
user_register boolean false none none

user.emailChange

{
  "user_code": "string",
  "user_email": "string"
}

Properties

Name Type Required Restrictions Description
user_code string false none none
user_email string true none none

user.login

{
  "user_login": "string",
  "user_password": "string"
}

Properties

Name Type Required Restrictions Description
user_login string true none none
user_password string true none none

user.passwordChange

{
  "user_password": "string",
  "user_passwordRepeat": "string"
}

Properties

Name Type Required Restrictions Description
user_password string true none none
user_passwordRepeat string true none none

user.passwordLock

{
  "user_code": "string",
  "user_password_locked": true
}

Properties

Name Type Required Restrictions Description
user_code string true none none
user_password_locked boolean true none none

user.recovery

{
  "user_code": "string",
  "user_email": "string",
  "user_password": "string",
  "user_passwordRepeat": "string"
}

Properties

Name Type Required Restrictions Description
user_code string true none none
user_email string true none none
user_password string true none none
user_passwordRepeat string true none none

user.register

{
  "user_code": "string",
  "user_email": "string",
  "user_login": "string",
  "user_password": "string",
  "user_passwordRepeat": "string"
}

Properties

Name Type Required Restrictions Description
user_code string true none none
user_email string true none none
user_login string true none none
user_password string true none none
user_passwordRepeat string true none none

volume.list

{
  "provider": "string",
  "server_id": 0
}

Properties

Name Type Required Restrictions Description
provider string true none none
server_id integer true none none