API v7.0
- api.vpsfree.cz
- v7.0
This page contains a list of resources available in API v7.0, their actions,
description, parameters and example usage.
This API is based on the HaveAPI framework.
You can access it using existing clients:
The code examples found on this page are for HaveAPI v0.25.0, so be sure
to use clients of the same version.
Initialization
Ruby
require 'haveapi-client'
client = HaveAPI::Client.new("https://api.vpsfree.cz", version: "7.0")
JavaScript
import HaveAPI from 'haveapi-client'
var api = new HaveAPI.Client("https://api.vpsfree.cz", {version: "7.0"});
PHP
$api = new \HaveAPI\Client("https://api.vpsfree.cz", "7.0");
CLI
$ haveapi-cli -u https://api.vpsfree.cz --version 7.0
File system
# Mount the file system
$ haveapi-fs https://api.vpsfree.cz /mnt/api.vpsfree.cz -o version=7.0
curl
$ curl --request OPTIONS 'https://api.vpsfree.cz/v7.0/'
HTTP
OPTIONS /v7.0/ HTTP/1.1
Host: api.vpsfree.cz
Authentication methods
Basic
Authentication using HTTP basic. Username and password is passed via HTTP header. Its use is forbidden from web browsers.
Ruby
require 'haveapi-client'
client = HaveAPI::Client.new("https://api.vpsfree.cz", version: "7.0")
client.authenticate(:basic, user: "user", password: "secret")
JavaScript
import HaveAPI from 'haveapi-client'
var api = new HaveAPI.Client("https://api.vpsfree.cz", {version: "7.0"});
api.authenticate("basic", {
user: "user",
password: "secret"
}, function (client, status) {
console.log("Authenticated?", status);
});
PHP
$api = new \HaveAPI\Client("https://api.vpsfree.cz", "7.0");
$api->authenticate("basic", ["user" => "user", "password" => "secret"]);
CLI
# Provide credentials on command line
$ haveapi-cli -u https://api.vpsfree.cz --version 7.0 --auth basic --user user --password secret
# If username or password isn't provided, the user is asked on stdin
$ haveapi-cli -u https://api.vpsfree.cz --version 7.0 --auth basic --user user
Password: secret
File system
# Provide credentials as file system options
# Mount the file system
$ haveapi-fs https://api.vpsfree.cz /mnt/api.vpsfree.cz -o version=7.0 -o auth_method=basic,user=myuser,password=secret
# If username or password isn't provided, the user is asked on stdin
# Mount the file system
$ haveapi-fs https://api.vpsfree.cz /mnt/api.vpsfree.cz -o version=7.0 -o auth_method=basic,user=myuser
Password: secret
curl
# Password is asked on standard input
$ curl --request OPTIONS \
--user username \
'https://api.vpsfree.cz'
Password: secret
# Password given on the command line
$ curl --request OPTIONS \
--user username:secret \
'https://api.vpsfree.cz'
HTTP
GET / HTTP/1.1
Host: api.vpsfree.cz
Authorization: Basic dXNlcjpzZWNyZXQ=
Token
The client authenticates with credentials, usually username and password, and gets a token. From this point, the credentials can be forgotten and the token is used instead. Tokens can have different lifetimes, can be renewed and revoked. The token is passed either via HTTP header or query parameter.
- HTTP header:
- X-HaveAPI-Auth-Token
- Query parameter:
- _auth_token
Resources
Token
Token # Renew
- Path:
- POST /_auth/token/tokens/renew
- Description:
- Authentication required:
- yes
- Scope:
- token#renew
- Aliases:
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- hash
- Namespace:
- token
Label |
Name |
Type |
Description |
Valid_to |
valid_to |
Datetime |
|
Token # Request
- Path:
- POST /_auth/token/tokens
- Description:
- Authentication required:
- no
- Scope:
- token#request
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- hash
- Namespace:
- token
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
User |
user |
yes |
String |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Password |
password |
yes |
String |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Scope |
scope |
no |
String |
|
all |
|
Lifetime |
lifetime |
yes |
String |
Present- empty
- false
- message
- must be present and non-empty
Include- values
- ["fixed", "renewable_manual", "renewable_auto", "permanent"]
- message
- %{value} cannot be used
|
|
fixed - the token has a fixed validity period, it cannot be renewed
renewable_manual - the token can be renewed, but it must be done manually via renew action
renewable_auto - the token is renewed automatically to now+interval every time it is used
permanent - the token will be valid forever, unless deleted
|
Interval |
interval |
no |
Integer |
|
300 |
How long will requested token be valid, in seconds. |
Output parameters
- Layout:
- hash
- Namespace:
- token
Label |
Name |
Type |
Description |
Token |
token |
String |
|
Valid_to |
valid_to |
Datetime |
|
Complete |
complete |
Boolean |
|
Next_action |
next_action |
String |
|
Token # Revoke
- Path:
- POST /_auth/token/tokens/revoke
- Description:
- Authentication required:
- yes
- Scope:
- token#revoke
- Aliases:
- Blocking:
- no
Input parameters
Output parameters
Token # Totp
- Path:
- POST /_auth/token/tokens/totp
- Description:
- Authentication required:
- no
- Scope:
- token#totp
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- hash
- Namespace:
- token
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Token |
token |
yes |
String |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
TOTP code |
code |
yes |
String |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Output parameters
- Layout:
- hash
- Namespace:
- token
Label |
Name |
Type |
Description |
Token |
token |
String |
|
Valid_to |
valid_to |
Datetime |
|
Complete |
complete |
Boolean |
|
Next_action |
next_action |
String |
|
Ruby
require 'haveapi-client'
client = HaveAPI::Client.new("https://api.vpsfree.cz", version: "7.0")
# Get token using username and password
client.authenticate(:token, user: "user", password: "secret", scope: "scope")
puts "Token = #{client.auth.token}"
# Next time, the client can authenticate using the token directly
client.authenticate(:token, token: saved_token)
JavaScript
import HaveAPI from 'haveapi-client'
var api = new HaveAPI.Client("https://api.vpsfree.cz", {version: "7.0"});
// Request a new token
api.authenticate("token", {
user: "user",
password: "secret",
scope: "scope"
}, function (client, status) {
console.log("Authenticated?", status);
if (status)
console.log("Token is", client.authProvider.token);
});
// Use an existing token
api.authenticate("token", {
token: "qwertyuiop..."
}, function (client, status) {
console.log("Authenticated?", status);
});
PHP
$api = new \HaveAPI\Client("https://api.vpsfree.cz", "7.0");
// Get token using username and password
$api->authenticate("token", ["user" => "user", "password" => "secret", "scope" => "scope"]);
echo "Token = ".$api->getAuthenticationProvider()->getToken();
// Next time, the client can authenticate using the token directly
$api->authenticate("token", ["token" => $savedToken]);
CLI
# Get token using username and password and save it to disk
# Note that the client always has to call some action. APIs should provide
# an action to get information about the current user, so that's what we're
# calling now.
$ haveapi-cli -u https://api.vpsfree.cz --version 7.0 --auth token --user user --scope scope --save user current
Password: secret
# Now the token is read from disk and the user does not have to provide username
# nor password and be authenticated
$ haveapi-cli -u https://api.vpsfree.cz --version 7.0 user current
File system
# Authenticate using username and password
# Mount the file system
$ haveapi-fs https://api.vpsfree.cz /mnt/api.vpsfree.cz -o version=7.0 -o auth_method=token,user=myuser
Password: secret
# If you have generated a token, you can use it
# Mount the file system
$ haveapi-fs https://api.vpsfree.cz /mnt/api.vpsfree.cz -o version=7.0 -o auth_method=token,token=yourtoken
# Note that the file system can read config file from haveapi-client, so if
# you set up authentication there, the file system will use it.
curl
# Acquire the token
$ curl --request POST \
--header 'Content-Type: application/json' \
--data-binary "{
\"token\": {
\"user\": \"user\",
\"password\": \"secret\",
\"scope\": \"scope\",
\"lifetime\": \"fixed\"
}
}" \
'https://api.vpsfree.cz/_auth/token/tokens'
# Use a previously acquired token
$ curl --request OPTIONS \
--header 'X-HaveAPI-Auth-Token: thetoken' \
'https://api.vpsfree.cz'
HTTP
POST /_auth/token/tokens HTTP/1.1
Host: api.vpsfree.cz
Content-Type: application/json
{
"token": {
"user": "user",
"password": "secret",
"scope": "scope",
"lifetime": "fixed"
}
}
Oauth2
OAuth2 authorization provider. While OAuth2 support in HaveAPI clients
is limited, it is possible to use your API as an authentication source
and to use OAuth2 tokens to access the API.
HaveAPI partially implements RFC 6749: authorization response type "code"
and token grant types "authorization_code" and "refresh_token". Other
response and grant types are not supported at this time.
The access token can be passed as bearer token according to RFC 6750,
or using a custom HTTP header when the Authorization header is not
practical.
The access and refresh tokens can be revoked as per RFC 7009.
- Authorize URL:
- https://auth.vpsfree.cz/_auth/oauth2/authorize
- Token URL:
- https://auth.vpsfree.cz/_auth/oauth2/token
- Revoke URL:
- https://auth.vpsfree.cz/_auth/oauth2/revoke
Ruby
# OAuth2 is not supported by HaveAPI Ruby client.
JavaScript
import HaveAPI from 'haveapi-client'
var api = new HaveAPI.Client("https://api.vpsfree.cz", {version: "7.0"});
// The JavaScript client must be configured with OAuth2 access token, it does not
// support the authorization procedure to obtain a new access token.
var accessToken = {
access_token: "the access token"
};
// The client is authenticated immediately, no need for a callback
api.authenticate("oauth2", {access_token: accessToken});
PHP
// OAuth2 requires session
session_start();
// Client instance
$api = new \HaveAPI\Client("https://api.vpsfree.cz", "7.0");
// Check if we already have an access token
if (isset($_SESSION["access_token"])) {
// We're already authenticated, reuse the existing access token
$api->authenticate("oauth2", ["access_token" => $_SESSION["access_token"]]);
} else {
// Follow the OAuth2 authorization process to get an access token using
// authorization code
$api->authenticate("oauth2", [
// Client id and secret are given by the API server
"client_id" => "your client id",
"client_secret" => "your client secret",
// This example code should run on the URL below
"redirect_uri" => "https://your-client.tld/oauth2-callback",
// Scopes are specific to the API implementation
"scope" => "all",
]);
$provider = $api->getAuthenticationProvider();
// We don't have authorization code yet, request one
if (!isset($_GET['code'])) {
// Redirect the user to the authorization endpoint
$provider->requestAuthorizationCode();
exit;
} else {
// Request access token using the token endpoint
$provider->requestAccessToken();
// Store the access token in the session
$_SESSION['access_token'] = $provider->jsonSerialize();
}
}
CLI
# OAuth2 is not supported by HaveAPI Ruby CLI.
File system
# OAuth2 is not supported by haveapi-fs.
curl
# See RFC 6749 for authorization process and RFC 6750 for access token usage.
HTTP
# 1) Request authorization code
GET /_auth/oauth2/authorize?response_type=code&client_id=$client_id&state=$state&redirect_uri=$client_redirect_uri HTTP/1.1
Host: api.vpsfree.cz
# 2) The user logs in using this API
# 3) The API then redirects the user back to the client application
GET $client_redirect_uri?code=$authorization_code&state=$state
Host: client-application
# 4) The client application requests access token
POST /_auth/oauth2/token
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code&code=$authorization_code&redirect_uri=$client_redirect_uri&client_id=$client_id&client_secret=$client_secret
Resources
Follows a list of all resources in this API and their actions.
Action state
Browse states of blocking actions
Action state # Cancel
- Path:
- POST /v7.0/action_states/{action_state_id}/cancel
- Description:
- Authentication required:
- no
- Scope:
- action_state#cancel
- Aliases:
- Blocking:
- yes
Input parameters
Output parameters
Action state # Index
- Path:
- GET /v7.0/action_states
- Description:
- List states of pending actions
- Authentication required:
- no
- Scope:
- action_state#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- hash
- Namespace:
- action_state
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Order |
order |
no |
String |
Include- values
- ["newest", "oldest"]
- message
- %{value} cannot be used
|
newest |
|
Output parameters
- Layout:
- hash_list
- Namespace:
- action_states
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Label |
label |
String |
|
Finished |
finished |
Boolean |
|
Status |
status |
Boolean |
Determines whether the action is proceeding or failing |
Current progress |
current |
Integer |
|
Total |
total |
Integer |
The action is finished when current equals to total |
Unit |
unit |
String |
Unit of current and total |
Can cancel |
can_cancel |
Boolean |
When true, execution of this action can be cancelled |
Created at |
created_at |
Datetime |
|
Updated at |
updated_at |
Datetime |
When was the progress last updated |
Action state # Poll
- Path:
- GET /v7.0/action_states/{action_state_id}/poll
- Description:
- Returns when the action is completed or timeout occurs
- Authentication required:
- no
- Scope:
- action_state#poll
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- hash
- Namespace:
- action_state
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Timeout |
timeout |
no |
Float |
|
15 |
in seconds |
Progress |
update_in |
no |
Float |
|
|
number of seconds after which the state is returned if the progress has changed |
Status |
status |
no |
Boolean |
|
|
status to check with if update_in is set |
Current |
current |
no |
Integer |
|
|
progress to check with if update_in is set |
Total |
total |
no |
Integer |
|
|
progress to check with if update_in is set |
Output parameters
- Layout:
- hash
- Namespace:
- action_state
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Label |
label |
String |
|
Finished |
finished |
Boolean |
|
Status |
status |
Boolean |
Determines whether the action is proceeding or failing |
Current progress |
current |
Integer |
|
Total |
total |
Integer |
The action is finished when current equals to total |
Unit |
unit |
String |
Unit of current and total |
Can cancel |
can_cancel |
Boolean |
When true, execution of this action can be cancelled |
Created at |
created_at |
Datetime |
|
Updated at |
updated_at |
Datetime |
When was the progress last updated |
Action state # Show
- Path:
- GET /v7.0/action_states/{action_state_id}
- Description:
- Show state of a pending action
- Authentication required:
- no
- Scope:
- action_state#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- hash
- Namespace:
- action_state
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Label |
label |
String |
|
Finished |
finished |
Boolean |
|
Status |
status |
Boolean |
Determines whether the action is proceeding or failing |
Current progress |
current |
Integer |
|
Total |
total |
Integer |
The action is finished when current equals to total |
Unit |
unit |
String |
Unit of current and total |
Can cancel |
can_cancel |
Boolean |
When true, execution of this action can be cancelled |
Created at |
created_at |
Datetime |
|
Updated at |
updated_at |
Datetime |
When was the progress last updated |
Api server
Manage the API server itself
Api server # Unlock_transaction_signing_key
- Path:
- GET /v7.0/api_servers/unlock_transaction_signing_key
- Description:
- Unlock private key used for signing transactions
- Authentication required:
- yes
- Scope:
- api_server#unlock_transaction_signing_key
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- hash
- Namespace:
- api_server
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Passphrase |
passphrase |
yes |
String |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Output parameters
Cluster
Manage cluster
Cluster # Full_stats
- Path:
- GET /v7.0/cluster/full_stats
- Description:
- Full statistics information
- Authentication required:
- yes
- Scope:
- cluster#full_stats
- Aliases:
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- hash
- Namespace:
- cluster
Label |
Name |
Type |
Description |
Nodes_online |
nodes_online |
Integer |
|
Node_count |
node_count |
Integer |
|
Vps_running |
vps_running |
Integer |
|
Vps_stopped |
vps_stopped |
Integer |
|
Vps_suspended |
vps_suspended |
Integer |
|
Vps_deleted |
vps_deleted |
Integer |
|
Vps_count |
vps_count |
Integer |
|
User_active |
user_active |
Integer |
|
User_suspended |
user_suspended |
Integer |
|
User_deleted |
user_deleted |
Integer |
|
User_count |
user_count |
Integer |
|
Ipv4_used |
ipv4_used |
Integer |
|
Ipv4_count |
ipv4_count |
Integer |
|
Cluster # Generate_migration_keys
- Path:
- POST /v7.0/cluster/generate_migration_keys
- Description:
- Generate ssh keys for VPS migrations where applicable
- Authentication required:
- yes
- Scope:
- cluster#generate_migration_keys
- Aliases:
- Blocking:
- yes
Input parameters
Output parameters
Cluster # Public_stats
- Path:
- GET /v7.0/cluster/public_stats
- Description:
- Public statistics information
- Authentication required:
- no
- Scope:
- cluster#public_stats
- Aliases:
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- cluster
Label |
Name |
Type |
Description |
Number of users |
user_count |
Integer |
|
Number of VPSes |
vps_count |
Integer |
|
Number of free public IPv4 addresses |
ipv4_left |
Integer |
|
Examples
Example #0
Ruby
require 'haveapi-client'
client = HaveAPI::Client.new("https://api.vpsfree.cz", version: "7.0")
reply = client.cluster.public_stats
# reply is an instance of HaveAPI::Client::ResourceInstance
# reply.user_count = 1100
# reply.vps_count = 1560
# reply.ipv4_left = 256
JavaScript
import HaveAPI from 'haveapi-client'
var api = new HaveAPI.Client("https://api.vpsfree.cz", {version: "7.0"});
api.cluster.public_stats(function (client, reply) {
console.log('Response', reply);
// reply is an instance of HaveAPI.Client.ResourceInstance
// reply.user_count = 1100
// reply.vps_count = 1560
// reply.ipv4_left = 256
});
PHP
$api = new \HaveAPI\Client("https://api.vpsfree.cz", "7.0");
$reply = $api->cluster->public_stats();
// $reply is an instance of \HaveAPI\Client\ResourceInstance
// $reply->user_count = 1100
// $reply->vps_count = 1560
// $reply->ipv4_left = 256
CLI
$ haveapi-cli -u https://api.vpsfree.cz --version 7.0 cluster public_stats
Number of users: 1100
Number of VPSes: 1560
Number of free public IPv4 addresses: 256
File system
# Mount the file system
$ haveapi-fs https://api.vpsfree.cz /mnt/api.vpsfree.cz -o version=7.0
# Change to action directory
$ cd /mnt/api.vpsfree.cz/cluster/actions/public_stats
# Execute the action
$ echo 1 > exec
# Query the action's result
$ cat status
1
# Query the output parameters
$ cat output/user_count
1100
$ cat output/vps_count
1560
$ cat output/ipv4_left
256
curl
Request
$ curl --request GET \
--data-binary "{
\"cluster\": {}
}" \
'https://api.vpsfree.cz/v7.0/cluster/public_stats'
Response
{
"status": true,
"message": null,
"response": {
"cluster": {
"user_count": 1100,
"vps_count": 1560,
"ipv4_left": 256
}
},
"errors": null
}
HTTP
Request
GET /v7.0/cluster/public_stats HTTP/1.1
Host: api.vpsfree.cz
Content-Type: application/json
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 175
{
"status": true,
"message": null,
"response": {
"cluster": {
"user_count": 1100,
"vps_count": 1560,
"ipv4_left": 256
}
},
"errors": null
}
Cluster # Search
- Path:
- POST /v7.0/cluster/search
- Description:
- Search users and VPSes by IDs, names and owned objects
- Authentication required:
- yes
- Scope:
- cluster#search
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- hash
- Namespace:
- cluster
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Value |
value |
yes |
String |
Present- empty
- false
- message
- must be present and non-empty
|
|
Value to be searched for |
Output parameters
- Layout:
- hash_list
- Namespace:
- clusters
Label |
Name |
Type |
Description |
Resource |
resource |
String |
Resource name of the located object |
ID |
id |
Integer |
Identifier of the located object |
Attribute |
attribute |
String |
Name of the attribute containing the searched value |
Value |
value |
String |
Located value |
Cluster # Set_maintenance
- Path:
- POST /v7.0/cluster/set_maintenance
- Description:
- Set maintenance lock
- Authentication required:
- yes
- Scope:
- cluster#set_maintenance
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- hash
- Namespace:
- cluster
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Lock |
lock |
yes |
Boolean |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Reason |
reason |
no |
String |
|
|
|
Output parameters
Cluster # Show
- Path:
- GET /v7.0/cluster
- Description:
- Cluster information
- Authentication required:
- yes
- Scope:
- cluster#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- cluster
Label |
Name |
Type |
Description |
Maintenance_lock |
maintenance_lock |
Boolean |
|
Maintenance_lock_reason |
maintenance_lock_reason |
String |
|
Cluster resource
Manage environment resources
Cluster resource # Create
- Path:
- POST /v7.0/cluster_resources
- Description:
- Create an environment resource
- Authentication required:
- yes
- Scope:
- cluster_resource#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- cluster_resource
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Resource name for internal purposes |
name |
no |
String |
|
|
|
Label |
label |
no |
String |
|
|
|
Minimum value |
min |
no |
Integer |
|
|
When an object is allocating a resource, it must use more than minimum |
Maximum value |
max |
no |
Integer |
|
|
When an object is allocating a resource, it must not use more than maximum |
Step size |
stepsize |
no |
Integer |
|
|
Steps in which the objects allocated resource value may be iterated |
Output parameters
Cluster resource # Index
- Path:
- GET /v7.0/cluster_resources
- Description:
- List environment resources
- Authentication required:
- yes
- Scope:
- cluster_resource#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- cluster_resource
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Output parameters
- Layout:
- object_list
- Namespace:
- cluster_resources
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Resource name for internal purposes |
name |
String |
|
Label |
label |
String |
|
Minimum value |
min |
Integer |
When an object is allocating a resource, it must use more than minimum |
Maximum value |
max |
Integer |
When an object is allocating a resource, it must not use more than maximum |
Step size |
stepsize |
Integer |
Steps in which the objects allocated resource value may be iterated |
Cluster resource # Show
- Path:
- GET /v7.0/cluster_resources/{cluster_resource_id}
- Description:
- Show environment resource
- Authentication required:
- yes
- Scope:
- cluster_resource#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- cluster_resource
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Resource name for internal purposes |
name |
String |
|
Label |
label |
String |
|
Minimum value |
min |
Integer |
When an object is allocating a resource, it must use more than minimum |
Maximum value |
max |
Integer |
When an object is allocating a resource, it must not use more than maximum |
Step size |
stepsize |
Integer |
Steps in which the objects allocated resource value may be iterated |
Cluster resource # Update
- Path:
- PUT /v7.0/cluster_resources/{cluster_resource_id}
- Description:
- Update an environment resource
- Authentication required:
- yes
- Scope:
- cluster_resource#update
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- cluster_resource
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Resource name for internal purposes |
name |
no |
String |
|
|
|
Label |
label |
no |
String |
|
|
|
Minimum value |
min |
no |
Integer |
|
|
When an object is allocating a resource, it must use more than minimum |
Maximum value |
max |
no |
Integer |
|
|
When an object is allocating a resource, it must not use more than maximum |
Step size |
stepsize |
no |
Integer |
|
|
Steps in which the objects allocated resource value may be iterated |
Output parameters
- Layout:
- object
- Namespace:
- cluster_resource
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Resource name for internal purposes |
name |
String |
|
Label |
label |
String |
|
Minimum value |
min |
Integer |
When an object is allocating a resource, it must use more than minimum |
Maximum value |
max |
Integer |
When an object is allocating a resource, it must not use more than maximum |
Step size |
stepsize |
Integer |
Steps in which the objects allocated resource value may be iterated |
Cluster resource package
Manage cluster resource packages
Cluster resource package # Create
- Path:
- POST /v7.0/cluster_resource_packages
- Description:
- Create a cluster resource package
- Authentication required:
- yes
- Scope:
- cluster_resource_package#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- cluster_resource_package
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Label |
label |
yes |
String |
Present- empty
- false
- message
- must be present and non-empty
Length- message
- length has to be minimally 2
- min
- 2
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- cluster_resource_package
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Label |
label |
String |
|
Environment |
environment |
Resource |
|
User |
user |
Resource |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Cluster resource package # Delete
- Path:
- DELETE /v7.0/cluster_resource_packages/{cluster_resource_package_id}
- Description:
- Delete a cluster resource package
- Authentication required:
- yes
- Scope:
- cluster_resource_package#delete
- Aliases:
- destroy
- Blocking:
- no
Input parameters
Output parameters
Cluster resource package # Index
- Path:
- GET /v7.0/cluster_resource_packages
- Description:
- List cluster resource packages
- Authentication required:
- yes
- Scope:
- cluster_resource_package#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- cluster_resource_package
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Environment |
environment |
no |
Resource |
|
|
|
User |
user |
no |
Resource |
|
|
|
Output parameters
- Layout:
- object_list
- Namespace:
- cluster_resource_packages
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Label |
label |
String |
|
Environment |
environment |
Resource |
|
User |
user |
Resource |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Cluster resource package # Show
- Path:
- GET /v7.0/cluster_resource_packages/{cluster_resource_package_id}
- Description:
- Show cluster resource package
- Authentication required:
- yes
- Scope:
- cluster_resource_package#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- cluster_resource_package
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Label |
label |
String |
|
Environment |
environment |
Resource |
|
User |
user |
Resource |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Cluster resource package # Update
- Path:
- PUT /v7.0/cluster_resource_packages/{cluster_resource_package_id}
- Description:
- Update a cluster resource package
- Authentication required:
- yes
- Scope:
- cluster_resource_package#update
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- cluster_resource_package
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Label |
label |
yes |
String |
Present- empty
- false
- message
- must be present and non-empty
Length- message
- length has to be minimally 2
- min
- 2
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- cluster_resource_package
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Label |
label |
String |
|
Environment |
environment |
Resource |
|
User |
user |
Resource |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Item
Manage cluster resource package contents
Cluster resource package.Item # Create
- Path:
- POST /v7.0/cluster_resource_packages/{cluster_resource_package_id}/items
- Description:
- Add item to a cluster resource package
- Authentication required:
- yes
- Scope:
- cluster_resource_package.item#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- item
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
ClusterResource |
cluster_resource |
no |
Resource |
|
|
|
Value |
value |
no |
Integer |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- item
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
ClusterResource |
cluster_resource |
Resource |
|
Value |
value |
Integer |
|
Cluster resource package.Item # Delete
- Path:
- DELETE /v7.0/cluster_resource_packages/{cluster_resource_package_id}/items/{item_id}
- Description:
- Delete an item from a cluster resource package
- Authentication required:
- yes
- Scope:
- cluster_resource_package.item#delete
- Aliases:
- destroy
- Blocking:
- no
Input parameters
Output parameters
Cluster resource package.Item # Index
- Path:
- GET /v7.0/cluster_resource_packages/{cluster_resource_package_id}/items
- Description:
- List cluster resource package contents
- Authentication required:
- yes
- Scope:
- cluster_resource_package.item#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- item
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Output parameters
- Layout:
- object_list
- Namespace:
- items
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
ClusterResource |
cluster_resource |
Resource |
|
Value |
value |
Integer |
|
Cluster resource package.Item # Show
- Path:
- GET /v7.0/cluster_resource_packages/{cluster_resource_package_id}/items/{item_id}
- Description:
- Show cluster resource package item
- Authentication required:
- yes
- Scope:
- cluster_resource_package.item#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- item
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
ClusterResource |
cluster_resource |
Resource |
|
Value |
value |
Integer |
|
Cluster resource package.Item # Update
- Path:
- PUT /v7.0/cluster_resource_packages/{cluster_resource_package_id}/items/{item_id}
- Description:
- Update item in a cluster resource package
- Authentication required:
- yes
- Scope:
- cluster_resource_package.item#update
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- item
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Value |
value |
no |
Integer |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- item
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
ClusterResource |
cluster_resource |
Resource |
|
Value |
value |
Integer |
|
Component
Browse vpsAdmin components
Component # Index
- Path:
- GET /v7.0/components
- Description:
- List vpsAdmin components
- Authentication required:
- no
- Scope:
- component#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- component
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Output parameters
- Layout:
- object_list
- Namespace:
- components
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Name |
name |
String |
|
Label |
label |
String |
|
Description |
description |
Text |
|
Component # Show
- Path:
- GET /v7.0/components/{component_id}
- Description:
- Show vpsAdmin component
- Authentication required:
- no
- Scope:
- component#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- component
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Name |
name |
String |
|
Label |
label |
String |
|
Description |
description |
Text |
|
Dataset
Manage datasets
Dataset # Create
- Path:
- POST /v7.0/datasets
- Description:
- Create a subdataset
- Authentication required:
- yes
- Scope:
- dataset#create
- Aliases:
- new
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- dataset
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Name |
name |
yes |
String |
Present- empty
- false
- message
- must be present and non-empty
Format- rx
- \A[a-zA-Z0-9][a-zA-Z0-9_\-:./]{0,254}\z
- match
- true
- description
- message
- '%{value}' is not a valid dataset name
|
|
|
Parent dataset |
dataset |
no |
Resource |
|
|
|
Automount |
automount |
no |
Boolean |
|
false |
Automatically mount newly created datasets under all its parents |
Access time |
atime |
no |
Boolean |
|
false |
Controls whether the access time for files is updated when they are read |
Compression |
compression |
no |
Boolean |
|
true |
Toggle data compression in this dataset |
Record size |
recordsize |
no |
Integer |
|
131072 |
Specifies a suggested block size for files in the file system |
Quota |
quota |
no |
Integer |
|
0 |
Limits the amount of space a dataset and all its descendants can consume |
Reference quota |
refquota |
no |
Integer |
|
0 |
Limits the amount of space a dataset can consume |
Relative access time |
relatime |
no |
Boolean |
|
false |
Access time is only updated if the previous access time was earlier than the current modify or change time or if the existing access time hasn't been updated within the past 24 hours |
Sync |
sync |
no |
String |
Include- values
- ["standard", "disabled"]
- message
- %{value} cannot be used
|
standard |
Controls the behavior of synchronous requests |
NFS share |
sharenfs |
no |
String |
|
|
Controls NFS sharing |
Output parameters
- Layout:
- object
- Namespace:
- dataset
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Name |
name |
String |
|
Parent |
parent |
Resource |
|
User |
user |
Resource |
Dataset owner |
Environment |
environment |
Resource |
The environment in which the dataset is |
Current_history_id |
current_history_id |
Integer |
|
Access time |
atime |
Boolean |
Controls whether the access time for files is updated when they are read |
Compression |
compression |
Boolean |
Toggle data compression in this dataset |
Record size |
recordsize |
Integer |
Specifies a suggested block size for files in the file system |
Quota |
quota |
Integer |
Limits the amount of space a dataset and all its descendants can consume |
Reference quota |
refquota |
Integer |
Limits the amount of space a dataset can consume |
Relative access time |
relatime |
Boolean |
Access time is only updated if the previous access time was earlier than the current modify or change time or if the existing access time hasn't been updated within the past 24 hours |
Sync |
sync |
String |
Controls the behavior of synchronous requests |
NFS share |
sharenfs |
String |
Controls NFS sharing |
Used space |
used |
Integer |
Amount of space used by dataset |
Referenced space |
referenced |
Integer |
Amount of space that is accessible to this dataset |
Available space |
avail |
Integer |
Amount of space left in dataset |
Used compression ratio |
compressratio |
Float |
Compression ratio for used space of this dataset |
Referenced compression ratio |
refcompressratio |
Float |
Compression ratio for referenced space of this dataset |
VPS |
vps |
Resource |
|
Export |
export |
Resource |
|
DatasetExpansion |
dataset_expansion |
Resource |
|
Dataset # Delete
- Path:
- DELETE /v7.0/datasets/{dataset_id}
- Description:
- Destroy a dataset with all its subdatasets and snapshots
- Authentication required:
- yes
- Scope:
- dataset#delete
- Aliases:
- destroy
- Blocking:
- yes
Input parameters
Output parameters
Dataset # Find_by_name
- Path:
- GET /v7.0/datasets/find_by_name
- Description:
- Look up dataset by its name, possibly with a label
- Authentication required:
- yes
- Scope:
- dataset#find_by_name
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- dataset
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Name |
name |
no |
String |
|
|
|
User |
user |
no |
Resource |
|
|
Dataset owner |
Output parameters
- Layout:
- object
- Namespace:
- dataset
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Name |
name |
String |
|
Parent |
parent |
Resource |
|
User |
user |
Resource |
Dataset owner |
Environment |
environment |
Resource |
The environment in which the dataset is |
Current_history_id |
current_history_id |
Integer |
|
Access time |
atime |
Boolean |
Controls whether the access time for files is updated when they are read |
Compression |
compression |
Boolean |
Toggle data compression in this dataset |
Record size |
recordsize |
Integer |
Specifies a suggested block size for files in the file system |
Quota |
quota |
Integer |
Limits the amount of space a dataset and all its descendants can consume |
Reference quota |
refquota |
Integer |
Limits the amount of space a dataset can consume |
Relative access time |
relatime |
Boolean |
Access time is only updated if the previous access time was earlier than the current modify or change time or if the existing access time hasn't been updated within the past 24 hours |
Sync |
sync |
String |
Controls the behavior of synchronous requests |
NFS share |
sharenfs |
String |
Controls NFS sharing |
Used space |
used |
Integer |
Amount of space used by dataset |
Referenced space |
referenced |
Integer |
Amount of space that is accessible to this dataset |
Available space |
avail |
Integer |
Amount of space left in dataset |
Used compression ratio |
compressratio |
Float |
Compression ratio for used space of this dataset |
Referenced compression ratio |
refcompressratio |
Float |
Compression ratio for referenced space of this dataset |
VPS |
vps |
Resource |
|
Export |
export |
Resource |
|
DatasetExpansion |
dataset_expansion |
Resource |
|
Dataset # Index
- Path:
- GET /v7.0/datasets
- Description:
- List datasets
- Authentication required:
- yes
- Scope:
- dataset#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- dataset
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
User |
user |
no |
Resource |
|
|
Dataset owner |
VPS |
vps |
no |
Resource |
|
|
|
Subtree |
dataset |
no |
Resource |
|
|
|
Role |
role |
no |
String |
Include- values
- ["hypervisor", "primary", "backup"]
- message
- %{value} cannot be used
|
|
Show only datasets of certain role |
To depth |
to_depth |
no |
Integer |
|
|
Show only datasets to certain depth |
Output parameters
- Layout:
- object_list
- Namespace:
- datasets
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Name |
name |
String |
|
Parent |
parent |
Resource |
|
User |
user |
Resource |
Dataset owner |
Environment |
environment |
Resource |
The environment in which the dataset is |
Current_history_id |
current_history_id |
Integer |
|
Access time |
atime |
Boolean |
Controls whether the access time for files is updated when they are read |
Compression |
compression |
Boolean |
Toggle data compression in this dataset |
Record size |
recordsize |
Integer |
Specifies a suggested block size for files in the file system |
Quota |
quota |
Integer |
Limits the amount of space a dataset and all its descendants can consume |
Reference quota |
refquota |
Integer |
Limits the amount of space a dataset can consume |
Relative access time |
relatime |
Boolean |
Access time is only updated if the previous access time was earlier than the current modify or change time or if the existing access time hasn't been updated within the past 24 hours |
Sync |
sync |
String |
Controls the behavior of synchronous requests |
NFS share |
sharenfs |
String |
Controls NFS sharing |
Used space |
used |
Integer |
Amount of space used by dataset |
Referenced space |
referenced |
Integer |
Amount of space that is accessible to this dataset |
Available space |
avail |
Integer |
Amount of space left in dataset |
Used compression ratio |
compressratio |
Float |
Compression ratio for used space of this dataset |
Referenced compression ratio |
refcompressratio |
Float |
Compression ratio for referenced space of this dataset |
VPS |
vps |
Resource |
|
Export |
export |
Resource |
|
DatasetExpansion |
dataset_expansion |
Resource |
|
Dataset # Inherit
- Path:
- POST /v7.0/datasets/{dataset_id}/inherit
- Description:
- Inherit dataset property
- Authentication required:
- yes
- Scope:
- dataset#inherit
- Aliases:
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- dataset
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Property |
property |
yes |
String |
Present- empty
- false
- message
- must be present and non-empty
|
|
Name of property to inherit from parent, multiple properties may be separated by a comma |
Output parameters
Dataset # Show
- Path:
- GET /v7.0/datasets/{dataset_id}
- Description:
- Show a dataset
- Authentication required:
- yes
- Scope:
- dataset#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- dataset
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Name |
name |
String |
|
Parent |
parent |
Resource |
|
User |
user |
Resource |
Dataset owner |
Environment |
environment |
Resource |
The environment in which the dataset is |
Current_history_id |
current_history_id |
Integer |
|
Access time |
atime |
Boolean |
Controls whether the access time for files is updated when they are read |
Compression |
compression |
Boolean |
Toggle data compression in this dataset |
Record size |
recordsize |
Integer |
Specifies a suggested block size for files in the file system |
Quota |
quota |
Integer |
Limits the amount of space a dataset and all its descendants can consume |
Reference quota |
refquota |
Integer |
Limits the amount of space a dataset can consume |
Relative access time |
relatime |
Boolean |
Access time is only updated if the previous access time was earlier than the current modify or change time or if the existing access time hasn't been updated within the past 24 hours |
Sync |
sync |
String |
Controls the behavior of synchronous requests |
NFS share |
sharenfs |
String |
Controls NFS sharing |
Used space |
used |
Integer |
Amount of space used by dataset |
Referenced space |
referenced |
Integer |
Amount of space that is accessible to this dataset |
Available space |
avail |
Integer |
Amount of space left in dataset |
Used compression ratio |
compressratio |
Float |
Compression ratio for used space of this dataset |
Referenced compression ratio |
refcompressratio |
Float |
Compression ratio for referenced space of this dataset |
VPS |
vps |
Resource |
|
Export |
export |
Resource |
|
DatasetExpansion |
dataset_expansion |
Resource |
|
Dataset # Update
- Path:
- PUT /v7.0/datasets/{dataset_id}
- Description:
- Update a dataset
- Authentication required:
- yes
- Scope:
- dataset#update
- Aliases:
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- dataset
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Access time |
atime |
no |
Boolean |
|
false |
Controls whether the access time for files is updated when they are read |
Compression |
compression |
no |
Boolean |
|
true |
Toggle data compression in this dataset |
Record size |
recordsize |
no |
Integer |
|
131072 |
Specifies a suggested block size for files in the file system |
Quota |
quota |
no |
Integer |
|
0 |
Limits the amount of space a dataset and all its descendants can consume |
Reference quota |
refquota |
no |
Integer |
|
0 |
Limits the amount of space a dataset can consume |
Relative access time |
relatime |
no |
Boolean |
|
false |
Access time is only updated if the previous access time was earlier than the current modify or change time or if the existing access time hasn't been updated within the past 24 hours |
Sync |
sync |
no |
String |
Include- values
- ["standard", "disabled"]
- message
- %{value} cannot be used
|
standard |
Controls the behavior of synchronous requests |
NFS share |
sharenfs |
no |
String |
|
|
Controls NFS sharing |
Admin override |
admin_override |
no |
Boolean |
|
|
Make it possible to assign more resource than the user actually has |
Admin lock type |
admin_lock_type |
no |
String |
Include- values
- ["no_lock", "absolute", "not_less", "not_more"]
- message
- %{value} cannot be used
|
|
How is the admin lock enforced |
Output parameters
Plan
Manage dataset plans
Dataset.Plan # Create
- Path:
- POST /v7.0/datasets/{dataset_id}/plans
- Description:
- Assign new dataset plan
- Authentication required:
- yes
- Scope:
- dataset.plan#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- plan
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Environment_dataset_plan |
environment_dataset_plan |
yes |
Resource |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- plan
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Environment_dataset_plan |
environment_dataset_plan |
Resource |
|
Dataset.Plan # Delete
- Path:
- DELETE /v7.0/datasets/{dataset_id}/plans/{plan_id}
- Description:
- Remove dataset plan
- Authentication required:
- yes
- Scope:
- dataset.plan#delete
- Aliases:
- destroy
- Blocking:
- no
Input parameters
Output parameters
Dataset.Plan # Index
- Path:
- GET /v7.0/datasets/{dataset_id}/plans
- Description:
- Authentication required:
- yes
- Scope:
- dataset.plan#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- plan
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Output parameters
- Layout:
- object_list
- Namespace:
- plans
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Environment_dataset_plan |
environment_dataset_plan |
Resource |
|
Dataset.Plan # Show
- Path:
- GET /v7.0/datasets/{dataset_id}/plans/{plan_id}
- Description:
- Show dataset plan
- Authentication required:
- yes
- Scope:
- dataset.plan#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- plan
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Environment_dataset_plan |
environment_dataset_plan |
Resource |
|
Property history
View property history
Dataset.Property history # Index
- Path:
- GET /v7.0/datasets/{dataset_id}/property_history
- Description:
- Authentication required:
- yes
- Scope:
- dataset.property_history#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- property_history
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
25 |
Number of objects to retrieve |
From |
from |
no |
Datetime |
|
|
|
To |
to |
no |
Datetime |
|
|
|
Name |
name |
no |
String |
|
|
|
Output parameters
- Layout:
- object_list
- Namespace:
- property_histories
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Name |
name |
String |
|
Value |
value |
Integer |
|
Created_at |
created_at |
Datetime |
|
Dataset.Property history # Show
- Path:
- GET /v7.0/datasets/{dataset_id}/property_history/{property_history_id}
- Description:
- Authentication required:
- yes
- Scope:
- dataset.property_history#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- property_history
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Name |
name |
String |
|
Value |
value |
Integer |
|
Created_at |
created_at |
Datetime |
|
Snapshot
Manage dataset snapshots
Dataset.Snapshot # Create
- Path:
- POST /v7.0/datasets/{dataset_id}/snapshots
- Description:
- Create snapshot
- Authentication required:
- yes
- Scope:
- dataset.snapshot#create
- Aliases:
- new
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- snapshot
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Label |
label |
no |
String |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- snapshot
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Dataset |
dataset |
Resource |
|
Name |
name |
String |
|
Label |
label |
String |
|
Created_at |
created_at |
Datetime |
|
History_id |
history_id |
Integer |
|
Mount |
mount |
Resource |
|
Export |
export |
Resource |
|
Dataset.Snapshot # Delete
- Path:
- DELETE /v7.0/datasets/{dataset_id}/snapshots/{snapshot_id}
- Description:
- Destroy a snapshot
- Authentication required:
- yes
- Scope:
- dataset.snapshot#delete
- Aliases:
- destroy
- Blocking:
- yes
Input parameters
Output parameters
Dataset.Snapshot # Index
- Path:
- GET /v7.0/datasets/{dataset_id}/snapshots
- Description:
- List snapshots
- Authentication required:
- yes
- Scope:
- dataset.snapshot#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- snapshot
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Output parameters
- Layout:
- object_list
- Namespace:
- snapshots
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Dataset |
dataset |
Resource |
|
Name |
name |
String |
|
Label |
label |
String |
|
Created_at |
created_at |
Datetime |
|
History_id |
history_id |
Integer |
|
Mount |
mount |
Resource |
|
Export |
export |
Resource |
|
Dataset.Snapshot # Rollback
- Path:
- POST /v7.0/datasets/{dataset_id}/snapshots/{snapshot_id}/rollback
- Description:
- Rollback to a snapshot
- Authentication required:
- yes
- Scope:
- dataset.snapshot#rollback
- Aliases:
- Blocking:
- yes
Input parameters
Output parameters
Dataset.Snapshot # Show
- Path:
- GET /v7.0/datasets/{dataset_id}/snapshots/{snapshot_id}
- Description:
- Show snapshot
- Authentication required:
- yes
- Scope:
- dataset.snapshot#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- snapshot
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Dataset |
dataset |
Resource |
|
Name |
name |
String |
|
Label |
label |
String |
|
Created_at |
created_at |
Datetime |
|
History_id |
history_id |
Integer |
|
Mount |
mount |
Resource |
|
Export |
export |
Resource |
|
Dataset expansion
Browse dataset expansions
Dataset expansion # Create
- Path:
- POST /v7.0/dataset_expansions
- Description:
- Create dataset expansion
- Authentication required:
- yes
- Scope:
- dataset_expansion#create
- Aliases:
- new
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- dataset_expansion
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Dataset |
dataset |
no |
Resource |
|
|
|
Added space |
added_space |
no |
Integer |
Number- message
- has to be minimally 1
- min
- 1
|
|
|
Enable notifications |
enable_notifications |
no |
Boolean |
|
|
Send emails about the expansion |
Enable shrink |
enable_shrink |
no |
Boolean |
|
|
Automatically shrink the dataset when possible |
Stop VPS |
stop_vps |
no |
Boolean |
|
|
Stop the VPS after extra space is used too long or there are too many expansions |
Max_over_refquota_seconds |
max_over_refquota_seconds |
no |
Integer |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- dataset_expansion
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
VPS |
vps |
Resource |
|
Dataset |
dataset |
Resource |
|
State |
state |
String |
|
Original reference quota |
original_refquota |
Integer |
|
Added space |
added_space |
Integer |
|
Enable notifications |
enable_notifications |
Boolean |
Send emails about the expansion |
Enable shrink |
enable_shrink |
Boolean |
Automatically shrink the dataset when possible |
Stop VPS |
stop_vps |
Boolean |
Stop the VPS after extra space is used too long or there are too many expansions |
Over_refquota_seconds |
over_refquota_seconds |
Integer |
|
Max_over_refquota_seconds |
max_over_refquota_seconds |
Integer |
|
Created_at |
created_at |
Datetime |
|
Dataset expansion # Index
- Path:
- GET /v7.0/dataset_expansions
- Description:
- List dataset expansions
- Authentication required:
- yes
- Scope:
- dataset_expansion#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- dataset_expansion
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Output parameters
- Layout:
- object_list
- Namespace:
- dataset_expansions
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
VPS |
vps |
Resource |
|
Dataset |
dataset |
Resource |
|
State |
state |
String |
|
Original reference quota |
original_refquota |
Integer |
|
Added space |
added_space |
Integer |
|
Enable notifications |
enable_notifications |
Boolean |
Send emails about the expansion |
Enable shrink |
enable_shrink |
Boolean |
Automatically shrink the dataset when possible |
Stop VPS |
stop_vps |
Boolean |
Stop the VPS after extra space is used too long or there are too many expansions |
Over_refquota_seconds |
over_refquota_seconds |
Integer |
|
Max_over_refquota_seconds |
max_over_refquota_seconds |
Integer |
|
Created_at |
created_at |
Datetime |
|
Dataset expansion # Register_expanded
- Path:
- POST /v7.0/dataset_expansions/register_expanded
- Description:
- Create dataset expansion for an already expanded dataset
- Authentication required:
- yes
- Scope:
- dataset_expansion#register_expanded
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- dataset_expansion
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Dataset |
dataset |
no |
Resource |
|
|
|
Original reference quota |
original_refquota |
no |
Integer |
Number- message
- has to be minimally 1
- min
- 1
|
|
|
Enable notifications |
enable_notifications |
no |
Boolean |
|
|
Send emails about the expansion |
Enable shrink |
enable_shrink |
no |
Boolean |
|
|
Automatically shrink the dataset when possible |
Stop VPS |
stop_vps |
no |
Boolean |
|
|
Stop the VPS after extra space is used too long or there are too many expansions |
Max_over_refquota_seconds |
max_over_refquota_seconds |
no |
Integer |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- dataset_expansion
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
VPS |
vps |
Resource |
|
Dataset |
dataset |
Resource |
|
State |
state |
String |
|
Original reference quota |
original_refquota |
Integer |
|
Added space |
added_space |
Integer |
|
Enable notifications |
enable_notifications |
Boolean |
Send emails about the expansion |
Enable shrink |
enable_shrink |
Boolean |
Automatically shrink the dataset when possible |
Stop VPS |
stop_vps |
Boolean |
Stop the VPS after extra space is used too long or there are too many expansions |
Over_refquota_seconds |
over_refquota_seconds |
Integer |
|
Max_over_refquota_seconds |
max_over_refquota_seconds |
Integer |
|
Created_at |
created_at |
Datetime |
|
Dataset expansion # Show
- Path:
- GET /v7.0/dataset_expansions/{dataset_expansion_id}
- Description:
- Show dataset expansion
- Authentication required:
- yes
- Scope:
- dataset_expansion#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- dataset_expansion
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
VPS |
vps |
Resource |
|
Dataset |
dataset |
Resource |
|
State |
state |
String |
|
Original reference quota |
original_refquota |
Integer |
|
Added space |
added_space |
Integer |
|
Enable notifications |
enable_notifications |
Boolean |
Send emails about the expansion |
Enable shrink |
enable_shrink |
Boolean |
Automatically shrink the dataset when possible |
Stop VPS |
stop_vps |
Boolean |
Stop the VPS after extra space is used too long or there are too many expansions |
Over_refquota_seconds |
over_refquota_seconds |
Integer |
|
Max_over_refquota_seconds |
max_over_refquota_seconds |
Integer |
|
Created_at |
created_at |
Datetime |
|
Dataset expansion # Update
- Path:
- PUT /v7.0/dataset_expansions/{dataset_expansion_id}
- Description:
- Update dataset expansion
- Authentication required:
- yes
- Scope:
- dataset_expansion#update
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- dataset_expansion
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Enable notifications |
enable_notifications |
no |
Boolean |
|
|
Send emails about the expansion |
Enable shrink |
enable_shrink |
no |
Boolean |
|
|
Automatically shrink the dataset when possible |
Stop VPS |
stop_vps |
no |
Boolean |
|
|
Stop the VPS after extra space is used too long or there are too many expansions |
Max_over_refquota_seconds |
max_over_refquota_seconds |
no |
Integer |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- dataset_expansion
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
VPS |
vps |
Resource |
|
Dataset |
dataset |
Resource |
|
State |
state |
String |
|
Original reference quota |
original_refquota |
Integer |
|
Added space |
added_space |
Integer |
|
Enable notifications |
enable_notifications |
Boolean |
Send emails about the expansion |
Enable shrink |
enable_shrink |
Boolean |
Automatically shrink the dataset when possible |
Stop VPS |
stop_vps |
Boolean |
Stop the VPS after extra space is used too long or there are too many expansions |
Over_refquota_seconds |
over_refquota_seconds |
Integer |
|
Max_over_refquota_seconds |
max_over_refquota_seconds |
Integer |
|
Created_at |
created_at |
Datetime |
|
History
Browse dataset expansion history
Dataset expansion.History # Create
- Path:
- POST /v7.0/dataset_expansions/{dataset_expansion_id}/history
- Description:
- Add extra space to the dataset
- Authentication required:
- yes
- Scope:
- dataset_expansion.history#create
- Aliases:
- new
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- history
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Added space |
added_space |
no |
Integer |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- history
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Added space |
added_space |
Integer |
|
Original refquota |
original_refquota |
Integer |
|
New refquota |
new_refquota |
Integer |
|
Created at |
created_at |
Datetime |
|
Admin |
admin |
Resource |
|
Dataset expansion.History # Index
- Path:
- GET /v7.0/dataset_expansions/{dataset_expansion_id}/history
- Description:
- List dataset expansion history
- Authentication required:
- yes
- Scope:
- dataset_expansion.history#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- history
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Output parameters
- Layout:
- object_list
- Namespace:
- histories
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Added space |
added_space |
Integer |
|
Original refquota |
original_refquota |
Integer |
|
New refquota |
new_refquota |
Integer |
|
Created at |
created_at |
Datetime |
|
Admin |
admin |
Resource |
|
Dataset expansion.History # Show
- Path:
- GET /v7.0/dataset_expansions/{dataset_expansion_id}/history/{history_id}
- Description:
- Show dataset expansion history
- Authentication required:
- yes
- Scope:
- dataset_expansion.history#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- history
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Added space |
added_space |
Integer |
|
Original refquota |
original_refquota |
Integer |
|
New refquota |
new_refquota |
Integer |
|
Created at |
created_at |
Datetime |
|
Admin |
admin |
Resource |
|
Dataset plan
See dataset plans
Dataset plan # Index
- Path:
- GET /v7.0/dataset_plans
- Description:
- List dataset plans
- Authentication required:
- yes
- Scope:
- dataset_plan#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- dataset_plan
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Output parameters
- Layout:
- object_list
- Namespace:
- dataset_plans
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
Label |
label |
String |
|
Description |
description |
String |
|
Dataset plan # Show
- Path:
- GET /v7.0/dataset_plans/{dataset_plan_id}
- Description:
- Show dataset plan
- Authentication required:
- yes
- Scope:
- dataset_plan#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- dataset_plan
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
Label |
label |
String |
|
Description |
description |
String |
|
Debug
Internal debug actions
Debug # Array_top
- Path:
- GET /v7.0/debugs/array_top
- Description:
- List largest Ruby arrays
- Authentication required:
- yes
- Scope:
- debug#array_top
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- hash
- Namespace:
- debug
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Limit |
limit |
no |
Integer |
|
10 |
|
Output parameters
- Layout:
- hash_list
- Namespace:
- debugs
Label |
Name |
Type |
Description |
Size |
size |
Integer |
|
Sample |
sample |
Custom |
|
Debug # Hash_top
- Path:
- GET /v7.0/debugs/hash_top
- Description:
- List largest Ruby hashes
- Authentication required:
- yes
- Scope:
- debug#hash_top
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- hash
- Namespace:
- debug
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Limit |
limit |
no |
Integer |
|
10 |
|
Output parameters
- Layout:
- hash_list
- Namespace:
- debugs
Label |
Name |
Type |
Description |
Size |
size |
Integer |
|
Sample |
sample |
Custom |
|
Debug # List_object_counts
- Path:
- GET /v7.0/debugs/list_object_counts
- Description:
- List Ruby objects and their counts
- Authentication required:
- yes
- Scope:
- debug#list_object_counts
- Aliases:
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- hash_list
- Namespace:
- debugs
Label |
Name |
Type |
Description |
Object |
object |
String |
|
Count |
count |
Integer |
|
Default object cluster resource
Manage default cluster resources values for objects
Default object cluster resource # Create
- Path:
- POST /v7.0/default_object_cluster_resources
- Description:
- Create a default cluster resource value for object
- Authentication required:
- yes
- Scope:
- default_object_cluster_resource#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- default_object_cluster_resource
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Environment |
environment |
yes |
Resource |
|
|
|
ClusterResource |
cluster_resource |
yes |
Resource |
|
|
|
Class_name |
class_name |
yes |
String |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Value |
value |
yes |
Integer |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- default_object_cluster_resource
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
Environment |
environment |
Resource |
|
ClusterResource |
cluster_resource |
Resource |
|
Class_name |
class_name |
String |
|
Value |
value |
Integer |
|
Default object cluster resource # Delete
- Path:
- DELETE /v7.0/default_object_cluster_resources/{default_object_cluster_resource_id}
- Description:
- Delete default cluster resource value for object
- Authentication required:
- yes
- Scope:
- default_object_cluster_resource#delete
- Aliases:
- destroy
- Blocking:
- no
Input parameters
Output parameters
Default object cluster resource # Index
- Path:
- GET /v7.0/default_object_cluster_resources
- Description:
- List default cluster resource values for objects
- Authentication required:
- yes
- Scope:
- default_object_cluster_resource#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- default_object_cluster_resource
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Environment |
environment |
no |
Resource |
|
|
|
ClusterResource |
cluster_resource |
no |
Resource |
|
|
|
Class_name |
class_name |
no |
String |
|
|
|
Output parameters
- Layout:
- object_list
- Namespace:
- default_object_cluster_resources
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
Environment |
environment |
Resource |
|
ClusterResource |
cluster_resource |
Resource |
|
Class_name |
class_name |
String |
|
Value |
value |
Integer |
|
Default object cluster resource # Show
- Path:
- GET /v7.0/default_object_cluster_resources/{default_object_cluster_resource_id}
- Description:
- Show default cluster resource values for object
- Authentication required:
- yes
- Scope:
- default_object_cluster_resource#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- default_object_cluster_resource
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
Environment |
environment |
Resource |
|
ClusterResource |
cluster_resource |
Resource |
|
Class_name |
class_name |
String |
|
Value |
value |
Integer |
|
Default object cluster resource # Update
- Path:
- PUT /v7.0/default_object_cluster_resources/{default_object_cluster_resource_id}
- Description:
- Update default cluster resource value for object
- Authentication required:
- yes
- Scope:
- default_object_cluster_resource#update
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- default_object_cluster_resource
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Value |
value |
yes |
Integer |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- default_object_cluster_resource
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
Environment |
environment |
Resource |
|
ClusterResource |
cluster_resource |
Resource |
|
Class_name |
class_name |
String |
|
Value |
value |
Integer |
|
Dns record
Manage DNS records
Dns record # Create
- Path:
- POST /v7.0/dns_records
- Description:
- Create a DNS record
- Authentication required:
- yes
- Scope:
- dns_record#create
- Aliases:
- new
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- dns_record
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
DnsZone |
dns_zone |
yes |
Resource |
|
|
|
Name |
name |
no |
String |
|
|
Domain name, @ as alias to origin, * for wildcards |
Type |
type |
yes |
String |
Present- empty
- false
- message
- must be present and non-empty
Include- values
- ["A", "AAAA", "CNAME", "DS", "MX", "NS", "PTR", "SRV", "TXT"]
- message
- %{value} cannot be used
|
|
|
Content |
content |
yes |
String |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
TTL |
ttl |
no |
Integer |
|
|
Optional TTL in seconds, defaults to zone TTL |
Priority |
priority |
no |
Integer |
|
|
Optional priority, used for MX and SRV records |
Comment |
comment |
no |
Text |
Length- message
- length has to be maximally 255
- max
- 255
|
|
Optional comment |
Enabled |
enabled |
no |
Boolean |
|
true |
|
Enable dynamic update |
dynamic_update_enabled |
no |
Boolean |
|
false |
Only for A and AAAA records |
Output parameters
- Layout:
- object
- Namespace:
- dns_record
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
DnsZone |
dns_zone |
Resource |
|
Name |
name |
String |
Domain name, @ as alias to origin, * for wildcards |
Type |
type |
String |
|
Content |
content |
String |
|
TTL |
ttl |
Integer |
Optional TTL in seconds, defaults to zone TTL |
Priority |
priority |
Integer |
Optional priority, used for MX and SRV records |
Comment |
comment |
Text |
Optional comment |
Enabled |
enabled |
Boolean |
|
Enable dynamic update |
dynamic_update_enabled |
Boolean |
Only for A and AAAA records |
Dynamic update URL |
dynamic_update_url |
String |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dns record # Delete
- Path:
- DELETE /v7.0/dns_records/{dns_record_id}
- Description:
- Delete DNS record
- Authentication required:
- yes
- Scope:
- dns_record#delete
- Aliases:
- destroy
- Blocking:
- yes
Input parameters
Output parameters
Dns record # Dynamic_update
- Path:
- GET /v7.0/dns_records/dynamic_update/{access_token}
- Description:
- Update DNS record with the client's address
- Authentication required:
- no
- Scope:
- dns_record#dynamic_update
- Aliases:
- Blocking:
- yes
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- dns_record
Label |
Name |
Type |
Description |
Content |
content |
String |
|
Dns record # Index
- Path:
- GET /v7.0/dns_records
- Description:
- List DNS records
- Authentication required:
- yes
- Scope:
- dns_record#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- dns_record
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
DnsZone |
dns_zone |
no |
Resource |
|
|
|
Output parameters
- Layout:
- object_list
- Namespace:
- dns_records
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
DnsZone |
dns_zone |
Resource |
|
Name |
name |
String |
Domain name, @ as alias to origin, * for wildcards |
Type |
type |
String |
|
Content |
content |
String |
|
TTL |
ttl |
Integer |
Optional TTL in seconds, defaults to zone TTL |
Priority |
priority |
Integer |
Optional priority, used for MX and SRV records |
Comment |
comment |
Text |
Optional comment |
Enabled |
enabled |
Boolean |
|
Enable dynamic update |
dynamic_update_enabled |
Boolean |
Only for A and AAAA records |
Dynamic update URL |
dynamic_update_url |
String |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dns record # Show
- Path:
- GET /v7.0/dns_records/{dns_record_id}
- Description:
- Show DNS record
- Authentication required:
- yes
- Scope:
- dns_record#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- dns_record
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
DnsZone |
dns_zone |
Resource |
|
Name |
name |
String |
Domain name, @ as alias to origin, * for wildcards |
Type |
type |
String |
|
Content |
content |
String |
|
TTL |
ttl |
Integer |
Optional TTL in seconds, defaults to zone TTL |
Priority |
priority |
Integer |
Optional priority, used for MX and SRV records |
Comment |
comment |
Text |
Optional comment |
Enabled |
enabled |
Boolean |
|
Enable dynamic update |
dynamic_update_enabled |
Boolean |
Only for A and AAAA records |
Dynamic update URL |
dynamic_update_url |
String |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dns record # Update
- Path:
- PUT /v7.0/dns_records/{dns_record_id}
- Description:
- Update DNS record
- Authentication required:
- yes
- Scope:
- dns_record#update
- Aliases:
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- dns_record
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Content |
content |
no |
String |
|
|
|
TTL |
ttl |
no |
Integer |
|
|
Optional TTL in seconds, defaults to zone TTL |
Priority |
priority |
no |
Integer |
|
|
Optional priority, used for MX and SRV records |
Comment |
comment |
no |
Text |
Length- message
- length has to be maximally 255
- max
- 255
|
|
Optional comment |
Enabled |
enabled |
no |
Boolean |
|
true |
|
Enable dynamic update |
dynamic_update_enabled |
no |
Boolean |
|
false |
Only for A and AAAA records |
Output parameters
- Layout:
- object
- Namespace:
- dns_record
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
DnsZone |
dns_zone |
Resource |
|
Name |
name |
String |
Domain name, @ as alias to origin, * for wildcards |
Type |
type |
String |
|
Content |
content |
String |
|
TTL |
ttl |
Integer |
Optional TTL in seconds, defaults to zone TTL |
Priority |
priority |
Integer |
Optional priority, used for MX and SRV records |
Comment |
comment |
Text |
Optional comment |
Enabled |
enabled |
Boolean |
|
Enable dynamic update |
dynamic_update_enabled |
Boolean |
Only for A and AAAA records |
Dynamic update URL |
dynamic_update_url |
String |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dns record log
Browse DNS record logs
Dns record log # Index
- Path:
- GET /v7.0/dns_record_logs
- Description:
- List DNS record logs
- Authentication required:
- yes
- Scope:
- dns_record_log#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- dns_record_log
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
User |
user |
no |
Resource |
|
|
|
DNS zone |
dns_zone |
no |
Resource |
|
|
|
DNS zone name |
dns_zone_name |
no |
String |
|
|
|
Change type |
change_type |
no |
String |
Include- values
- ["create_record", "update_record", "delete_record"]
- message
- %{value} cannot be used
|
|
|
Name |
name |
no |
String |
|
|
|
Type |
type |
no |
String |
Include- values
- ["A", "AAAA", "CNAME", "MX", "NS", "PTR", "SRV", "TXT"]
- message
- %{value} cannot be used
|
|
|
Output parameters
- Layout:
- object_list
- Namespace:
- dns_record_logs
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
User |
user |
Resource |
|
Raw_user_id |
raw_user_id |
Integer |
|
DNS zone |
dns_zone |
Resource |
|
DNS zone name |
dns_zone_name |
String |
|
Change type |
change_type |
String |
|
Name |
name |
String |
|
Type |
type |
String |
|
Attribute changes |
attr_changes |
Custom |
|
TransactionChain |
transaction_chain |
Resource |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dns record log # Show
- Path:
- GET /v7.0/dns_record_logs/{dns_record_log_id}
- Description:
- Show DNS record log
- Authentication required:
- yes
- Scope:
- dns_record_log#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- dns_record_log
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
User |
user |
Resource |
|
Raw_user_id |
raw_user_id |
Integer |
|
DNS zone |
dns_zone |
Resource |
|
DNS zone name |
dns_zone_name |
String |
|
Change type |
change_type |
String |
|
Name |
name |
String |
|
Type |
type |
String |
|
Attribute changes |
attr_changes |
Custom |
|
TransactionChain |
transaction_chain |
Resource |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dns resolver
Manage DNS resolvers
Dns resolver # Create
- Path:
- POST /v7.0/dns_resolvers
- Description:
- Create a DNS resolver
- Authentication required:
- yes
- Scope:
- dns_resolver#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- dns_resolver
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
IP address |
ip_addr |
yes |
String |
Present- empty
- false
- message
- must be present and non-empty
|
|
Multiple addresses separated by comma |
Label |
label |
yes |
String |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Is universal? |
is_universal |
yes |
Boolean |
Present- empty
- false
- message
- must be present and non-empty
|
|
Universal resolver is independent on location |
Location |
location |
no |
Resource |
|
|
Location this resolver can be used on |
Output parameters
- Layout:
- object
- Namespace:
- dns_resolver
Label |
Name |
Type |
Description |
ID |
id |
Integer |
DNS resolver ID |
IP address |
ip_addr |
String |
Multiple addresses separated by comma |
Label |
label |
String |
|
Is universal? |
is_universal |
Boolean |
Universal resolver is independent on location |
Location |
location |
Resource |
Location this resolver can be used on |
Dns resolver # Delete
- Path:
- DELETE /v7.0/dns_resolvers/{dns_resolver_id}
- Description:
- Authentication required:
- yes
- Scope:
- dns_resolver#delete
- Aliases:
- destroy
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- dns_resolver
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Force deletion |
force |
no |
Boolean |
|
|
Delete the DNS resolver even it is in use. Affected VPSes get a new DNS resolver. |
Output parameters
Dns resolver # Index
- Path:
- GET /v7.0/dns_resolvers
- Description:
- List DNS resolvers
- Authentication required:
- yes
- Scope:
- dns_resolver#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- dns_resolver
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
VPS |
vps |
no |
Resource |
|
|
List DNS resolvers usable for a specific VPS |
Output parameters
- Layout:
- object_list
- Namespace:
- dns_resolvers
Label |
Name |
Type |
Description |
ID |
id |
Integer |
DNS resolver ID |
IP address |
ip_addr |
String |
Multiple addresses separated by comma |
Label |
label |
String |
|
Is universal? |
is_universal |
Boolean |
Universal resolver is independent on location |
Location |
location |
Resource |
Location this resolver can be used on |
Examples
Example #0
Ruby
require 'haveapi-client'
client = HaveAPI::Client.new("https://api.vpsfree.cz", version: "7.0")
reply = client.dns_resolver.index
# reply is an instance of HaveAPI::Client::ResourceInstanceList,
# which is a subclass of Array
JavaScript
import HaveAPI from 'haveapi-client'
var api = new HaveAPI.Client("https://api.vpsfree.cz", {version: "7.0"});
api.dns_resolver.index(function (client, reply) {
console.log('Response', reply);
// reply is an instance of HaveAPI.Client.ResourceInstanceList
});
PHP
$api = new \HaveAPI\Client("https://api.vpsfree.cz", "7.0");
$reply = $api->dns_resolver->index();
// $reply is an instance of \HaveAPI\Client\ResourceInstanceList
CLI
$ haveapi-cli -u https://api.vpsfree.cz --version 7.0 dns_resolver index
ID: 26
IP address: 8.8.8.8
Label: Google DNS
Is universal?: true
Location: -
File system
# Mount the file system
$ haveapi-fs https://api.vpsfree.cz /mnt/api.vpsfree.cz -o version=7.0
# Change to action directory
$ cd /mnt/api.vpsfree.cz/dns_resolver/actions/index
# Execute the action
$ echo 1 > exec
# Query the action's result
$ cat status
1
curl
Request
$ curl --request GET \
--data-binary "{
\"dns_resolver\": {}
}" \
'https://api.vpsfree.cz/v7.0/dns_resolvers'
Response
{
"status": true,
"message": null,
"response": {
"dns_resolvers": [
{
"id": 26,
"ip_addr": "8.8.8.8",
"label": "Google DNS",
"is_universal": true,
"location": null
}
]
},
"errors": null
}
HTTP
Request
GET /v7.0/dns_resolvers HTTP/1.1
Host: api.vpsfree.cz
Content-Type: application/json
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 257
{
"status": true,
"message": null,
"response": {
"dns_resolvers": [
{
"id": 26,
"ip_addr": "8.8.8.8",
"label": "Google DNS",
"is_universal": true,
"location": null
}
]
},
"errors": null
}
Dns resolver # Show
- Path:
- GET /v7.0/dns_resolvers/{dns_resolver_id}
- Description:
- Show DNS resolver
- Authentication required:
- yes
- Scope:
- dns_resolver#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- dns_resolver
Label |
Name |
Type |
Description |
ID |
id |
Integer |
DNS resolver ID |
IP address |
ip_addr |
String |
Multiple addresses separated by comma |
Label |
label |
String |
|
Is universal? |
is_universal |
Boolean |
Universal resolver is independent on location |
Location |
location |
Resource |
Location this resolver can be used on |
Dns resolver # Update
- Path:
- PUT /v7.0/dns_resolvers/{dns_resolver_id}
- Description:
- Authentication required:
- yes
- Scope:
- dns_resolver#update
- Aliases:
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- dns_resolver
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
IP address |
ip_addr |
no |
String |
|
|
Multiple addresses separated by comma |
Label |
label |
no |
String |
|
|
|
Is universal? |
is_universal |
no |
Boolean |
|
|
Universal resolver is independent on location |
Location |
location |
no |
Resource |
|
|
Location this resolver can be used on |
Output parameters
- Layout:
- object
- Namespace:
- dns_resolver
Label |
Name |
Type |
Description |
ID |
id |
Integer |
DNS resolver ID |
IP address |
ip_addr |
String |
Multiple addresses separated by comma |
Label |
label |
String |
|
Is universal? |
is_universal |
Boolean |
Universal resolver is independent on location |
Location |
location |
Resource |
Location this resolver can be used on |
Dns server
Manage authoritative DNS servers
Dns server # Create
- Path:
- POST /v7.0/dns_servers
- Description:
- Create an authoritative DNS server
- Authentication required:
- yes
- Scope:
- dns_server#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- dns_server
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Node |
node |
yes |
Resource |
|
|
|
Name |
name |
yes |
String |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Ipv4_addr |
ipv4_addr |
no |
String |
|
|
|
Ipv6_addr |
ipv6_addr |
no |
String |
|
|
|
Hidden |
hidden |
no |
Boolean |
|
|
|
Enable_user_dns_zones |
enable_user_dns_zones |
no |
Boolean |
|
|
|
User_dns_zone_type |
user_dns_zone_type |
no |
String |
Include- values
- ["primary_type", "secondary_type"]
- message
- %{value} cannot be used
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- dns_server
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
Node |
node |
Resource |
|
Name |
name |
String |
|
Ipv4_addr |
ipv4_addr |
String |
|
Ipv6_addr |
ipv6_addr |
String |
|
Hidden |
hidden |
Boolean |
|
Enable_user_dns_zones |
enable_user_dns_zones |
Boolean |
|
User_dns_zone_type |
user_dns_zone_type |
String |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dns server # Delete
- Path:
- DELETE /v7.0/dns_servers/{dns_server_id}
- Description:
- Delete authoritative DNS server
- Authentication required:
- yes
- Scope:
- dns_server#delete
- Aliases:
- destroy
- Blocking:
- no
Input parameters
Output parameters
Dns server # Index
- Path:
- GET /v7.0/dns_servers
- Description:
- List authoritative DNS servers
- Authentication required:
- yes
- Scope:
- dns_server#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- dns_server
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Output parameters
- Layout:
- object_list
- Namespace:
- dns_servers
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
Node |
node |
Resource |
|
Name |
name |
String |
|
Ipv4_addr |
ipv4_addr |
String |
|
Ipv6_addr |
ipv6_addr |
String |
|
Hidden |
hidden |
Boolean |
|
Enable_user_dns_zones |
enable_user_dns_zones |
Boolean |
|
User_dns_zone_type |
user_dns_zone_type |
String |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dns server # Show
- Path:
- GET /v7.0/dns_servers/{dns_server_id}
- Description:
- Show authoritative DNS server
- Authentication required:
- yes
- Scope:
- dns_server#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- dns_server
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
Node |
node |
Resource |
|
Name |
name |
String |
|
Ipv4_addr |
ipv4_addr |
String |
|
Ipv6_addr |
ipv6_addr |
String |
|
Hidden |
hidden |
Boolean |
|
Enable_user_dns_zones |
enable_user_dns_zones |
Boolean |
|
User_dns_zone_type |
user_dns_zone_type |
String |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dns server # Update
- Path:
- PUT /v7.0/dns_servers/{dns_server_id}
- Description:
- Update authoritative DNS server
- Authentication required:
- yes
- Scope:
- dns_server#update
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- dns_server
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Node |
node |
no |
Resource |
|
|
|
Name |
name |
no |
String |
|
|
|
Ipv4_addr |
ipv4_addr |
no |
String |
|
|
|
Ipv6_addr |
ipv6_addr |
no |
String |
|
|
|
Hidden |
hidden |
no |
Boolean |
|
|
|
Enable_user_dns_zones |
enable_user_dns_zones |
no |
Boolean |
|
|
|
User_dns_zone_type |
user_dns_zone_type |
no |
String |
Include- values
- ["primary_type", "secondary_type"]
- message
- %{value} cannot be used
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- dns_server
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
Node |
node |
Resource |
|
Name |
name |
String |
|
Ipv4_addr |
ipv4_addr |
String |
|
Ipv6_addr |
ipv6_addr |
String |
|
Hidden |
hidden |
Boolean |
|
Enable_user_dns_zones |
enable_user_dns_zones |
Boolean |
|
User_dns_zone_type |
user_dns_zone_type |
String |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dns server zone
Manage authoritative DNS zones on servers
Dns server zone # Create
- Path:
- POST /v7.0/dns_server_zones
- Description:
- Add DNS zone to a server
- Authentication required:
- yes
- Scope:
- dns_server_zone#create
- Aliases:
- new
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- dns_server_zone
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
DnsServer |
dns_server |
no |
Resource |
|
|
|
DnsZone |
dns_zone |
yes |
Resource |
|
|
|
Type |
type |
no |
String |
Include- values
- ["primary_type", "secondary_type"]
- message
- %{value} cannot be used
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- dns_server_zone
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
DnsServer |
dns_server |
Resource |
|
DnsZone |
dns_zone |
Resource |
|
Type |
type |
String |
|
Serial |
serial |
Integer |
|
Loaded_at |
loaded_at |
Datetime |
|
Expires_at |
expires_at |
Datetime |
|
Refresh_at |
refresh_at |
Datetime |
|
Last_check_at |
last_check_at |
Datetime |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dns server zone # Delete
- Path:
- DELETE /v7.0/dns_server_zones/{dns_server_zone_id}
- Description:
- Delete DNS zone from server
- Authentication required:
- yes
- Scope:
- dns_server_zone#delete
- Aliases:
- destroy
- Blocking:
- yes
Input parameters
Output parameters
Dns server zone # Index
- Path:
- GET /v7.0/dns_server_zones
- Description:
- List DNS zones on servers
- Authentication required:
- yes
- Scope:
- dns_server_zone#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- dns_server_zone
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
DnsServer |
dns_server |
no |
Resource |
|
|
|
DnsZone |
dns_zone |
no |
Resource |
|
|
|
Type |
type |
no |
String |
Include- values
- ["primary_type", "secondary_type"]
- message
- %{value} cannot be used
|
|
|
Output parameters
- Layout:
- object_list
- Namespace:
- dns_server_zones
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
DnsServer |
dns_server |
Resource |
|
DnsZone |
dns_zone |
Resource |
|
Type |
type |
String |
|
Serial |
serial |
Integer |
|
Loaded_at |
loaded_at |
Datetime |
|
Expires_at |
expires_at |
Datetime |
|
Refresh_at |
refresh_at |
Datetime |
|
Last_check_at |
last_check_at |
Datetime |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dns server zone # Show
- Path:
- GET /v7.0/dns_server_zones/{dns_server_zone_id}
- Description:
- Show DNS zone on server
- Authentication required:
- yes
- Scope:
- dns_server_zone#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- dns_server_zone
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
DnsServer |
dns_server |
Resource |
|
DnsZone |
dns_zone |
Resource |
|
Type |
type |
String |
|
Serial |
serial |
Integer |
|
Loaded_at |
loaded_at |
Datetime |
|
Expires_at |
expires_at |
Datetime |
|
Refresh_at |
refresh_at |
Datetime |
|
Last_check_at |
last_check_at |
Datetime |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dns tsig key
Manage DNS TSIG key transfers
Dns tsig key # Create
- Path:
- POST /v7.0/dns_tsig_keys
- Description:
- Create a DNS TSIG key
- Authentication required:
- yes
- Scope:
- dns_tsig_key#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- dns_tsig_key
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
User |
user |
no |
Resource |
|
|
|
Name |
name |
no |
String |
Format- rx
- \A[a-zA-Z0-9\-\.]+\z
- match
- true
- description
- message
- %{value} is not a valid TSIG key name
|
|
|
Algorithm |
algorithm |
no |
String |
Include- values
- ["hmac-sha224", "hmac-sha256", "hmac-sha384", "hmac-sha512"]
- message
- %{value} is not a valid TSIG algorithm
|
hmac-sha256 |
|
Output parameters
- Layout:
- object
- Namespace:
- dns_tsig_key
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
User |
user |
Resource |
|
Name |
name |
String |
|
Algorithm |
algorithm |
String |
|
Secret |
secret |
String |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dns tsig key # Delete
- Path:
- DELETE /v7.0/dns_tsig_keys/{dns_tsig_key_id}
- Description:
- Delete DNS TSIG key
- Authentication required:
- yes
- Scope:
- dns_tsig_key#delete
- Aliases:
- destroy
- Blocking:
- no
Input parameters
Output parameters
Dns tsig key # Index
- Path:
- GET /v7.0/dns_tsig_keys
- Description:
- List DNS TSIG key
- Authentication required:
- yes
- Scope:
- dns_tsig_key#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- dns_tsig_key
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
User |
user |
no |
Resource |
|
|
|
Algorithm |
algorithm |
no |
String |
Include- values
- ["hmac-sha224", "hmac-sha256", "hmac-sha384", "hmac-sha512"]
- message
- %{value} is not a valid TSIG algorithm
|
hmac-256 |
|
Output parameters
- Layout:
- object_list
- Namespace:
- dns_tsig_keys
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
User |
user |
Resource |
|
Name |
name |
String |
|
Algorithm |
algorithm |
String |
|
Secret |
secret |
String |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dns tsig key # Show
- Path:
- GET /v7.0/dns_tsig_keys/{dns_tsig_key_id}
- Description:
- Show DNS TSIG key
- Authentication required:
- yes
- Scope:
- dns_tsig_key#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- dns_tsig_key
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
User |
user |
Resource |
|
Name |
name |
String |
|
Algorithm |
algorithm |
String |
|
Secret |
secret |
String |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dns zone
Manage DNS zones
Dns zone # Create
- Path:
- POST /v7.0/dns_zones
- Description:
- Create a DNS zone
- Authentication required:
- yes
- Scope:
- dns_zone#create
- Aliases:
- new
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- dns_zone
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Name |
name |
no |
String |
Format- rx
- \A((?!-)[A-Za-z0-9-]{1,63}(?<!-)\.)+[A-Za-z]{2,63}\.\z
- match
- true
- description
- message
- %{value} is not a valid zone name
|
|
Fully qualified domain name |
User |
user |
no |
Resource |
|
|
|
Reverse_network_address |
reverse_network_address |
no |
String |
|
|
|
Reverse_network_prefix |
reverse_network_prefix |
no |
String |
|
|
|
Label |
label |
no |
String |
|
|
|
Role |
role |
no |
String |
Include- values
- ["forward_role", "reverse_role"]
- message
- %{value} cannot be used
|
|
|
Source |
source |
no |
String |
Include- values
- ["internal_source", "external_source"]
- message
- %{value} cannot be used
|
|
|
Default TTL |
default_ttl |
no |
Integer |
|
|
Default TTL for records, in seconds |
E-mail |
email |
no |
String |
Format- rx
- \A[^@\s]+@[^\s]+\z
- match
- true
- description
- message
- %{value} is not a valid email address
|
|
Administrator of this zone |
Enable DNSSEC |
dnssec_enabled |
no |
Boolean |
|
|
Requires DNSKEY/DS records to be configured in the parent zone |
Enabled |
enabled |
no |
Boolean |
|
|
|
Seed VPS |
seed_vps |
no |
Resource |
|
|
Seed the zone with basic records pointing to the VPS |
Output parameters
- Layout:
- object
- Namespace:
- dns_zone
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
Name |
name |
String |
Fully qualified domain name |
User |
user |
Resource |
|
Reverse_network_address |
reverse_network_address |
String |
|
Reverse_network_prefix |
reverse_network_prefix |
String |
|
Label |
label |
String |
|
Role |
role |
String |
|
Source |
source |
String |
|
Default TTL |
default_ttl |
Integer |
Default TTL for records, in seconds |
E-mail |
email |
String |
Administrator of this zone |
Enable DNSSEC |
dnssec_enabled |
Boolean |
Requires DNSKEY/DS records to be configured in the parent zone |
Enabled |
enabled |
Boolean |
|
Managed |
managed |
Boolean |
|
Serial |
serial |
Integer |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dns zone # Delete
- Path:
- DELETE /v7.0/dns_zones/{dns_zone_id}
- Description:
- Delete DNS zone
- Authentication required:
- yes
- Scope:
- dns_zone#delete
- Aliases:
- destroy
- Blocking:
- yes
Input parameters
Output parameters
Dns zone # Index
- Path:
- GET /v7.0/dns_zones
- Description:
- List DNS zones
- Authentication required:
- yes
- Scope:
- dns_zone#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- dns_zone
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
User |
user |
no |
Resource |
|
|
|
Role |
role |
no |
String |
Include- values
- ["forward_role", "reverse_role"]
- message
- %{value} cannot be used
|
|
|
Source |
source |
no |
String |
Include- values
- ["internal_source", "external_source"]
- message
- %{value} cannot be used
|
|
|
Enable DNSSEC |
dnssec_enabled |
no |
Boolean |
|
|
Requires DNSKEY/DS records to be configured in the parent zone |
Enabled |
enabled |
no |
Boolean |
|
|
|
Output parameters
- Layout:
- object_list
- Namespace:
- dns_zones
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
Name |
name |
String |
Fully qualified domain name |
User |
user |
Resource |
|
Reverse_network_address |
reverse_network_address |
String |
|
Reverse_network_prefix |
reverse_network_prefix |
String |
|
Label |
label |
String |
|
Role |
role |
String |
|
Source |
source |
String |
|
Default TTL |
default_ttl |
Integer |
Default TTL for records, in seconds |
E-mail |
email |
String |
Administrator of this zone |
Enable DNSSEC |
dnssec_enabled |
Boolean |
Requires DNSKEY/DS records to be configured in the parent zone |
Enabled |
enabled |
Boolean |
|
Managed |
managed |
Boolean |
|
Serial |
serial |
Integer |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dns zone # Show
- Path:
- GET /v7.0/dns_zones/{dns_zone_id}
- Description:
- Show DNS zone
- Authentication required:
- yes
- Scope:
- dns_zone#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- dns_zone
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
Name |
name |
String |
Fully qualified domain name |
User |
user |
Resource |
|
Reverse_network_address |
reverse_network_address |
String |
|
Reverse_network_prefix |
reverse_network_prefix |
String |
|
Label |
label |
String |
|
Role |
role |
String |
|
Source |
source |
String |
|
Default TTL |
default_ttl |
Integer |
Default TTL for records, in seconds |
E-mail |
email |
String |
Administrator of this zone |
Enable DNSSEC |
dnssec_enabled |
Boolean |
Requires DNSKEY/DS records to be configured in the parent zone |
Enabled |
enabled |
Boolean |
|
Managed |
managed |
Boolean |
|
Serial |
serial |
Integer |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dns zone # Update
- Path:
- PUT /v7.0/dns_zones/{dns_zone_id}
- Description:
- Update DNS zone
- Authentication required:
- yes
- Scope:
- dns_zone#update
- Aliases:
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- dns_zone
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Label |
label |
no |
String |
|
|
|
Default TTL |
default_ttl |
no |
Integer |
|
|
Default TTL for records, in seconds |
E-mail |
email |
no |
String |
Format- rx
- \A[^@\s]+@[^\s]+\z
- match
- true
- description
- message
- %{value} is not a valid email address
|
|
Administrator of this zone |
Enable DNSSEC |
dnssec_enabled |
no |
Boolean |
|
|
Requires DNSKEY/DS records to be configured in the parent zone |
Enabled |
enabled |
no |
Boolean |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- dns_zone
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
Name |
name |
String |
Fully qualified domain name |
User |
user |
Resource |
|
Reverse_network_address |
reverse_network_address |
String |
|
Reverse_network_prefix |
reverse_network_prefix |
String |
|
Label |
label |
String |
|
Role |
role |
String |
|
Source |
source |
String |
|
Default TTL |
default_ttl |
Integer |
Default TTL for records, in seconds |
E-mail |
email |
String |
Administrator of this zone |
Enable DNSSEC |
dnssec_enabled |
Boolean |
Requires DNSKEY/DS records to be configured in the parent zone |
Enabled |
enabled |
Boolean |
|
Managed |
managed |
Boolean |
|
Serial |
serial |
Integer |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dns zone transfer
Manage DNS zone transfers
Dns zone transfer # Create
- Path:
- POST /v7.0/dns_zone_transfers
- Description:
- Create a DNS zone transfer
- Authentication required:
- yes
- Scope:
- dns_zone_transfer#create
- Aliases:
- new
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- dns_zone_transfer
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
DnsZone |
dns_zone |
no |
Resource |
|
|
|
HostIpAddress |
host_ip_address |
yes |
Resource |
|
|
|
Peer_type |
peer_type |
no |
String |
Include- values
- ["primary_type", "secondary_type"]
- message
- %{value} cannot be used
|
|
|
DnsTsigKey |
dns_tsig_key |
no |
Resource |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- dns_zone_transfer
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
DnsZone |
dns_zone |
Resource |
|
HostIpAddress |
host_ip_address |
Resource |
|
Peer_type |
peer_type |
String |
|
DnsTsigKey |
dns_tsig_key |
Resource |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dns zone transfer # Delete
- Path:
- DELETE /v7.0/dns_zone_transfers/{dns_zone_transfer_id}
- Description:
- Delete DNS zone transfer
- Authentication required:
- yes
- Scope:
- dns_zone_transfer#delete
- Aliases:
- destroy
- Blocking:
- yes
Input parameters
Output parameters
Dns zone transfer # Index
- Path:
- GET /v7.0/dns_zone_transfers
- Description:
- List DNS zone transfers
- Authentication required:
- yes
- Scope:
- dns_zone_transfer#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- dns_zone_transfer
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
DnsZone |
dns_zone |
no |
Resource |
|
|
|
HostIpAddress |
host_ip_address |
no |
Resource |
|
|
|
Peer_type |
peer_type |
no |
String |
Include- values
- ["primary_type", "secondary_type"]
- message
- %{value} cannot be used
|
|
|
DnsTsigKey |
dns_tsig_key |
no |
Resource |
|
|
|
Output parameters
- Layout:
- object_list
- Namespace:
- dns_zone_transfers
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
DnsZone |
dns_zone |
Resource |
|
HostIpAddress |
host_ip_address |
Resource |
|
Peer_type |
peer_type |
String |
|
DnsTsigKey |
dns_tsig_key |
Resource |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dns zone transfer # Show
- Path:
- GET /v7.0/dns_zone_transfers/{dns_zone_transfer_id}
- Description:
- Show DNS zone transfer
- Authentication required:
- yes
- Scope:
- dns_zone_transfer#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- dns_zone_transfer
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
DnsZone |
dns_zone |
Resource |
|
HostIpAddress |
host_ip_address |
Resource |
|
Peer_type |
peer_type |
String |
|
DnsTsigKey |
dns_tsig_key |
Resource |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dnssec record
View DNSSEC DNSKEY/DS records
Dnssec record # Index
- Path:
- GET /v7.0/dnssec_records
- Description:
- List DNSSEC records
- Authentication required:
- yes
- Scope:
- dnssec_record#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- dnssec_record
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
DnsZone |
dns_zone |
no |
Resource |
|
|
|
Output parameters
- Layout:
- object_list
- Namespace:
- dnssec_records
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
DnsZone |
dns_zone |
Resource |
|
Key ID |
keyid |
Integer |
|
DNSKEY algorithm |
dnskey_algorithm |
Integer |
|
DNSKEY public key |
dnskey_pubkey |
String |
|
DS algorithm |
ds_algorithm |
Integer |
|
DS digest type |
ds_digest_type |
Integer |
|
DS digest |
ds_digest |
String |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Dnssec record # Show
- Path:
- GET /v7.0/dnssec_records/{dnssec_record_id}
- Description:
- Show DNSSEC record
- Authentication required:
- yes
- Scope:
- dnssec_record#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- dnssec_record
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
DnsZone |
dns_zone |
Resource |
|
Key ID |
keyid |
Integer |
|
DNSKEY algorithm |
dnskey_algorithm |
Integer |
|
DNSKEY public key |
dnskey_pubkey |
String |
|
DS algorithm |
ds_algorithm |
Integer |
|
DS digest type |
ds_digest_type |
Integer |
|
DS digest |
ds_digest |
String |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Environment
Manage environments
Environment # Create
- Path:
- POST /v7.0/environments
- Description:
- Create new environment
- Authentication required:
- yes
- Scope:
- environment#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- environment
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Label |
label |
no |
String |
|
|
Environment label |
Description |
description |
no |
String |
|
|
Environment description |
Domain |
domain |
no |
String |
Format- rx
- [0-9a-zA-Z\-.]{3,255}
- match
- true
- description
- message
- invalid format
|
|
Environment FQDN, should be subject's root domain |
Can create a VPS |
can_create_vps |
no |
Boolean |
|
false |
|
Can destroy a VPS |
can_destroy_vps |
no |
Boolean |
|
false |
|
Default VPS lifetime |
vps_lifetime |
no |
Integer |
|
0 |
in seconds, 0 is unlimited |
Maximum number of VPS per user |
max_vps_count |
no |
Integer |
|
1 |
0 is unlimited |
User owns IP addresses |
user_ip_ownership |
no |
Boolean |
|
true |
|
Output parameters
- Layout:
- object
- Namespace:
- environment
Label |
Name |
Type |
Description |
ID |
id |
Integer |
Environment ID |
Label |
label |
String |
Environment label |
Description |
description |
String |
Environment description |
Domain |
domain |
String |
Environment FQDN, should be subject's root domain |
Can create a VPS |
can_create_vps |
Boolean |
|
Can destroy a VPS |
can_destroy_vps |
Boolean |
|
Default VPS lifetime |
vps_lifetime |
Integer |
in seconds, 0 is unlimited |
Maximum number of VPS per user |
max_vps_count |
Integer |
0 is unlimited |
User owns IP addresses |
user_ip_ownership |
Boolean |
|
Examples
Example #0
Ruby
require 'haveapi-client'
client = HaveAPI::Client.new("https://api.vpsfree.cz", version: "7.0")
reply = client.environment.create({:label=>"Devel", :domain=>"vpsfree.cz"})
# reply is an instance of HaveAPI::Client::ResourceInstance
# reply.id = 2
JavaScript
import HaveAPI from 'haveapi-client'
var api = new HaveAPI.Client("https://api.vpsfree.cz", {version: "7.0"});
api.environment.create({
"label": "Devel",
"domain": "vpsfree.cz"
}, function (client, reply) {
console.log('Response', reply);
// reply is an instance of HaveAPI.Client.ResourceInstance
// reply.id = 2
});
PHP
$api = new \HaveAPI\Client("https://api.vpsfree.cz", "7.0");
$reply = $api->environment->create([
"label" => "Devel",
"domain" => "vpsfree.cz"
]);
// $reply is an instance of \HaveAPI\Client\ResourceInstance
// $reply->id = 2
CLI
$ haveapi-cli -u https://api.vpsfree.cz --version 7.0 environment create -- \
--label 'Devel' \
--domain 'vpsfree.cz'
ID: 2
Label: -
Description: -
Domain: -
Can create a VPS: -
Can destroy a VPS: -
Default VPS lifetime: -
Maximum number of VPS per user: -
User owns IP addresses: -
File system
# Mount the file system
$ haveapi-fs https://api.vpsfree.cz /mnt/api.vpsfree.cz -o version=7.0
# Change to action directory
$ cd /mnt/api.vpsfree.cz/environment/actions/create
# Prepare input parameters
$ echo 'Devel' > input/label
$ echo 'vpsfree.cz' > input/domain
# Execute the action
$ echo 1 > exec
# Query the action's result
$ cat status
1
# Query the output parameters
$ cat output/id
2
curl
Request
$ curl --request POST \
--data-binary "{
\"environment\": {
\"label\": \"Devel\",
\"domain\": \"vpsfree.cz\"
}
}" \
'https://api.vpsfree.cz/v7.0/environments'
Response
{
"status": true,
"message": null,
"response": {
"environment": {
"id": 2
}
},
"errors": null
}
HTTP
Request
POST /v7.0/environments HTTP/1.1
Host: api.vpsfree.cz
Content-Type: application/json
{
"environment": {
"label": "Devel",
"domain": "vpsfree.cz"
}
}
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 119
{
"status": true,
"message": null,
"response": {
"environment": {
"id": 2
}
},
"errors": null
}
Environment # Index
- Path:
- GET /v7.0/environments
- Description:
- List environments
- Authentication required:
- yes
- Scope:
- environment#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- environment
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Has hypervisor |
has_hypervisor |
no |
Boolean |
|
|
List only environments having at least one hypervisor |
Has storage |
has_storage |
no |
Boolean |
|
|
List only environments having at least one storage |
Output parameters
- Layout:
- object_list
- Namespace:
- environments
Label |
Name |
Type |
Description |
ID |
id |
Integer |
Environment ID |
Label |
label |
String |
Environment label |
Description |
description |
String |
Environment description |
Domain |
domain |
String |
Environment FQDN, should be subject's root domain |
Can create a VPS |
can_create_vps |
Boolean |
|
Can destroy a VPS |
can_destroy_vps |
Boolean |
|
Default VPS lifetime |
vps_lifetime |
Integer |
in seconds, 0 is unlimited |
Maximum number of VPS per user |
max_vps_count |
Integer |
0 is unlimited |
User owns IP addresses |
user_ip_ownership |
Boolean |
|
Maintenance lock |
maintenance_lock |
String |
|
Maintenance reason |
maintenance_lock_reason |
String |
|
Examples
Example #0
Ruby
require 'haveapi-client'
client = HaveAPI::Client.new("https://api.vpsfree.cz", version: "7.0")
reply = client.environment.index
# reply is an instance of HaveAPI::Client::ResourceInstanceList,
# which is a subclass of Array
JavaScript
import HaveAPI from 'haveapi-client'
var api = new HaveAPI.Client("https://api.vpsfree.cz", {version: "7.0"});
api.environment.index(function (client, reply) {
console.log('Response', reply);
// reply is an instance of HaveAPI.Client.ResourceInstanceList
});
PHP
$api = new \HaveAPI\Client("https://api.vpsfree.cz", "7.0");
$reply = $api->environment->index();
// $reply is an instance of \HaveAPI\Client\ResourceInstanceList
CLI
$ haveapi-cli -u https://api.vpsfree.cz --version 7.0 environment index
ID: 1
Label: Production
Description: -
Domain: vpsfree.cz
Can create a VPS: -
Can destroy a VPS: -
Default VPS lifetime: -
Maximum number of VPS per user: -
User owns IP addresses: -
Maintenance lock: -
Maintenance reason: -
File system
# Mount the file system
$ haveapi-fs https://api.vpsfree.cz /mnt/api.vpsfree.cz -o version=7.0
# Change to action directory
$ cd /mnt/api.vpsfree.cz/environment/actions/index
# Execute the action
$ echo 1 > exec
# Query the action's result
$ cat status
1
curl
Request
$ curl --request GET \
--data-binary "{
\"environment\": {}
}" \
'https://api.vpsfree.cz/v7.0/environments'
Response
{
"status": true,
"message": null,
"response": {
"environments": [
{
"id": 1,
"label": "Production",
"domain": "vpsfree.cz"
}
]
},
"errors": null
}
HTTP
Request
GET /v7.0/environments HTTP/1.1
Host: api.vpsfree.cz
Content-Type: application/json
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 201
{
"status": true,
"message": null,
"response": {
"environments": [
{
"id": 1,
"label": "Production",
"domain": "vpsfree.cz"
}
]
},
"errors": null
}
Environment # Set_maintenance
- Path:
- POST /v7.0/environments/{environment_id}/set_maintenance
- Description:
- Set maintenance lock
- Authentication required:
- yes
- Scope:
- environment#set_maintenance
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- hash
- Namespace:
- environment
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Lock |
lock |
yes |
Boolean |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Reason |
reason |
no |
String |
|
|
|
Output parameters
Environment # Show
- Path:
- GET /v7.0/environments/{environment_id}
- Description:
- Show environment
- Authentication required:
- yes
- Scope:
- environment#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- environment
Label |
Name |
Type |
Description |
ID |
id |
Integer |
Environment ID |
Label |
label |
String |
Environment label |
Description |
description |
String |
Environment description |
Domain |
domain |
String |
Environment FQDN, should be subject's root domain |
Can create a VPS |
can_create_vps |
Boolean |
|
Can destroy a VPS |
can_destroy_vps |
Boolean |
|
Default VPS lifetime |
vps_lifetime |
Integer |
in seconds, 0 is unlimited |
Maximum number of VPS per user |
max_vps_count |
Integer |
0 is unlimited |
User owns IP addresses |
user_ip_ownership |
Boolean |
|
Maintenance lock |
maintenance_lock |
String |
|
Maintenance reason |
maintenance_lock_reason |
String |
|
Examples
Example #0
Ruby
require 'haveapi-client'
client = HaveAPI::Client.new("https://api.vpsfree.cz", version: "7.0")
reply = client.environment.show(1)
# reply is an instance of HaveAPI::Client::ResourceInstance
# reply.id = 1
# reply.label = "Production"
# reply.domain = "vpsfree.cz"
JavaScript
import HaveAPI from 'haveapi-client'
var api = new HaveAPI.Client("https://api.vpsfree.cz", {version: "7.0"});
api.environment.show(1, function (client, reply) {
console.log('Response', reply);
// reply is an instance of HaveAPI.Client.ResourceInstance
// reply.id = 1
// reply.label = "Production"
// reply.domain = "vpsfree.cz"
});
PHP
$api = new \HaveAPI\Client("https://api.vpsfree.cz", "7.0");
$reply = $api->environment->show(1);
// $reply is an instance of \HaveAPI\Client\ResourceInstance
// $reply->id = 1
// $reply->label = "Production"
// $reply->domain = "vpsfree.cz"
CLI
$ haveapi-cli -u https://api.vpsfree.cz --version 7.0 environment show 1
ID: 1
Label: Production
Description: -
Domain: vpsfree.cz
Can create a VPS: -
Can destroy a VPS: -
Default VPS lifetime: -
Maximum number of VPS per user: -
User owns IP addresses: -
Maintenance lock: -
Maintenance reason: -
File system
# Mount the file system
$ haveapi-fs https://api.vpsfree.cz /mnt/api.vpsfree.cz -o version=7.0
# Change to action directory
$ cd /mnt/api.vpsfree.cz/environment/actions/show
# Execute the action
$ echo 1 > exec
# Query the action's result
$ cat status
1
# Query the output parameters
$ cat output/id
1
$ cat output/label
Production
$ cat output/domain
vpsfree.cz
curl
Request
$ curl --request GET \
--data-binary "{
\"environment\": {}
}" \
'https://api.vpsfree.cz/v7.0/environments/1'
Response
{
"status": true,
"message": null,
"response": {
"environment": {
"id": 1,
"label": "Production",
"domain": "vpsfree.cz"
}
},
"errors": null
}
HTTP
Request
GET /v7.0/environments/1 HTTP/1.1
Host: api.vpsfree.cz
Content-Type: application/json
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 178
{
"status": true,
"message": null,
"response": {
"environment": {
"id": 1,
"label": "Production",
"domain": "vpsfree.cz"
}
},
"errors": null
}
Environment # Update
- Path:
- PUT /v7.0/environments/{environment_id}
- Description:
- Update environment
- Authentication required:
- yes
- Scope:
- environment#update
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- environment
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Label |
label |
no |
String |
|
|
Environment label |
Description |
description |
no |
String |
|
|
Environment description |
Domain |
domain |
no |
String |
Format- rx
- [0-9a-zA-Z\-.]{3,255}
- match
- true
- description
- message
- invalid format
|
|
Environment FQDN, should be subject's root domain |
Can create a VPS |
can_create_vps |
no |
Boolean |
|
false |
|
Can destroy a VPS |
can_destroy_vps |
no |
Boolean |
|
false |
|
Default VPS lifetime |
vps_lifetime |
no |
Integer |
|
0 |
in seconds, 0 is unlimited |
Maximum number of VPS per user |
max_vps_count |
no |
Integer |
|
1 |
0 is unlimited |
User owns IP addresses |
user_ip_ownership |
no |
Boolean |
|
true |
|
Output parameters
- Layout:
- object
- Namespace:
- environment
Label |
Name |
Type |
Description |
ID |
id |
Integer |
Environment ID |
Label |
label |
String |
Environment label |
Description |
description |
String |
Environment description |
Domain |
domain |
String |
Environment FQDN, should be subject's root domain |
Can create a VPS |
can_create_vps |
Boolean |
|
Can destroy a VPS |
can_destroy_vps |
Boolean |
|
Default VPS lifetime |
vps_lifetime |
Integer |
in seconds, 0 is unlimited |
Maximum number of VPS per user |
max_vps_count |
Integer |
0 is unlimited |
User owns IP addresses |
user_ip_ownership |
Boolean |
|
Examples
Example #0
Ruby
require 'haveapi-client'
client = HaveAPI::Client.new("https://api.vpsfree.cz", version: "7.0")
reply = client.environment.update(1, {:label=>"My new name", :domain=>"new.domain"})
# reply is an instance of HaveAPI::Client::ResourceInstance
JavaScript
import HaveAPI from 'haveapi-client'
var api = new HaveAPI.Client("https://api.vpsfree.cz", {version: "7.0"});
api.environment.update(1, {
"label": "My new name",
"domain": "new.domain"
}, function (client, reply) {
console.log('Response', reply);
// reply is an instance of HaveAPI.Client.ResourceInstance
});
PHP
$api = new \HaveAPI\Client("https://api.vpsfree.cz", "7.0");
$reply = $api->environment->update(1, [
"label" => "My new name",
"domain" => "new.domain"
]);
// $reply is an instance of \HaveAPI\Client\ResourceInstance
CLI
$ haveapi-cli -u https://api.vpsfree.cz --version 7.0 environment update 1 -- \
--label 'My new name' \
--domain 'new.domain'
File system
# Mount the file system
$ haveapi-fs https://api.vpsfree.cz /mnt/api.vpsfree.cz -o version=7.0
# Change to action directory
$ cd /mnt/api.vpsfree.cz/environment/actions/update
# Prepare input parameters
$ echo 'My new name' > input/label
$ echo 'new.domain' > input/domain
# Execute the action
$ echo 1 > exec
# Query the action's result
$ cat status
1
curl
Request
$ curl --request PUT \
--data-binary "{
\"environment\": {
\"label\": \"My new name\",
\"domain\": \"new.domain\"
}
}" \
'https://api.vpsfree.cz/v7.0/environments/1'
Response
{
"status": true,
"message": null,
"response": {
"environment": {}
},
"errors": null
}
HTTP
Request
PUT /v7.0/environments/1 HTTP/1.1
Host: api.vpsfree.cz
Content-Type: application/json
{
"environment": {
"label": "My new name",
"domain": "new.domain"
}
}
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 100
{
"status": true,
"message": null,
"response": {
"environment": {}
},
"errors": null
}
Dataset plan
Manage environment dataset plans
Environment.Dataset plan # Index
- Path:
- GET /v7.0/environments/{environment_id}/dataset_plans
- Description:
- List dataset plans
- Authentication required:
- yes
- Scope:
- environment.dataset_plan#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- dataset_plan
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Output parameters
- Layout:
- object_list
- Namespace:
- dataset_plans
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
Label |
label |
String |
|
DatasetPlan |
dataset_plan |
Resource |
|
User add |
user_add |
Boolean |
If true, the user can add this plan to a dataset |
User remove |
user_remove |
Boolean |
If true, the user can remove this plan from a dataset |
Environment.Dataset plan # Show
- Path:
- GET /v7.0/environments/{environment_id}/dataset_plans/{dataset_plan_id}
- Description:
- Show dataset plan
- Authentication required:
- yes
- Scope:
- environment.dataset_plan#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- dataset_plan
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
Label |
label |
String |
|
DatasetPlan |
dataset_plan |
Resource |
|
User add |
user_add |
Boolean |
If true, the user can add this plan to a dataset |
User remove |
user_remove |
Boolean |
If true, the user can remove this plan from a dataset |
Export
Manage NFS exports
Export # Create
- Path:
- POST /v7.0/exports
- Description:
- Create a new export
- Authentication required:
- yes
- Scope:
- export#create
- Aliases:
- new
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- export
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Dataset |
dataset |
no |
Resource |
|
|
|
Snapshot |
snapshot |
no |
Resource |
|
|
|
All VPS |
all_vps |
no |
Boolean |
|
true |
Let all user's VPS to mount this export. Changes to the user's IP addresses will automatically add or remove allowed hosts on the export. |
Read-write |
rw |
no |
Boolean |
|
true |
Allow the export to be mounted as read-write. |
Sync |
sync |
no |
Boolean |
|
true |
Determines whether the server replies to requests only after the changes have been committed to stable storage. |
Subtree check |
subtree_check |
no |
Boolean |
|
false |
See man exports(5). |
Root squash |
root_squash |
no |
Boolean |
|
false |
Map requests from uid/gid 0 to the anonymous uid/gid. Note that this does not apply to any other uids or gids that might be equally sensitive. |
Threads |
threads |
no |
Integer |
Number- message
- has to be in range <1, 64>
- min
- 1
- max
- 64
|
8 |
Number of NFS server threads. |
Enabled |
enabled |
no |
Boolean |
|
true |
|
Output parameters
- Layout:
- object
- Namespace:
- export
Label |
Name |
Type |
Description |
Export ID |
id |
Integer |
|
Dataset |
dataset |
Resource |
|
Snapshot |
snapshot |
Resource |
|
User |
user |
Resource |
|
IpAddress |
ip_address |
Resource |
|
HostIpAddress |
host_ip_address |
Resource |
|
Path |
path |
String |
|
All VPS |
all_vps |
Boolean |
Let all user's VPS to mount this export. Changes to the user's IP addresses will automatically add or remove allowed hosts on the export. |
Read-write |
rw |
Boolean |
Allow the export to be mounted as read-write. |
Sync |
sync |
Boolean |
Determines whether the server replies to requests only after the changes have been committed to stable storage. |
Subtree check |
subtree_check |
Boolean |
See man exports(5). |
Root squash |
root_squash |
Boolean |
Map requests from uid/gid 0 to the anonymous uid/gid. Note that this does not apply to any other uids or gids that might be equally sensitive. |
Threads |
threads |
Integer |
Number of NFS server threads. |
Enabled |
enabled |
Boolean |
|
Expiration date |
expiration_date |
Datetime |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Export # Delete
- Path:
- DELETE /v7.0/exports/{export_id}
- Description:
- Delete export
- Authentication required:
- yes
- Scope:
- export#delete
- Aliases:
- destroy
- Blocking:
- yes
Input parameters
Output parameters
Export # Index
- Path:
- GET /v7.0/exports
- Description:
- List exports
- Authentication required:
- yes
- Scope:
- export#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- export
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
User |
user |
no |
Resource |
|
|
|
Output parameters
- Layout:
- object_list
- Namespace:
- exports
Label |
Name |
Type |
Description |
Export ID |
id |
Integer |
|
Dataset |
dataset |
Resource |
|
Snapshot |
snapshot |
Resource |
|
User |
user |
Resource |
|
IpAddress |
ip_address |
Resource |
|
HostIpAddress |
host_ip_address |
Resource |
|
Path |
path |
String |
|
All VPS |
all_vps |
Boolean |
Let all user's VPS to mount this export. Changes to the user's IP addresses will automatically add or remove allowed hosts on the export. |
Read-write |
rw |
Boolean |
Allow the export to be mounted as read-write. |
Sync |
sync |
Boolean |
Determines whether the server replies to requests only after the changes have been committed to stable storage. |
Subtree check |
subtree_check |
Boolean |
See man exports(5). |
Root squash |
root_squash |
Boolean |
Map requests from uid/gid 0 to the anonymous uid/gid. Note that this does not apply to any other uids or gids that might be equally sensitive. |
Threads |
threads |
Integer |
Number of NFS server threads. |
Enabled |
enabled |
Boolean |
|
Expiration date |
expiration_date |
Datetime |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Export # Show
- Path:
- GET /v7.0/exports/{export_id}
- Description:
- Authentication required:
- yes
- Scope:
- export#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- export
Label |
Name |
Type |
Description |
Export ID |
id |
Integer |
|
Dataset |
dataset |
Resource |
|
Snapshot |
snapshot |
Resource |
|
User |
user |
Resource |
|
IpAddress |
ip_address |
Resource |
|
HostIpAddress |
host_ip_address |
Resource |
|
Path |
path |
String |
|
All VPS |
all_vps |
Boolean |
Let all user's VPS to mount this export. Changes to the user's IP addresses will automatically add or remove allowed hosts on the export. |
Read-write |
rw |
Boolean |
Allow the export to be mounted as read-write. |
Sync |
sync |
Boolean |
Determines whether the server replies to requests only after the changes have been committed to stable storage. |
Subtree check |
subtree_check |
Boolean |
See man exports(5). |
Root squash |
root_squash |
Boolean |
Map requests from uid/gid 0 to the anonymous uid/gid. Note that this does not apply to any other uids or gids that might be equally sensitive. |
Threads |
threads |
Integer |
Number of NFS server threads. |
Enabled |
enabled |
Boolean |
|
Expiration date |
expiration_date |
Datetime |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Export # Update
- Path:
- PUT /v7.0/exports/{export_id}
- Description:
- Edit export
- Authentication required:
- yes
- Scope:
- export#update
- Aliases:
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- export
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
All VPS |
all_vps |
no |
Boolean |
|
|
Let all user's VPS to mount this export. Changes to the user's IP addresses will automatically add or remove allowed hosts on the export. |
Read-write |
rw |
no |
Boolean |
|
|
Allow the export to be mounted as read-write. |
Sync |
sync |
no |
Boolean |
|
|
Determines whether the server replies to requests only after the changes have been committed to stable storage. |
Subtree check |
subtree_check |
no |
Boolean |
|
|
See man exports(5). |
Root squash |
root_squash |
no |
Boolean |
|
|
Map requests from uid/gid 0 to the anonymous uid/gid. Note that this does not apply to any other uids or gids that might be equally sensitive. |
Threads |
threads |
no |
Integer |
Number- message
- has to be in range <1, 64>
- min
- 1
- max
- 64
|
|
Number of NFS server threads. |
Enabled |
enabled |
no |
Boolean |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- export
Label |
Name |
Type |
Description |
Export ID |
id |
Integer |
|
Dataset |
dataset |
Resource |
|
Snapshot |
snapshot |
Resource |
|
User |
user |
Resource |
|
IpAddress |
ip_address |
Resource |
|
HostIpAddress |
host_ip_address |
Resource |
|
Path |
path |
String |
|
All VPS |
all_vps |
Boolean |
Let all user's VPS to mount this export. Changes to the user's IP addresses will automatically add or remove allowed hosts on the export. |
Read-write |
rw |
Boolean |
Allow the export to be mounted as read-write. |
Sync |
sync |
Boolean |
Determines whether the server replies to requests only after the changes have been committed to stable storage. |
Subtree check |
subtree_check |
Boolean |
See man exports(5). |
Root squash |
root_squash |
Boolean |
Map requests from uid/gid 0 to the anonymous uid/gid. Note that this does not apply to any other uids or gids that might be equally sensitive. |
Threads |
threads |
Integer |
Number of NFS server threads. |
Enabled |
enabled |
Boolean |
|
Expiration date |
expiration_date |
Datetime |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Host
Manage allowed hosts
Export.Host # Create
- Path:
- POST /v7.0/exports/{export_id}/hosts
- Description:
- Add a new host
- Authentication required:
- yes
- Scope:
- export.host#create
- Aliases:
- new
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- host
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
IpAddress |
ip_address |
no |
Resource |
|
|
|
Read-write |
rw |
no |
Boolean |
|
|
Allow the export to be mounted as read-write. |
Sync |
sync |
no |
Boolean |
|
|
Determines whether the server replies to requests only after the changes have been committed to stable storage. |
Subtree check |
subtree_check |
no |
Boolean |
|
|
See man exports(5). |
Root squash |
root_squash |
no |
Boolean |
|
|
Map requests from uid/gid 0 to the anonymous uid/gid. Note that this does not apply to any other uids or gids that might be equally sensitive. |
Output parameters
- Layout:
- object
- Namespace:
- host
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
IpAddress |
ip_address |
Resource |
|
Read-write |
rw |
Boolean |
Allow the export to be mounted as read-write. |
Sync |
sync |
Boolean |
Determines whether the server replies to requests only after the changes have been committed to stable storage. |
Subtree check |
subtree_check |
Boolean |
See man exports(5). |
Root squash |
root_squash |
Boolean |
Map requests from uid/gid 0 to the anonymous uid/gid. Note that this does not apply to any other uids or gids that might be equally sensitive. |
Export.Host # Delete
- Path:
- DELETE /v7.0/exports/{export_id}/hosts/{host_id}
- Description:
- Delete host
- Authentication required:
- yes
- Scope:
- export.host#delete
- Aliases:
- destroy
- Blocking:
- yes
Input parameters
Output parameters
Export.Host # Index
- Path:
- GET /v7.0/exports/{export_id}/hosts
- Description:
- List hosts
- Authentication required:
- yes
- Scope:
- export.host#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- host
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Output parameters
- Layout:
- object_list
- Namespace:
- hosts
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
IpAddress |
ip_address |
Resource |
|
Read-write |
rw |
Boolean |
Allow the export to be mounted as read-write. |
Sync |
sync |
Boolean |
Determines whether the server replies to requests only after the changes have been committed to stable storage. |
Subtree check |
subtree_check |
Boolean |
See man exports(5). |
Root squash |
root_squash |
Boolean |
Map requests from uid/gid 0 to the anonymous uid/gid. Note that this does not apply to any other uids or gids that might be equally sensitive. |
Export.Host # Show
- Path:
- GET /v7.0/exports/{export_id}/hosts/{host_id}
- Description:
- Authentication required:
- yes
- Scope:
- export.host#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- host
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
IpAddress |
ip_address |
Resource |
|
Read-write |
rw |
Boolean |
Allow the export to be mounted as read-write. |
Sync |
sync |
Boolean |
Determines whether the server replies to requests only after the changes have been committed to stable storage. |
Subtree check |
subtree_check |
Boolean |
See man exports(5). |
Root squash |
root_squash |
Boolean |
Map requests from uid/gid 0 to the anonymous uid/gid. Note that this does not apply to any other uids or gids that might be equally sensitive. |
Export.Host # Update
- Path:
- PUT /v7.0/exports/{export_id}/hosts/{host_id}
- Description:
- Edit host options
- Authentication required:
- yes
- Scope:
- export.host#update
- Aliases:
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- host
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Read-write |
rw |
no |
Boolean |
|
|
Allow the export to be mounted as read-write. |
Sync |
sync |
no |
Boolean |
|
|
Determines whether the server replies to requests only after the changes have been committed to stable storage. |
Subtree check |
subtree_check |
no |
Boolean |
|
|
See man exports(5). |
Root squash |
root_squash |
no |
Boolean |
|
|
Map requests from uid/gid 0 to the anonymous uid/gid. Note that this does not apply to any other uids or gids that might be equally sensitive. |
Output parameters
- Layout:
- object
- Namespace:
- host
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
IpAddress |
ip_address |
Resource |
|
Read-write |
rw |
Boolean |
Allow the export to be mounted as read-write. |
Sync |
sync |
Boolean |
Determines whether the server replies to requests only after the changes have been committed to stable storage. |
Subtree check |
subtree_check |
Boolean |
See man exports(5). |
Root squash |
root_squash |
Boolean |
Map requests from uid/gid 0 to the anonymous uid/gid. Note that this does not apply to any other uids or gids that might be equally sensitive. |
Export outage
Browse exports affected by outages
Export outage # Index
- Path:
- GET /v7.0/export_outages
- Description:
- List exports affected by outage
- Authentication required:
- yes
- Scope:
- export_outage#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- export_outage
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Outage |
outage |
no |
Resource |
|
|
|
Export |
export |
no |
Resource |
|
|
|
User |
user |
no |
Resource |
|
|
|
Environment |
environment |
no |
Resource |
|
|
|
Location |
location |
no |
Resource |
|
|
|
Node |
node |
no |
Resource |
|
|
|
Output parameters
- Layout:
- object_list
- Namespace:
- export_outages
Export outage # Show
- Path:
- GET /v7.0/export_outages/{export_outage_id}
- Description:
- Show export affected by an outage
- Authentication required:
- yes
- Scope:
- export_outage#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- export_outage
Help box
Browse and manage help boxes
Help box # Create
- Path:
- POST /v7.0/help_boxes
- Description:
- Create a help box
- Authentication required:
- yes
- Scope:
- help_box#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- help_box
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Page |
page |
no |
String |
|
|
|
Action |
action |
no |
String |
|
|
|
Language |
language |
no |
Resource |
|
|
|
Content |
content |
yes |
Text |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Order |
order |
no |
Integer |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- help_box
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Page |
page |
String |
|
Action |
action |
String |
|
Language |
language |
Resource |
|
Content |
content |
Text |
|
Order |
order |
Integer |
|
Help box # Delete
- Path:
- DELETE /v7.0/help_boxes/{help_box_id}
- Description:
- Delete help box
- Authentication required:
- yes
- Scope:
- help_box#delete
- Aliases:
- destroy
- Blocking:
- no
Input parameters
Output parameters
Help box # Index
- Path:
- GET /v7.0/help_boxes
- Description:
- List help boxes
- Authentication required:
- no
- Scope:
- help_box#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- help_box
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Page |
page |
no |
String |
|
|
|
Action |
action |
no |
String |
|
|
|
Language |
language |
no |
Resource |
|
|
|
View |
view |
no |
Boolean |
|
false |
When enabled, list help boxes for the current user, including page/action filters |
Output parameters
- Layout:
- object_list
- Namespace:
- help_boxes
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Page |
page |
String |
|
Action |
action |
String |
|
Language |
language |
Resource |
|
Content |
content |
Text |
|
Order |
order |
Integer |
|
Help box # Show
- Path:
- GET /v7.0/help_boxes/{help_box_id}
- Description:
- Show helpbox
- Authentication required:
- no
- Scope:
- help_box#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- help_box
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Page |
page |
String |
|
Action |
action |
String |
|
Language |
language |
Resource |
|
Content |
content |
Text |
|
Order |
order |
Integer |
|
Help box # Update
- Path:
- PUT /v7.0/help_boxes/{help_box_id}
- Description:
- Update help box
- Authentication required:
- yes
- Scope:
- help_box#update
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- help_box
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Page |
page |
no |
String |
|
|
|
Action |
action |
no |
String |
|
|
|
Language |
language |
no |
Resource |
|
|
|
Content |
content |
no |
Text |
|
|
|
Order |
order |
no |
Integer |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- help_box
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Page |
page |
String |
|
Action |
action |
String |
|
Language |
language |
Resource |
|
Content |
content |
Text |
|
Order |
order |
Integer |
|
Host ip address
Manage interface IP addresses
Host ip address # Assign
- Path:
- POST /v7.0/host_ip_addresses/{host_ip_address_id}/assign
- Description:
- Assign the address to an interface
- Authentication required:
- yes
- Scope:
- host_ip_address#assign
- Aliases:
- Blocking:
- yes
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- host_ip_address
Label |
Name |
Type |
Description |
ID |
id |
Integer |
IP address ID |
IpAddress |
ip_address |
Resource |
|
Address |
addr |
String |
|
Assigned |
assigned |
Boolean |
|
User_created |
user_created |
Boolean |
|
Reverse_record_value |
reverse_record_value |
String |
|
Host ip address # Create
- Path:
- POST /v7.0/host_ip_addresses
- Description:
- Add host IP address
- Authentication required:
- yes
- Scope:
- host_ip_address#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- host_ip_address
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
IpAddress |
ip_address |
yes |
Resource |
|
|
|
Network address |
addr |
yes |
String |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Assigned |
assigned |
no |
Boolean |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- host_ip_address
Label |
Name |
Type |
Description |
ID |
id |
Integer |
IP address ID |
IpAddress |
ip_address |
Resource |
|
Address |
addr |
String |
|
Assigned |
assigned |
Boolean |
|
User_created |
user_created |
Boolean |
|
Reverse_record_value |
reverse_record_value |
String |
|
Host ip address # Delete
- Path:
- DELETE /v7.0/host_ip_addresses/{host_ip_address_id}
- Description:
- Delete host IP address
- Authentication required:
- yes
- Scope:
- host_ip_address#delete
- Aliases:
- destroy
- Blocking:
- yes
Input parameters
Output parameters
Host ip address # Free
- Path:
- POST /v7.0/host_ip_addresses/{host_ip_address_id}/free
- Description:
- Remove the address from its interface
- Authentication required:
- yes
- Scope:
- host_ip_address#free
- Aliases:
- Blocking:
- yes
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- host_ip_address
Label |
Name |
Type |
Description |
ID |
id |
Integer |
IP address ID |
IpAddress |
ip_address |
Resource |
|
Address |
addr |
String |
|
Assigned |
assigned |
Boolean |
|
User_created |
user_created |
Boolean |
|
Reverse_record_value |
reverse_record_value |
String |
|
Host ip address # Index
- Path:
- GET /v7.0/host_ip_addresses
- Description:
- List IP addresses
- Authentication required:
- yes
- Scope:
- host_ip_address#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- host_ip_address
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
IpAddress |
ip_address |
no |
Resource |
|
|
|
NetworkInterface |
network_interface |
no |
Resource |
|
|
|
VPS |
vps |
no |
Resource |
|
|
VPS this IP is assigned to, can be null |
IP version |
version |
no |
Integer |
|
|
4 or 6 |
Network |
network |
no |
Resource |
|
|
|
Location |
location |
no |
Resource |
|
|
Location this IP address is available in |
User |
user |
no |
Resource |
|
|
Filter by owner |
Role |
role |
no |
String |
Include- values
- ["public_access", "private_access"]
- message
- %{value} cannot be used
|
|
|
Purpose |
purpose |
no |
String |
Include- values
- ["any", "vps", "export"]
- message
- %{value} cannot be used
|
|
|
Network address |
addr |
no |
String |
|
|
|
Prefix |
prefix |
no |
Integer |
|
|
|
Size |
size |
no |
Integer |
|
|
|
Assigned |
assigned |
no |
Boolean |
|
|
|
Routed |
routed |
no |
Boolean |
|
|
|
Order |
order |
no |
String |
Include- values
- ["asc", "interface"]
- message
- %{value} cannot be used
|
asc |
|
Output parameters
- Layout:
- object_list
- Namespace:
- host_ip_addresses
Label |
Name |
Type |
Description |
ID |
id |
Integer |
IP address ID |
IpAddress |
ip_address |
Resource |
|
Address |
addr |
String |
|
Assigned |
assigned |
Boolean |
|
User_created |
user_created |
Boolean |
|
Reverse_record_value |
reverse_record_value |
String |
|
Host ip address # Show
- Path:
- GET /v7.0/host_ip_addresses/{host_ip_address_id}
- Description:
- Show interface IP address
- Authentication required:
- yes
- Scope:
- host_ip_address#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- host_ip_address
Label |
Name |
Type |
Description |
ID |
id |
Integer |
IP address ID |
IpAddress |
ip_address |
Resource |
|
Address |
addr |
String |
|
Assigned |
assigned |
Boolean |
|
User_created |
user_created |
Boolean |
|
Reverse_record_value |
reverse_record_value |
String |
|
Host ip address # Update
- Path:
- PUT /v7.0/host_ip_addresses/{host_ip_address_id}
- Description:
- Update host IP address
- Authentication required:
- yes
- Scope:
- host_ip_address#update
- Aliases:
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- host_ip_address
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
IpAddress |
ip_address |
no |
Resource |
|
|
|
Address |
addr |
no |
String |
|
|
|
Assigned |
assigned |
no |
Boolean |
|
|
|
Reverse_record_value |
reverse_record_value |
no |
String |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- host_ip_address
Label |
Name |
Type |
Description |
ID |
id |
Integer |
IP address ID |
IpAddress |
ip_address |
Resource |
|
Address |
addr |
String |
|
Assigned |
assigned |
Boolean |
|
User_created |
user_created |
Boolean |
|
Reverse_record_value |
reverse_record_value |
String |
|
Incident report
Manage incident reports
Incident report # Create
- Path:
- POST /v7.0/incident_reports
- Description:
- Create incident report
- Authentication required:
- yes
- Scope:
- incident_report#create
- Aliases:
- new
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- incident_report
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
VPS |
vps |
yes |
Resource |
|
|
|
IP address assignment |
ip_address_assignment |
no |
Resource |
|
|
|
Subject |
subject |
yes |
String |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Text |
text |
yes |
Text |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Codename |
codename |
no |
String |
|
|
|
CPU limit |
cpu_limit |
no |
Integer |
|
|
|
Detected_at |
detected_at |
no |
Datetime |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- incident_report
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
User |
user |
Resource |
|
VPS |
vps |
Resource |
|
IP address assignment |
ip_address_assignment |
Resource |
|
Filed_by |
filed_by |
Resource |
|
Mailbox |
mailbox |
Resource |
|
Subject |
subject |
String |
|
Text |
text |
Text |
|
Codename |
codename |
String |
|
CPU limit |
cpu_limit |
Integer |
|
Raw_user_id |
raw_user_id |
Integer |
|
Raw_vps_id |
raw_vps_id |
Integer |
|
Detected_at |
detected_at |
Datetime |
|
Created_at |
created_at |
Datetime |
|
Reported_at |
reported_at |
Datetime |
|
Incident report # Index
- Path:
- GET /v7.0/incident_reports
- Description:
- List incident reports
- Authentication required:
- yes
- Scope:
- incident_report#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- incident_report
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
User |
user |
no |
Resource |
|
|
|
VPS |
vps |
no |
Resource |
|
|
|
IP address assignment |
ip_address_assignment |
no |
Resource |
|
|
|
Filed_by |
filed_by |
no |
Resource |
|
|
|
Mailbox |
mailbox |
no |
Resource |
|
|
|
Codename |
codename |
no |
String |
|
|
|
IP address |
ip_addr |
no |
String |
|
|
|
Output parameters
- Layout:
- object_list
- Namespace:
- incident_reports
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
User |
user |
Resource |
|
VPS |
vps |
Resource |
|
IP address assignment |
ip_address_assignment |
Resource |
|
Filed_by |
filed_by |
Resource |
|
Mailbox |
mailbox |
Resource |
|
Subject |
subject |
String |
|
Text |
text |
Text |
|
Codename |
codename |
String |
|
CPU limit |
cpu_limit |
Integer |
|
Raw_user_id |
raw_user_id |
Integer |
|
Raw_vps_id |
raw_vps_id |
Integer |
|
Detected_at |
detected_at |
Datetime |
|
Created_at |
created_at |
Datetime |
|
Reported_at |
reported_at |
Datetime |
|
Incident report # Show
- Path:
- GET /v7.0/incident_reports/{incident_report_id}
- Description:
- Show incident report
- Authentication required:
- yes
- Scope:
- incident_report#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- incident_report
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
User |
user |
Resource |
|
VPS |
vps |
Resource |
|
IP address assignment |
ip_address_assignment |
Resource |
|
Filed_by |
filed_by |
Resource |
|
Mailbox |
mailbox |
Resource |
|
Subject |
subject |
String |
|
Text |
text |
Text |
|
Codename |
codename |
String |
|
CPU limit |
cpu_limit |
Integer |
|
Raw_user_id |
raw_user_id |
Integer |
|
Raw_vps_id |
raw_vps_id |
Integer |
|
Detected_at |
detected_at |
Datetime |
|
Created_at |
created_at |
Datetime |
|
Reported_at |
reported_at |
Datetime |
|
Incoming payment
Browse incoming payments
Incoming payment # Index
- Path:
- GET /v7.0/incoming_payments
- Description:
- List incoming payments
- Authentication required:
- yes
- Scope:
- incoming_payment#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- incoming_payment
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
25 |
Number of objects to retrieve |
State |
state |
no |
String |
Include- values
- ["queued", "unmatched", "processed", "ignored"]
- message
- %{value} cannot be used
|
|
|
Output parameters
- Layout:
- object_list
- Namespace:
- incoming_payments
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Transaction_id |
transaction_id |
String |
|
State |
state |
String |
|
Date |
date |
Datetime |
|
Amount |
amount |
Integer |
|
Currency |
currency |
String |
|
Src_amount |
src_amount |
Integer |
|
Src_currency |
src_currency |
String |
|
Account_name |
account_name |
String |
|
User_ident |
user_ident |
String |
|
User_message |
user_message |
String |
|
Vs |
vs |
String |
|
Ks |
ks |
String |
|
Ss |
ss |
String |
|
Transaction_type |
transaction_type |
String |
|
Comment |
comment |
String |
|
Created_at |
created_at |
Datetime |
|
Incoming payment # Show
- Path:
- GET /v7.0/incoming_payments/{incoming_payment_id}
- Description:
- Show incoming payment
- Authentication required:
- yes
- Scope:
- incoming_payment#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- incoming_payment
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Transaction_id |
transaction_id |
String |
|
State |
state |
String |
|
Date |
date |
Datetime |
|
Amount |
amount |
Integer |
|
Currency |
currency |
String |
|
Src_amount |
src_amount |
Integer |
|
Src_currency |
src_currency |
String |
|
Account_name |
account_name |
String |
|
User_ident |
user_ident |
String |
|
User_message |
user_message |
String |
|
Vs |
vs |
String |
|
Ks |
ks |
String |
|
Ss |
ss |
String |
|
Transaction_type |
transaction_type |
String |
|
Comment |
comment |
String |
|
Created_at |
created_at |
Datetime |
|
Incoming payment # Update
- Path:
- PUT /v7.0/incoming_payments/{incoming_payment_id}
- Description:
- Change payment's state
- Authentication required:
- yes
- Scope:
- incoming_payment#update
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- incoming_payment
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
State |
state |
yes |
String |
Include- values
- ["queued", "unmatched", "processed", "ignored"]
- message
- %{value} cannot be used
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- incoming_payment
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Transaction_id |
transaction_id |
String |
|
State |
state |
String |
|
Date |
date |
Datetime |
|
Amount |
amount |
Integer |
|
Currency |
currency |
String |
|
Src_amount |
src_amount |
Integer |
|
Src_currency |
src_currency |
String |
|
Account_name |
account_name |
String |
|
User_ident |
user_ident |
String |
|
User_message |
user_message |
String |
|
Vs |
vs |
String |
|
Ks |
ks |
String |
|
Ss |
ss |
String |
|
Transaction_type |
transaction_type |
String |
|
Comment |
comment |
String |
|
Created_at |
created_at |
Datetime |
|
Ip address
Manage IP addresses
Ip address # Assign
- Path:
- POST /v7.0/ip_addresses/{ip_address_id}/assign
- Description:
- Route the address to an interface
- Authentication required:
- yes
- Scope:
- ip_address#assign
- Aliases:
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- ip_address
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
NetworkInterface |
network_interface |
yes |
Resource |
|
|
|
Route_via |
route_via |
no |
Resource |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- ip_address
Label |
Name |
Type |
Description |
ID |
id |
Integer |
IP address ID |
NetworkInterface |
network_interface |
Resource |
|
Network |
network |
Resource |
|
User |
user |
Resource |
|
Address |
addr |
String |
Address itself |
Prefix |
prefix |
Integer |
|
Size |
size |
Integer |
|
Route_via |
route_via |
Resource |
|
Charged environment |
charged_environment |
Resource |
|
Ip address # Assign_with_host_address
- Path:
- POST /v7.0/ip_addresses/{ip_address_id}/assign_with_host_address
- Description:
- Route the address to an interface
- Authentication required:
- yes
- Scope:
- ip_address#assign_with_host_address
- Aliases:
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- ip_address
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
NetworkInterface |
network_interface |
yes |
Resource |
|
|
|
HostIpAddress |
host_ip_address |
no |
Resource |
|
|
Host address to assign to the interface, defaults to the first address |
Output parameters
- Layout:
- object
- Namespace:
- ip_address
Label |
Name |
Type |
Description |
ID |
id |
Integer |
IP address ID |
NetworkInterface |
network_interface |
Resource |
|
Network |
network |
Resource |
|
User |
user |
Resource |
|
Address |
addr |
String |
Address itself |
Prefix |
prefix |
Integer |
|
Size |
size |
Integer |
|
Route_via |
route_via |
Resource |
|
Charged environment |
charged_environment |
Resource |
|
Ip address # Create
- Path:
- POST /v7.0/ip_addresses
- Description:
- Add an IP address
- Authentication required:
- yes
- Scope:
- ip_address#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- ip_address
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
NetworkInterface |
network_interface |
no |
Resource |
|
|
|
Network |
network |
yes |
Resource |
|
|
|
User |
user |
no |
Resource |
|
|
|
Address |
addr |
yes |
String |
Present- empty
- false
- message
- must be present and non-empty
|
|
Address itself |
Prefix |
prefix |
no |
Integer |
|
|
|
Size |
size |
no |
Integer |
|
|
|
Route_via |
route_via |
no |
Resource |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- ip_address
Label |
Name |
Type |
Description |
ID |
id |
Integer |
IP address ID |
NetworkInterface |
network_interface |
Resource |
|
Network |
network |
Resource |
|
User |
user |
Resource |
|
Address |
addr |
String |
Address itself |
Prefix |
prefix |
Integer |
|
Size |
size |
Integer |
|
Route_via |
route_via |
Resource |
|
Charged environment |
charged_environment |
Resource |
|
Ip address # Free
- Path:
- POST /v7.0/ip_addresses/{ip_address_id}/free
- Description:
- Remove the route from an interface
- Authentication required:
- yes
- Scope:
- ip_address#free
- Aliases:
- Blocking:
- yes
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- ip_address
Label |
Name |
Type |
Description |
ID |
id |
Integer |
IP address ID |
NetworkInterface |
network_interface |
Resource |
|
Network |
network |
Resource |
|
User |
user |
Resource |
|
Address |
addr |
String |
Address itself |
Prefix |
prefix |
Integer |
|
Size |
size |
Integer |
|
Route_via |
route_via |
Resource |
|
Charged environment |
charged_environment |
Resource |
|
Ip address # Index
- Path:
- GET /v7.0/ip_addresses
- Description:
- List IP addresses
- Authentication required:
- yes
- Scope:
- ip_address#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- ip_address
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
NetworkInterface |
network_interface |
no |
Resource |
|
|
|
VPS |
vps |
no |
Resource |
|
|
VPS this IP is assigned to, can be null |
IP version |
version |
no |
Integer |
|
|
4 or 6 |
Network |
network |
no |
Resource |
|
|
|
Location |
location |
no |
Resource |
|
|
Location this IP address is available in |
User |
user |
no |
Resource |
|
|
Filter by owner |
Assigned to interface |
assigned_to_interface |
no |
Boolean |
|
|
|
Role |
role |
no |
String |
Include- values
- ["public_access", "private_access"]
- message
- %{value} cannot be used
|
|
|
Purpose |
purpose |
no |
String |
Include- values
- ["any", "vps", "export"]
- message
- %{value} cannot be used
|
|
|
Address |
addr |
no |
String |
|
|
Address itself |
Prefix |
prefix |
no |
Integer |
|
|
|
Size |
size |
no |
Integer |
|
|
|
Order |
order |
no |
String |
Include- values
- ["asc", "interface"]
- message
- %{value} cannot be used
|
asc |
|
Output parameters
- Layout:
- object_list
- Namespace:
- ip_addresses
Label |
Name |
Type |
Description |
ID |
id |
Integer |
IP address ID |
NetworkInterface |
network_interface |
Resource |
|
Network |
network |
Resource |
|
User |
user |
Resource |
|
Address |
addr |
String |
Address itself |
Prefix |
prefix |
Integer |
|
Size |
size |
Integer |
|
Route_via |
route_via |
Resource |
|
Charged environment |
charged_environment |
Resource |
|
Examples
Example #0
List IP addresses assigned to VPS with ID 101.
Ruby
require 'haveapi-client'
client = HaveAPI::Client.new("https://api.vpsfree.cz", version: "7.0")
reply = client.ip_address.index({:vps=>101})
# reply is an instance of HaveAPI::Client::ResourceInstanceList,
# which is a subclass of Array
JavaScript
import HaveAPI from 'haveapi-client'
var api = new HaveAPI.Client("https://api.vpsfree.cz", {version: "7.0"});
api.ip_address.index({
"vps": 101
}, function (client, reply) {
console.log('Response', reply);
// reply is an instance of HaveAPI.Client.ResourceInstanceList
});
PHP
$api = new \HaveAPI\Client("https://api.vpsfree.cz", "7.0");
$reply = $api->ip_address->index([
"vps" => 101
]);
// $reply is an instance of \HaveAPI\Client\ResourceInstanceList
CLI
$ haveapi-cli -u https://api.vpsfree.cz --version 7.0 ip_address index -- \
--vps '101'
ID: 10
NetworkInterface: -
Network: -
User: -
Address: 192.168.0.50
Prefix: -
Size: -
Route_via: -
Charged environment: -
File system
# Mount the file system
$ haveapi-fs https://api.vpsfree.cz /mnt/api.vpsfree.cz -o version=7.0
# Change to action directory
$ cd /mnt/api.vpsfree.cz/ip_address/actions/index
# Prepare input parameters
$ echo '101' > input/vps
# Execute the action
$ echo 1 > exec
# Query the action's result
$ cat status
1
curl
Request
$ curl --request GET \
--data-binary "{
\"ip_address\": {
\"vps\": 101
}
}" \
'https://api.vpsfree.cz/v7.0/ip_addresses?vps=101'
Response
{
"status": true,
"message": null,
"response": {
"ip_addresses": [
{
"id": 10,
"addr": "192.168.0.50"
}
]
},
"errors": null
}
HTTP
Request
GET /v7.0/ip_addresses?vps=101 HTTP/1.1
Host: api.vpsfree.cz
Content-Type: application/json
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 171
{
"status": true,
"message": null,
"response": {
"ip_addresses": [
{
"id": 10,
"addr": "192.168.0.50"
}
]
},
"errors": null
}
Ip address # Show
- Path:
- GET /v7.0/ip_addresses/{ip_address_id}
- Description:
- Show IP address
- Authentication required:
- yes
- Scope:
- ip_address#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- ip_address
Label |
Name |
Type |
Description |
ID |
id |
Integer |
IP address ID |
NetworkInterface |
network_interface |
Resource |
|
Network |
network |
Resource |
|
User |
user |
Resource |
|
Address |
addr |
String |
Address itself |
Prefix |
prefix |
Integer |
|
Size |
size |
Integer |
|
Route_via |
route_via |
Resource |
|
Charged environment |
charged_environment |
Resource |
|
Ip address # Update
- Path:
- PUT /v7.0/ip_addresses/{ip_address_id}
- Description:
- Update IP address
- Authentication required:
- yes
- Scope:
- ip_address#update
- Aliases:
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- ip_address
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
User |
user |
no |
Resource |
|
|
|
Environment |
environment |
no |
Resource |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- ip_address
Label |
Name |
Type |
Description |
ID |
id |
Integer |
IP address ID |
NetworkInterface |
network_interface |
Resource |
|
Network |
network |
Resource |
|
User |
user |
Resource |
|
Address |
addr |
String |
Address itself |
Prefix |
prefix |
Integer |
|
Size |
size |
Integer |
|
Route_via |
route_via |
Resource |
|
Charged environment |
charged_environment |
Resource |
|
Ip address assignment
Browse IP address assignments
Ip address assignment # Index
- Path:
- GET /v7.0/ip_address_assignments
- Description:
- List IP address assignments
- Authentication required:
- yes
- Scope:
- ip_address_assignment#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- ip_address_assignment
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
IpAddress |
ip_address |
no |
Resource |
|
|
|
Ip_addr |
ip_addr |
no |
String |
|
|
|
Ip_prefix |
ip_prefix |
no |
Integer |
|
|
|
User |
user |
no |
Resource |
|
|
|
VPS |
vps |
no |
Resource |
|
|
|
Assigned_by_chain |
assigned_by_chain |
no |
Resource |
|
|
|
Unassigned_by_chain |
unassigned_by_chain |
no |
Resource |
|
|
|
Reconstructed |
reconstructed |
no |
Boolean |
|
|
|
Location |
location |
no |
Resource |
|
|
|
Network |
network |
no |
Resource |
|
|
|
Ip_version |
ip_version |
no |
Integer |
Include- values
- [4, 6]
- message
- %{value} cannot be used
|
|
|
Order |
order |
no |
String |
Include- values
- ["newest", "oldest"]
- message
- %{value} cannot be used
|
newest |
|
Active |
active |
no |
Boolean |
|
|
|
Output parameters
- Layout:
- object_list
- Namespace:
- ip_address_assignments
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
IpAddress |
ip_address |
Resource |
|
Ip_addr |
ip_addr |
String |
|
Ip_prefix |
ip_prefix |
Integer |
|
User |
user |
Resource |
|
Raw_user_id |
raw_user_id |
Integer |
|
VPS |
vps |
Resource |
|
Raw_vps_id |
raw_vps_id |
Integer |
|
From_date |
from_date |
Datetime |
|
To_date |
to_date |
Datetime |
|
Assigned_by_chain |
assigned_by_chain |
Resource |
|
Unassigned_by_chain |
unassigned_by_chain |
Resource |
|
Reconstructed |
reconstructed |
Boolean |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Ip address assignment # Show
- Path:
- GET /v7.0/ip_address_assignments/{ip_address_assignment_id}
- Description:
- Show IP address assignment
- Authentication required:
- yes
- Scope:
- ip_address_assignment#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- ip_address_assignment
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
IpAddress |
ip_address |
Resource |
|
Ip_addr |
ip_addr |
String |
|
Ip_prefix |
ip_prefix |
Integer |
|
User |
user |
Resource |
|
Raw_user_id |
raw_user_id |
Integer |
|
VPS |
vps |
Resource |
|
Raw_vps_id |
raw_vps_id |
Integer |
|
From_date |
from_date |
Datetime |
|
To_date |
to_date |
Datetime |
|
Assigned_by_chain |
assigned_by_chain |
Resource |
|
Unassigned_by_chain |
unassigned_by_chain |
Resource |
|
Reconstructed |
reconstructed |
Boolean |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Language
Available languages
Language # Index
- Path:
- GET /v7.0/languages
- Description:
- List languages
- Authentication required:
- no
- Scope:
- language#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- language
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Output parameters
- Layout:
- object_list
- Namespace:
- languages
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Code |
code |
String |
|
Label |
label |
String |
|
Language # Show
- Path:
- GET /v7.0/languages/{language_id}
- Description:
- Show language
- Authentication required:
- yes
- Scope:
- language#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- language
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Code |
code |
String |
|
Label |
label |
String |
|
Location
Manage locations
Location # Create
- Path:
- POST /v7.0/locations
- Description:
- Create new location
- Authentication required:
- yes
- Scope:
- location#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- location
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Label |
label |
no |
String |
|
|
Location label |
Description |
description |
no |
String |
|
|
Location description |
Has IPv6 |
has_ipv6 |
no |
Boolean |
Include- values
- [true, false]
- message
- %{value} cannot be used
|
|
True if location has IPv6 addresses |
Remote console server |
remote_console_server |
no |
String |
Format- rx
- \A(https?://.+)?\z
- match
- true
- description
- message
- invalid format
|
|
URL to HTTP remote console server |
Domain |
domain |
no |
String |
Format- rx
- \A[0-9a-zA-Z\-.]{3,255}\z
- match
- true
- description
- message
- invalid format
|
|
Location domain, subdomain at environment domain |
Environment |
environment |
no |
Resource |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- location
Label |
Name |
Type |
Description |
ID |
id |
Integer |
Location ID |
Label |
label |
String |
Location label |
Description |
description |
String |
Location description |
Has IPv6 |
has_ipv6 |
Boolean |
True if location has IPv6 addresses |
Remote console server |
remote_console_server |
String |
URL to HTTP remote console server |
Domain |
domain |
String |
Location domain, subdomain at environment domain |
Environment |
environment |
Resource |
|
Examples
Example #0
Ruby
require 'haveapi-client'
client = HaveAPI::Client.new("https://api.vpsfree.cz", version: "7.0")
reply = client.location.create({:label=>"Brno", :has_ipv6=>true, :remote_console_server=>"", :domain=>"brq"})
# reply is an instance of HaveAPI::Client::ResourceInstance
# reply.id = 2
JavaScript
import HaveAPI from 'haveapi-client'
var api = new HaveAPI.Client("https://api.vpsfree.cz", {version: "7.0"});
api.location.create({
"label": "Brno",
"has_ipv6": true,
"remote_console_server": "",
"domain": "brq"
}, function (client, reply) {
console.log('Response', reply);
// reply is an instance of HaveAPI.Client.ResourceInstance
// reply.id = 2
});
PHP
$api = new \HaveAPI\Client("https://api.vpsfree.cz", "7.0");
$reply = $api->location->create([
"label" => "Brno",
"has_ipv6" => true,
"remote_console_server" => "",
"domain" => "brq"
]);
// $reply is an instance of \HaveAPI\Client\ResourceInstance
// $reply->id = 2
CLI
$ haveapi-cli -u https://api.vpsfree.cz --version 7.0 location create -- \
--label 'Brno' \
--has-ipv6 \
--remote-console-server '' \
--domain 'brq'
ID: 2
Label: -
Description: -
Has IPv6: -
Remote console server: -
Domain: -
Environment: -
File system
# Mount the file system
$ haveapi-fs https://api.vpsfree.cz /mnt/api.vpsfree.cz -o version=7.0
# Change to action directory
$ cd /mnt/api.vpsfree.cz/location/actions/create
# Prepare input parameters
$ echo 'Brno' > input/label
$ echo 'true' > input/has_ipv6
$ echo '' > input/remote_console_server
$ echo 'brq' > input/domain
# Execute the action
$ echo 1 > exec
# Query the action's result
$ cat status
1
# Query the output parameters
$ cat output/id
2
curl
Request
$ curl --request POST \
--data-binary "{
\"location\": {
\"label\": \"Brno\",
\"has_ipv6\": true,
\"remote_console_server\": \"\",
\"domain\": \"brq\"
}
}" \
'https://api.vpsfree.cz/v7.0/locations'
Response
{
"status": true,
"message": null,
"response": {
"location": {
"id": 2
}
},
"errors": null
}
HTTP
Request
POST /v7.0/locations HTTP/1.1
Host: api.vpsfree.cz
Content-Type: application/json
{
"location": {
"label": "Brno",
"has_ipv6": true,
"remote_console_server": "",
"domain": "brq"
}
}
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 116
{
"status": true,
"message": null,
"response": {
"location": {
"id": 2
}
},
"errors": null
}
Location # Index
- Path:
- GET /v7.0/locations
- Description:
- List locations
- Authentication required:
- no
- Scope:
- location#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- location
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Environment |
environment |
no |
Resource |
|
|
Filter locations by environment |
Has hypervisor |
has_hypervisor |
no |
Boolean |
|
|
List only locations having at least one hypervisor node |
Has storage |
has_storage |
no |
Boolean |
|
|
List only locations having at least one storage node |
Hypervisor type |
hypervisor_type |
no |
String |
Include- values
- ["vpsadminos"]
- message
- %{value} cannot be used
|
|
List only locations having at least one node of this type |
Shares IPv4 networks with location |
shares_v4_networks_with |
no |
Resource |
|
|
|
Shares IPv4 networks with location |
shares_v6_networks_with |
no |
Resource |
|
|
|
Shares IPv4 networks with location |
shares_any_networks_with |
no |
Resource |
|
|
|
Shared network primary |
shares_networks_primary |
no |
Boolean |
|
|
Filter locations with shared networks that are primary in the other location |
Output parameters
- Layout:
- object_list
- Namespace:
- locations
Label |
Name |
Type |
Description |
ID |
id |
Integer |
Location ID |
Label |
label |
String |
Location label |
Description |
description |
String |
Location description |
Has IPv6 |
has_ipv6 |
Boolean |
True if location has IPv6 addresses |
Remote console server |
remote_console_server |
String |
URL to HTTP remote console server |
Domain |
domain |
String |
Location domain, subdomain at environment domain |
Environment |
environment |
Resource |
|
Maintenance lock |
maintenance_lock |
String |
|
Maintenance reason |
maintenance_lock_reason |
String |
|
Examples
Example #0
Ruby
require 'haveapi-client'
client = HaveAPI::Client.new("https://api.vpsfree.cz", version: "7.0")
reply = client.location.index
# reply is an instance of HaveAPI::Client::ResourceInstanceList,
# which is a subclass of Array
JavaScript
import HaveAPI from 'haveapi-client'
var api = new HaveAPI.Client("https://api.vpsfree.cz", {version: "7.0"});
api.location.index(function (client, reply) {
console.log('Response', reply);
// reply is an instance of HaveAPI.Client.ResourceInstanceList
});
PHP
$api = new \HaveAPI\Client("https://api.vpsfree.cz", "7.0");
$reply = $api->location->index();
// $reply is an instance of \HaveAPI\Client\ResourceInstanceList
CLI
$ haveapi-cli -u https://api.vpsfree.cz --version 7.0 location index
ID: -
Label: Prague
Description: -
Has IPv6: true
Remote console server: https://console.vpsadmin.mydomain.com
Domain: prg
Environment: -
Maintenance lock: -
Maintenance reason: -
File system
# Mount the file system
$ haveapi-fs https://api.vpsfree.cz /mnt/api.vpsfree.cz -o version=7.0
# Change to action directory
$ cd /mnt/api.vpsfree.cz/location/actions/index
# Execute the action
$ echo 1 > exec
# Query the action's result
$ cat status
1
curl
Request
$ curl --request GET \
--data-binary "{
\"location\": {}
}" \
'https://api.vpsfree.cz/v7.0/locations'
Response
{
"status": true,
"message": null,
"response": {
"locations": [
{
"label": "Prague",
"has_ipv6": true,
"remote_console_server": "https://console.vpsadmin.mydomain.com",
"domain": "prg"
}
]
},
"errors": null
}
HTTP
Request
GET /v7.0/locations HTTP/1.1
Host: api.vpsfree.cz
Content-Type: application/json
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 270
{
"status": true,
"message": null,
"response": {
"locations": [
{
"label": "Prague",
"has_ipv6": true,
"remote_console_server": "https://console.vpsadmin.mydomain.com",
"domain": "prg"
}
]
},
"errors": null
}
Location # Set_maintenance
- Path:
- POST /v7.0/locations/{location_id}/set_maintenance
- Description:
- Set maintenance lock
- Authentication required:
- yes
- Scope:
- location#set_maintenance
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- hash
- Namespace:
- location
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Lock |
lock |
yes |
Boolean |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Reason |
reason |
no |
String |
|
|
|
Output parameters
Location # Show
- Path:
- GET /v7.0/locations/{location_id}
- Description:
- Show location
- Authentication required:
- yes
- Scope:
- location#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- location
Label |
Name |
Type |
Description |
ID |
id |
Integer |
Location ID |
Label |
label |
String |
Location label |
Description |
description |
String |
Location description |
Has IPv6 |
has_ipv6 |
Boolean |
True if location has IPv6 addresses |
Remote console server |
remote_console_server |
String |
URL to HTTP remote console server |
Domain |
domain |
String |
Location domain, subdomain at environment domain |
Environment |
environment |
Resource |
|
Maintenance lock |
maintenance_lock |
String |
|
Maintenance reason |
maintenance_lock_reason |
String |
|
Examples
Example #0
Ruby
require 'haveapi-client'
client = HaveAPI::Client.new("https://api.vpsfree.cz", version: "7.0")
reply = client.location.show(2)
# reply is an instance of HaveAPI::Client::ResourceInstance
# reply.id = 2
# reply.label = "Brno"
# reply.has_ipv6 = true
# reply.remote_console_server = ""
# reply.domain = "brq"
JavaScript
import HaveAPI from 'haveapi-client'
var api = new HaveAPI.Client("https://api.vpsfree.cz", {version: "7.0"});
api.location.show(2, function (client, reply) {
console.log('Response', reply);
// reply is an instance of HaveAPI.Client.ResourceInstance
// reply.id = 2
// reply.label = "Brno"
// reply.has_ipv6 = true
// reply.remote_console_server = ""
// reply.domain = "brq"
});
PHP
$api = new \HaveAPI\Client("https://api.vpsfree.cz", "7.0");
$reply = $api->location->show(2);
// $reply is an instance of \HaveAPI\Client\ResourceInstance
// $reply->id = 2
// $reply->label = "Brno"
// $reply->has_ipv6 = true
// $reply->remote_console_server = ""
// $reply->domain = "brq"
CLI
$ haveapi-cli -u https://api.vpsfree.cz --version 7.0 location show 2
ID: 2
Label: Brno
Description: -
Has IPv6: true
Remote console server: -
Domain: brq
Environment: -
Maintenance lock: -
Maintenance reason: -
File system
# Mount the file system
$ haveapi-fs https://api.vpsfree.cz /mnt/api.vpsfree.cz -o version=7.0
# Change to action directory
$ cd /mnt/api.vpsfree.cz/location/actions/show
# Execute the action
$ echo 1 > exec
# Query the action's result
$ cat status
1
# Query the output parameters
$ cat output/id
2
$ cat output/label
Brno
$ cat output/has_ipv6
1
$ cat output/remote_console_server
$ cat output/domain
brq
curl
Request
$ curl --request GET \
--data-binary "{
\"location\": {}
}" \
'https://api.vpsfree.cz/v7.0/locations/2'
Response
{
"status": true,
"message": null,
"response": {
"location": {
"id": 2,
"label": "Brno",
"has_ipv6": true,
"remote_console_server": "",
"domain": "brq"
}
},
"errors": null
}
HTTP
Request
GET /v7.0/locations/2 HTTP/1.1
Host: api.vpsfree.cz
Content-Type: application/json
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 221
{
"status": true,
"message": null,
"response": {
"location": {
"id": 2,
"label": "Brno",
"has_ipv6": true,
"remote_console_server": "",
"domain": "brq"
}
},
"errors": null
}
Location # Update
- Path:
- PUT /v7.0/locations/{location_id}
- Description:
- Update location
- Authentication required:
- yes
- Scope:
- location#update
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- location
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Label |
label |
no |
String |
|
|
Location label |
Description |
description |
no |
String |
|
|
Location description |
Has IPv6 |
has_ipv6 |
no |
Boolean |
Include- values
- [true, false]
- message
- %{value} cannot be used
|
|
True if location has IPv6 addresses |
Remote console server |
remote_console_server |
no |
String |
Format- rx
- \A(https?://.+)?\z
- match
- true
- description
- message
- invalid format
|
|
URL to HTTP remote console server |
Domain |
domain |
no |
String |
Format- rx
- \A[0-9a-zA-Z\-.]{3,255}\z
- match
- true
- description
- message
- invalid format
|
|
Location domain, subdomain at environment domain |
Environment |
environment |
no |
Resource |
|
|
|
Output parameters
Examples
Example #0
Ruby
require 'haveapi-client'
client = HaveAPI::Client.new("https://api.vpsfree.cz", version: "7.0")
reply = client.location.update(2, {:label=>"Ostrava",
:has_ipv6=>true,
:remote_console_server=>"",
:domain=>"ova",
:environment=>1})
# reply is an instance of HaveAPI::Client::ResourceInstance
JavaScript
import HaveAPI from 'haveapi-client'
var api = new HaveAPI.Client("https://api.vpsfree.cz", {version: "7.0"});
api.location.update(2, {
"label": "Ostrava",
"has_ipv6": true,
"remote_console_server": "",
"domain": "ova",
"environment": 1
}, function (client, reply) {
console.log('Response', reply);
// reply is an instance of HaveAPI.Client.ResourceInstance
});
PHP
$api = new \HaveAPI\Client("https://api.vpsfree.cz", "7.0");
$reply = $api->location->update(2, [
"label" => "Ostrava",
"has_ipv6" => true,
"remote_console_server" => "",
"domain" => "ova",
"environment" => 1
]);
// $reply is an instance of \HaveAPI\Client\ResourceInstance
CLI
$ haveapi-cli -u https://api.vpsfree.cz --version 7.0 location update 2 -- \
--label 'Ostrava' \
--has-ipv6 \
--remote-console-server '' \
--domain 'ova' \
--environment '1'
File system
# Mount the file system
$ haveapi-fs https://api.vpsfree.cz /mnt/api.vpsfree.cz -o version=7.0
# Change to action directory
$ cd /mnt/api.vpsfree.cz/location/actions/update
# Prepare input parameters
$ echo 'Ostrava' > input/label
$ echo 'true' > input/has_ipv6
$ echo '' > input/remote_console_server
$ echo 'ova' > input/domain
$ echo '1' > input/environment
# Execute the action
$ echo 1 > exec
# Query the action's result
$ cat status
1
curl
Request
$ curl --request PUT \
--data-binary "{
\"location\": {
\"label\": \"Ostrava\",
\"has_ipv6\": true,
\"remote_console_server\": \"\",
\"domain\": \"ova\",
\"environment\": 1
}
}" \
'https://api.vpsfree.cz/v7.0/locations/2'
Response
{
"status": true,
"message": null,
"response": {
"location": {}
},
"errors": null
}
HTTP
Request
PUT /v7.0/locations/2 HTTP/1.1
Host: api.vpsfree.cz
Content-Type: application/json
{
"location": {
"label": "Ostrava",
"has_ipv6": true,
"remote_console_server": "",
"domain": "ova",
"environment": 1
}
}
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 97
{
"status": true,
"message": null,
"response": {
"location": {}
},
"errors": null
}
Location network
Manage location networks
Location network # Create
- Path:
- POST /v7.0/location_networks
- Description:
- Add network to a location
- Authentication required:
- yes
- Scope:
- location_network#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- location_network
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Location |
location |
no |
Resource |
|
|
|
Network |
network |
no |
Resource |
|
|
|
Primary |
primary |
no |
Boolean |
|
|
|
Priority |
priority |
no |
Integer |
|
|
|
Autopick |
autopick |
no |
Boolean |
|
|
|
Userpick |
userpick |
no |
Boolean |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- location_network
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Location |
location |
Resource |
|
Network |
network |
Resource |
|
Primary |
primary |
Boolean |
|
Priority |
priority |
Integer |
|
Autopick |
autopick |
Boolean |
|
Userpick |
userpick |
Boolean |
|
Location network # Delete
- Path:
- DELETE /v7.0/location_networks/{location_network_id}
- Description:
- Remove network from a location
- Authentication required:
- yes
- Scope:
- location_network#delete
- Aliases:
- destroy
- Blocking:
- no
Input parameters
Output parameters
Location network # Index
- Path:
- GET /v7.0/location_networks
- Description:
- List location networks
- Authentication required:
- yes
- Scope:
- location_network#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- location_network
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Location |
location |
no |
Resource |
|
|
|
Network |
network |
no |
Resource |
|
|
|
Output parameters
- Layout:
- object_list
- Namespace:
- location_networks
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Location |
location |
Resource |
|
Network |
network |
Resource |
|
Primary |
primary |
Boolean |
|
Priority |
priority |
Integer |
|
Autopick |
autopick |
Boolean |
|
Userpick |
userpick |
Boolean |
|
Location network # Show
- Path:
- GET /v7.0/location_networks/{location_network_id}
- Description:
- Show a location network
- Authentication required:
- yes
- Scope:
- location_network#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- location_network
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Location |
location |
Resource |
|
Network |
network |
Resource |
|
Primary |
primary |
Boolean |
|
Priority |
priority |
Integer |
|
Autopick |
autopick |
Boolean |
|
Userpick |
userpick |
Boolean |
|
Location network # Update
- Path:
- PUT /v7.0/location_networks/{location_network_id}
- Description:
- Update a location network
- Authentication required:
- yes
- Scope:
- location_network#update
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- location_network
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Primary |
primary |
no |
Boolean |
|
|
|
Priority |
priority |
no |
Integer |
|
|
|
Autopick |
autopick |
no |
Boolean |
|
|
|
Userpick |
userpick |
no |
Boolean |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- location_network
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Location |
location |
Resource |
|
Network |
network |
Resource |
|
Primary |
primary |
Boolean |
|
Priority |
priority |
Integer |
|
Autopick |
autopick |
Boolean |
|
Userpick |
userpick |
Boolean |
|
Mail log
Browse sent mails
Mail log # Index
- Path:
- GET /v7.0/mail_logs
- Description:
- List mails
- Authentication required:
- yes
- Scope:
- mail_log#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- mail_log
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
25 |
Number of objects to retrieve |
Output parameters
- Layout:
- object_list
- Namespace:
- mail_logs
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
User |
user |
Resource |
|
To |
to |
String |
|
Cc |
cc |
String |
|
Bcc |
bcc |
String |
|
From |
from |
String |
|
Reply_to |
reply_to |
String |
|
Return_path |
return_path |
String |
|
Message_id |
message_id |
String |
|
In_reply_to |
in_reply_to |
String |
|
References |
references |
String |
|
Subject |
subject |
String |
|
Text_plain |
text_plain |
String |
|
Text_html |
text_html |
String |
|
MailTemplate |
mail_template |
Resource |
|
Created_at |
created_at |
Datetime |
|
Mail log # Show
- Path:
- GET /v7.0/mail_logs/{mail_log_id}
- Description:
- View mail
- Authentication required:
- yes
- Scope:
- mail_log#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- mail_log
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
User |
user |
Resource |
|
To |
to |
String |
|
Cc |
cc |
String |
|
Bcc |
bcc |
String |
|
From |
from |
String |
|
Reply_to |
reply_to |
String |
|
Return_path |
return_path |
String |
|
Message_id |
message_id |
String |
|
In_reply_to |
in_reply_to |
String |
|
References |
references |
String |
|
Subject |
subject |
String |
|
Text_plain |
text_plain |
String |
|
Text_html |
text_html |
String |
|
MailTemplate |
mail_template |
Resource |
|
Created_at |
created_at |
Datetime |
|
Mail recipient
Manage mail recipients
Mail recipient # Create
- Path:
- POST /v7.0/mail_recipients
- Description:
- Create a mail recipient
- Authentication required:
- yes
- Scope:
- mail_recipient#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- mail_recipient
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Label |
label |
no |
String |
|
|
Human-friendly label |
To |
to |
no |
String |
|
|
|
Cc |
cc |
no |
String |
|
|
|
Bcc |
bcc |
no |
String |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- mail_recipient
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Label |
label |
String |
Human-friendly label |
To |
to |
String |
|
Cc |
cc |
String |
|
Bcc |
bcc |
String |
|
Mail recipient # Delete
- Path:
- DELETE /v7.0/mail_recipients/{mail_recipient_id}
- Description:
- Delete a mail recipient
- Authentication required:
- yes
- Scope:
- mail_recipient#delete
- Aliases:
- destroy
- Blocking:
- no
Input parameters
Output parameters
Mail recipient # Index
- Path:
- GET /v7.0/mail_recipients
- Description:
- List mail recipients
- Authentication required:
- yes
- Scope:
- mail_recipient#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- mail_recipient
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Output parameters
- Layout:
- object_list
- Namespace:
- mail_recipients
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Label |
label |
String |
Human-friendly label |
To |
to |
String |
|
Cc |
cc |
String |
|
Bcc |
bcc |
String |
|
Mail recipient # Show
- Path:
- GET /v7.0/mail_recipients/{mail_recipient_id}
- Description:
- View mail recipient
- Authentication required:
- yes
- Scope:
- mail_recipient#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- mail_recipient
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Label |
label |
String |
Human-friendly label |
To |
to |
String |
|
Cc |
cc |
String |
|
Bcc |
bcc |
String |
|
Mail recipient # Update
- Path:
- PUT /v7.0/mail_recipients/{mail_recipient_id}
- Description:
- Update a mail recipient
- Authentication required:
- yes
- Scope:
- mail_recipient#update
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- mail_recipient
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Label |
label |
no |
String |
|
|
Human-friendly label |
To |
to |
no |
String |
|
|
|
Cc |
cc |
no |
String |
|
|
|
Bcc |
bcc |
no |
String |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- mail_recipient
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Label |
label |
String |
Human-friendly label |
To |
to |
String |
|
Cc |
cc |
String |
|
Bcc |
bcc |
String |
|
Mail template
Manage mail templates
Mail template # Create
- Path:
- POST /v7.0/mail_templates
- Description:
- Create a mail template
- Authentication required:
- yes
- Scope:
- mail_template#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- mail_template
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Name |
name |
no |
String |
|
|
Template identifier |
Label |
label |
no |
String |
|
|
Human-friendly label |
Template_id |
template_id |
no |
String |
|
|
|
User_visibility |
user_visibility |
no |
String |
Include- values
- ["default", "visible", "invisible"]
- message
- %{value} cannot be used
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- mail_template
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Name |
name |
String |
Template identifier |
Label |
label |
String |
Human-friendly label |
Template_id |
template_id |
String |
|
User_visibility |
user_visibility |
String |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Mail template # Delete
- Path:
- DELETE /v7.0/mail_templates/{mail_template_id}
- Description:
- Delete a mail template
- Authentication required:
- yes
- Scope:
- mail_template#delete
- Aliases:
- destroy
- Blocking:
- no
Input parameters
Output parameters
Mail template # Index
- Path:
- GET /v7.0/mail_templates
- Description:
- List mail templates
- Authentication required:
- yes
- Scope:
- mail_template#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- mail_template
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Output parameters
- Layout:
- object_list
- Namespace:
- mail_templates
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Name |
name |
String |
Template identifier |
Label |
label |
String |
Human-friendly label |
Template_id |
template_id |
String |
|
User_visibility |
user_visibility |
String |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Mail template # Show
- Path:
- GET /v7.0/mail_templates/{mail_template_id}
- Description:
- View mail template
- Authentication required:
- yes
- Scope:
- mail_template#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- mail_template
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Name |
name |
String |
Template identifier |
Label |
label |
String |
Human-friendly label |
Template_id |
template_id |
String |
|
User_visibility |
user_visibility |
String |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Mail template # Update
- Path:
- PUT /v7.0/mail_templates/{mail_template_id}
- Description:
- Update a mail template
- Authentication required:
- yes
- Scope:
- mail_template#update
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- mail_template
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Name |
name |
no |
String |
|
|
Template identifier |
Label |
label |
no |
String |
|
|
Human-friendly label |
Template_id |
template_id |
no |
String |
|
|
|
User_visibility |
user_visibility |
no |
String |
Include- values
- ["default", "visible", "invisible"]
- message
- %{value} cannot be used
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- mail_template
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Name |
name |
String |
Template identifier |
Label |
label |
String |
Human-friendly label |
Template_id |
template_id |
String |
|
User_visibility |
user_visibility |
String |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Recipient
Manage mail recipients
Mail template.Recipient # Create
- Path:
- POST /v7.0/mail_templates/{mail_template_id}/recipients
- Description:
- Create a mail recipient
- Authentication required:
- yes
- Scope:
- mail_template.recipient#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- recipient
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
MailRecipient |
mail_recipient |
yes |
Resource |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- recipient
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
MailRecipient |
mail_recipient |
Resource |
|
Mail template.Recipient # Delete
- Path:
- DELETE /v7.0/mail_templates/{mail_template_id}/recipients/{recipient_id}
- Description:
- Delete a mail recipient
- Authentication required:
- yes
- Scope:
- mail_template.recipient#delete
- Aliases:
- destroy
- Blocking:
- no
Input parameters
Output parameters
Mail template.Recipient # Index
- Path:
- GET /v7.0/mail_templates/{mail_template_id}/recipients
- Description:
- List mail recipients
- Authentication required:
- yes
- Scope:
- mail_template.recipient#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- recipient
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Output parameters
- Layout:
- object_list
- Namespace:
- recipients
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
MailRecipient |
mail_recipient |
Resource |
|
Mail template.Recipient # Show
- Path:
- GET /v7.0/mail_templates/{mail_template_id}/recipients/{recipient_id}
- Description:
- View mail recipient
- Authentication required:
- yes
- Scope:
- mail_template.recipient#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- recipient
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
MailRecipient |
mail_recipient |
Resource |
|
Translation
Manage mail templates
Mail template.Translation # Create
- Path:
- POST /v7.0/mail_templates/{mail_template_id}/translations
- Description:
- Create a mail template translation
- Authentication required:
- yes
- Scope:
- mail_template.translation#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- translation
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Language |
language |
no |
Resource |
|
|
|
From |
from |
no |
String |
|
|
|
Reply_to |
reply_to |
no |
String |
|
|
|
Return_path |
return_path |
no |
String |
|
|
|
Subject |
subject |
no |
String |
|
|
|
Text_plain |
text_plain |
no |
Text |
|
|
|
Text_html |
text_html |
no |
Text |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- translation
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Language |
language |
Resource |
|
From |
from |
String |
|
Reply_to |
reply_to |
String |
|
Return_path |
return_path |
String |
|
Subject |
subject |
String |
|
Text_plain |
text_plain |
Text |
|
Text_html |
text_html |
Text |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Mail template.Translation # Delete
- Path:
- DELETE /v7.0/mail_templates/{mail_template_id}/translations/{translation_id}
- Description:
- Delete a mail template translation
- Authentication required:
- yes
- Scope:
- mail_template.translation#delete
- Aliases:
- destroy
- Blocking:
- no
Input parameters
Output parameters
Mail template.Translation # Index
- Path:
- GET /v7.0/mail_templates/{mail_template_id}/translations
- Description:
- List mail template translations
- Authentication required:
- yes
- Scope:
- mail_template.translation#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- translation
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Output parameters
- Layout:
- object_list
- Namespace:
- translations
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Language |
language |
Resource |
|
From |
from |
String |
|
Reply_to |
reply_to |
String |
|
Return_path |
return_path |
String |
|
Subject |
subject |
String |
|
Text_plain |
text_plain |
Text |
|
Text_html |
text_html |
Text |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Mail template.Translation # Show
- Path:
- GET /v7.0/mail_templates/{mail_template_id}/translations/{translation_id}
- Description:
- Show a mail template translation
- Authentication required:
- yes
- Scope:
- mail_template.translation#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- translation
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Language |
language |
Resource |
|
From |
from |
String |
|
Reply_to |
reply_to |
String |
|
Return_path |
return_path |
String |
|
Subject |
subject |
String |
|
Text_plain |
text_plain |
Text |
|
Text_html |
text_html |
Text |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Mail template.Translation # Update
- Path:
- PUT /v7.0/mail_templates/{mail_template_id}/translations/{translation_id}
- Description:
- Update a mail template translation
- Authentication required:
- yes
- Scope:
- mail_template.translation#update
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- translation
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Language |
language |
no |
Resource |
|
|
|
From |
from |
no |
String |
|
|
|
Reply_to |
reply_to |
no |
String |
|
|
|
Return_path |
return_path |
no |
String |
|
|
|
Subject |
subject |
no |
String |
|
|
|
Text_plain |
text_plain |
no |
Text |
|
|
|
Text_html |
text_html |
no |
Text |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- translation
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Language |
language |
Resource |
|
From |
from |
String |
|
Reply_to |
reply_to |
String |
|
Return_path |
return_path |
String |
|
Subject |
subject |
String |
|
Text_plain |
text_plain |
Text |
|
Text_html |
text_html |
Text |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Mailbox
Manage mailboxes
Mailbox # Create
- Path:
- POST /v7.0/mailboxes
- Description:
- Create a mailbox
- Authentication required:
- yes
- Scope:
- mailbox#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- mailbox
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Label |
label |
no |
String |
|
|
|
Server |
server |
no |
String |
|
|
|
Port |
port |
no |
Integer |
|
|
|
User |
user |
no |
String |
|
|
|
Password |
password |
no |
String |
|
|
|
Enable_ssl |
enable_ssl |
no |
Boolean |
|
true |
|
Output parameters
- Layout:
- object
- Namespace:
- mailbox
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
Label |
label |
String |
|
Server |
server |
String |
|
Port |
port |
Integer |
|
User |
user |
String |
|
Enable_ssl |
enable_ssl |
Boolean |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Mailbox # Delete
- Path:
- DELETE /v7.0/mailboxes/{mailbox_id}
- Description:
- Delete mailbox
- Authentication required:
- yes
- Scope:
- mailbox#delete
- Aliases:
- destroy
- Blocking:
- no
Input parameters
Output parameters
Mailbox # Index
- Path:
- GET /v7.0/mailboxes
- Description:
- List mailboxes
- Authentication required:
- yes
- Scope:
- mailbox#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- mailbox
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Output parameters
- Layout:
- object_list
- Namespace:
- mailboxes
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
Label |
label |
String |
|
Server |
server |
String |
|
Port |
port |
Integer |
|
User |
user |
String |
|
Enable_ssl |
enable_ssl |
Boolean |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Mailbox # Show
- Path:
- GET /v7.0/mailboxes/{mailbox_id}
- Description:
- Show mailbox
- Authentication required:
- yes
- Scope:
- mailbox#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- mailbox
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
Label |
label |
String |
|
Server |
server |
String |
|
Port |
port |
Integer |
|
User |
user |
String |
|
Enable_ssl |
enable_ssl |
Boolean |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Mailbox # Update
- Path:
- PUT /v7.0/mailboxes/{mailbox_id}
- Description:
- Update mailbox
- Authentication required:
- yes
- Scope:
- mailbox#update
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- mailbox
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Label |
label |
no |
String |
|
|
|
Server |
server |
no |
String |
|
|
|
Port |
port |
no |
Integer |
|
|
|
User |
user |
no |
String |
|
|
|
Password |
password |
no |
String |
|
|
|
Enable_ssl |
enable_ssl |
no |
Boolean |
|
true |
|
Output parameters
- Layout:
- object
- Namespace:
- mailbox
Label |
Name |
Type |
Description |
ID |
id |
Integer |
|
Label |
label |
String |
|
Server |
server |
String |
|
Port |
port |
Integer |
|
User |
user |
String |
|
Enable_ssl |
enable_ssl |
Boolean |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Handler
Manage mailbox handlers
Mailbox.Handler # Create
- Path:
- POST /v7.0/mailboxes/{mailbox_id}/handler
- Description:
- Add mailbox handler
- Authentication required:
- yes
- Scope:
- mailbox.handler#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- handler
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Class_name |
class_name |
no |
String |
|
|
|
Order |
order |
no |
Integer |
|
|
|
Continue |
continue |
no |
Boolean |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- handler
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Class_name |
class_name |
String |
|
Order |
order |
Integer |
|
Continue |
continue |
Boolean |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Mailbox.Handler # Delete
- Path:
- DELETE /v7.0/mailboxes/{mailbox_id}/handler/{handler_id}
- Description:
- Delete mailbox handler
- Authentication required:
- yes
- Scope:
- mailbox.handler#delete
- Aliases:
- destroy
- Blocking:
- no
Input parameters
Output parameters
Mailbox.Handler # Index
- Path:
- GET /v7.0/mailboxes/{mailbox_id}/handler
- Description:
- List mailbox handlers
- Authentication required:
- yes
- Scope:
- mailbox.handler#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- handler
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Output parameters
- Layout:
- object_list
- Namespace:
- handlers
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Class_name |
class_name |
String |
|
Order |
order |
Integer |
|
Continue |
continue |
Boolean |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Mailbox.Handler # Show
- Path:
- GET /v7.0/mailboxes/{mailbox_id}/handler/{handler_id}
- Description:
- Show mailbox handler
- Authentication required:
- yes
- Scope:
- mailbox.handler#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- handler
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Class_name |
class_name |
String |
|
Order |
order |
Integer |
|
Continue |
continue |
Boolean |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Mailbox.Handler # Update
- Path:
- PUT /v7.0/mailboxes/{mailbox_id}/handler/{handler_id}
- Description:
- Update mailbox handler
- Authentication required:
- yes
- Scope:
- mailbox.handler#update
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- handler
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Class_name |
class_name |
no |
String |
|
|
|
Order |
order |
no |
Integer |
|
|
|
Continue |
continue |
no |
Boolean |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- handler
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Class_name |
class_name |
String |
|
Order |
order |
Integer |
|
Continue |
continue |
Boolean |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Metrics access token
Manage /metrics endpoint access tokens
Metrics access token # Create
- Path:
- POST /v7.0/metrics_access_tokens
- Description:
- Create a new access token
- Authentication required:
- yes
- Scope:
- metrics_access_token#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- metrics_access_token
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
User |
user |
no |
Resource |
|
|
|
Metric prefix |
metric_prefix |
no |
String |
Length- message
- length has to be maximally 30
- max
- 30
Format- rx
- \A[a-zA-Z_]+\z
- match
- true
- description
- message
- only allows letters and underscore
|
vpsadmin_ |
Prefix added to all metrics |
Output parameters
- Layout:
- object
- Namespace:
- metrics_access_token
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
User |
user |
Resource |
|
Access token |
access_token |
String |
|
Metric prefix |
metric_prefix |
String |
Prefix added to all metrics |
Use count |
use_count |
Integer |
|
Last use |
last_use |
Datetime |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Metrics access token # Delete
- Path:
- DELETE /v7.0/metrics_access_tokens/{metrics_access_token_id}
- Description:
- Delete access token
- Authentication required:
- yes
- Scope:
- metrics_access_token#delete
- Aliases:
- destroy
- Blocking:
- no
Input parameters
Output parameters
Metrics access token # Index
- Path:
- GET /v7.0/metrics_access_tokens
- Description:
- Authentication required:
- yes
- Scope:
- metrics_access_token#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- metrics_access_token
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
User |
user |
no |
Resource |
|
|
|
Output parameters
- Layout:
- object_list
- Namespace:
- metrics_access_tokens
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
User |
user |
Resource |
|
Access token |
access_token |
String |
|
Metric prefix |
metric_prefix |
String |
Prefix added to all metrics |
Use count |
use_count |
Integer |
|
Last use |
last_use |
Datetime |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Metrics access token # Show
- Path:
- GET /v7.0/metrics_access_tokens/{metrics_access_token_id}
- Description:
- Authentication required:
- yes
- Scope:
- metrics_access_token#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- metrics_access_token
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
User |
user |
Resource |
|
Access token |
access_token |
String |
|
Metric prefix |
metric_prefix |
String |
Prefix added to all metrics |
Use count |
use_count |
Integer |
|
Last use |
last_use |
Datetime |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Migration plan
View migration plans
Migration plan # Cancel
- Path:
- POST /v7.0/migration_plans/{migration_plan_id}/cancel
- Description:
- Cancel execution of a migration plan
- Authentication required:
- yes
- Scope:
- migration_plan#cancel
- Aliases:
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- migration_plan
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
State |
state |
String |
|
Stop_on_error |
stop_on_error |
Boolean |
|
Send_mail |
send_mail |
Boolean |
|
Concurrency |
concurrency |
Integer |
|
Reason |
reason |
String |
|
User |
user |
Resource |
|
Created_at |
created_at |
Datetime |
|
Finished_at |
finished_at |
Datetime |
|
Migration plan # Create
- Path:
- POST /v7.0/migration_plans
- Description:
- Create a custom migration plan
- Authentication required:
- yes
- Scope:
- migration_plan#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- migration_plan
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Stop_on_error |
stop_on_error |
no |
Boolean |
|
true |
|
Send_mail |
send_mail |
no |
Boolean |
|
true |
|
Concurrency |
concurrency |
no |
Integer |
|
10 |
|
Reason |
reason |
no |
String |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- migration_plan
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
State |
state |
String |
|
Stop_on_error |
stop_on_error |
Boolean |
|
Send_mail |
send_mail |
Boolean |
|
Concurrency |
concurrency |
Integer |
|
Reason |
reason |
String |
|
User |
user |
Resource |
|
Created_at |
created_at |
Datetime |
|
Finished_at |
finished_at |
Datetime |
|
Migration plan # Delete
- Path:
- DELETE /v7.0/migration_plans/{migration_plan_id}
- Description:
- Delete staged migration plan
- Authentication required:
- yes
- Scope:
- migration_plan#delete
- Aliases:
- destroy
- Blocking:
- no
Input parameters
Output parameters
Migration plan # Index
- Path:
- GET /v7.0/migration_plans
- Description:
- List migration plans
- Authentication required:
- yes
- Scope:
- migration_plan#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- migration_plan
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
State |
state |
no |
String |
Include- values
- ["staged", "running", "cancelling", "failing", "cancelled", "done", "error"]
- message
- %{value} cannot be used
|
|
|
User |
user |
no |
Resource |
|
|
|
Output parameters
- Layout:
- object_list
- Namespace:
- migration_plans
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
State |
state |
String |
|
Stop_on_error |
stop_on_error |
Boolean |
|
Send_mail |
send_mail |
Boolean |
|
Concurrency |
concurrency |
Integer |
|
Reason |
reason |
String |
|
User |
user |
Resource |
|
Created_at |
created_at |
Datetime |
|
Finished_at |
finished_at |
Datetime |
|
Migration plan # Show
- Path:
- GET /v7.0/migration_plans/{migration_plan_id}
- Description:
- Show a migration plan
- Authentication required:
- yes
- Scope:
- migration_plan#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- migration_plan
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
State |
state |
String |
|
Stop_on_error |
stop_on_error |
Boolean |
|
Send_mail |
send_mail |
Boolean |
|
Concurrency |
concurrency |
Integer |
|
Reason |
reason |
String |
|
User |
user |
Resource |
|
Created_at |
created_at |
Datetime |
|
Finished_at |
finished_at |
Datetime |
|
Migration plan # Start
- Path:
- POST /v7.0/migration_plans/{migration_plan_id}/start
- Description:
- Begin execution of a migration plan
- Authentication required:
- yes
- Scope:
- migration_plan#start
- Aliases:
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- migration_plan
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
State |
state |
String |
|
Stop_on_error |
stop_on_error |
Boolean |
|
Send_mail |
send_mail |
Boolean |
|
Concurrency |
concurrency |
Integer |
|
Reason |
reason |
String |
|
User |
user |
Resource |
|
Created_at |
created_at |
Datetime |
|
Finished_at |
finished_at |
Datetime |
|
Vps migration
VPS migrations
Migration plan.Vps migration # Create
- Path:
- POST /v7.0/migration_plans/{migration_plan_id}/vps_migrations
- Description:
- Schedule VPS migration
- Authentication required:
- yes
- Scope:
- migration_plan.vps_migration#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- vps_migration
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
VPS |
vps |
yes |
Resource |
|
|
|
Dst_node |
dst_node |
yes |
Resource |
|
|
|
Maintenance_window |
maintenance_window |
no |
Boolean |
|
true |
|
Cleanup_data |
cleanup_data |
no |
Boolean |
|
true |
|
Output parameters
- Layout:
- object
- Namespace:
- vps_migration
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
State |
state |
String |
|
TransactionChain |
transaction_chain |
Resource |
|
Src_node |
src_node |
Resource |
|
VPS |
vps |
Resource |
|
Dst_node |
dst_node |
Resource |
|
Maintenance_window |
maintenance_window |
Boolean |
|
Cleanup_data |
cleanup_data |
Boolean |
|
Created_at |
created_at |
Datetime |
|
Started_at |
started_at |
Datetime |
|
Finished_at |
finished_at |
Datetime |
|
Migration plan.Vps migration # Index
- Path:
- GET /v7.0/migration_plans/{migration_plan_id}/vps_migrations
- Description:
- List scheduled VPS migrations
- Authentication required:
- yes
- Scope:
- migration_plan.vps_migration#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- vps_migration
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
State |
state |
no |
String |
Include- values
- ["queued", "running", "cancelled", "done", "error"]
- message
- %{value} cannot be used
|
|
|
Src_node |
src_node |
no |
Resource |
|
|
|
Dst_node |
dst_node |
no |
Resource |
|
|
|
Output parameters
- Layout:
- object_list
- Namespace:
- vps_migrations
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
State |
state |
String |
|
TransactionChain |
transaction_chain |
Resource |
|
Src_node |
src_node |
Resource |
|
VPS |
vps |
Resource |
|
Dst_node |
dst_node |
Resource |
|
Maintenance_window |
maintenance_window |
Boolean |
|
Cleanup_data |
cleanup_data |
Boolean |
|
Created_at |
created_at |
Datetime |
|
Started_at |
started_at |
Datetime |
|
Finished_at |
finished_at |
Datetime |
|
Migration plan.Vps migration # Show
- Path:
- GET /v7.0/migration_plans/{migration_plan_id}/vps_migrations/{vps_migration_id}
- Description:
- Show a migration plan
- Authentication required:
- yes
- Scope:
- migration_plan.vps_migration#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- vps_migration
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
State |
state |
String |
|
TransactionChain |
transaction_chain |
Resource |
|
Src_node |
src_node |
Resource |
|
VPS |
vps |
Resource |
|
Dst_node |
dst_node |
Resource |
|
Maintenance_window |
maintenance_window |
Boolean |
|
Cleanup_data |
cleanup_data |
Boolean |
|
Created_at |
created_at |
Datetime |
|
Started_at |
started_at |
Datetime |
|
Finished_at |
finished_at |
Datetime |
|
Monitored event
Browser monitored events
Monitored event # Acknowledge
- Path:
- POST /v7.0/monitored_events/{monitored_event_id}/acknowledge
- Description:
- Authentication required:
- yes
- Scope:
- monitored_event#acknowledge
- Aliases:
- ack
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- monitored_event
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Until |
until |
no |
Datetime |
|
|
|
Output parameters
Monitored event # Ignore
- Path:
- POST /v7.0/monitored_events/{monitored_event_id}/ignore
- Description:
- Authentication required:
- yes
- Scope:
- monitored_event#ignore
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- monitored_event
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Until |
until |
no |
Datetime |
|
|
|
Output parameters
Monitored event # Index
- Path:
- GET /v7.0/monitored_events
- Description:
- Authentication required:
- yes
- Scope:
- monitored_event#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- monitored_event
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
25 |
Number of objects to retrieve |
Monitor |
monitor |
no |
String |
|
|
|
Object_name |
object_name |
no |
String |
|
|
|
Object_id |
object_id |
no |
Integer |
|
|
|
State |
state |
no |
String |
Include- values
- ["monitoring", "confirmed", "unconfirmed", "acknowledged", "ignored", "closed"]
- message
- %{value} cannot be used
|
|
|
User |
user |
no |
Resource |
|
|
|
Order |
order |
no |
String |
Include- values
- ["oldest", "latest", "longest", "shortest"]
- message
- %{value} cannot be used
|
latest |
|
From_duration |
from_duration |
no |
Float |
|
|
Paginate by duration |
Output parameters
- Layout:
- object_list
- Namespace:
- monitored_events
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Monitor |
monitor |
String |
|
Label |
label |
String |
|
Issue |
issue |
String |
|
Object_name |
object_name |
String |
|
Object_id |
object_id |
Integer |
|
State |
state |
String |
|
User |
user |
Resource |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Duration |
duration |
Float |
|
Saved_until |
saved_until |
Datetime |
|
Monitored event # Show
- Path:
- GET /v7.0/monitored_events/{monitored_event_id}
- Description:
- Authentication required:
- yes
- Scope:
- monitored_event#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- monitored_event
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Monitor |
monitor |
String |
|
Label |
label |
String |
|
Issue |
issue |
String |
|
Object_name |
object_name |
String |
|
Object_id |
object_id |
Integer |
|
State |
state |
String |
|
User |
user |
Resource |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Duration |
duration |
Float |
|
Saved_until |
saved_until |
Datetime |
|
Log
Browse monitored event logs
Monitored event.Log # Index
- Path:
- GET /v7.0/monitored_events/{monitored_event_id}/logs
- Description:
- List event logs
- Authentication required:
- yes
- Scope:
- monitored_event.log#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- log
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
25 |
Number of objects to retrieve |
Passed |
passed |
no |
Boolean |
|
|
|
Order |
order |
no |
String |
Include- values
- ["oldest", "latest"]
- message
- %{value} cannot be used
|
oldest |
|
Output parameters
- Layout:
- object_list
- Namespace:
- logs
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Passed |
passed |
Boolean |
|
Value |
value |
Custom |
|
Created_at |
created_at |
Datetime |
|
Monitored event.Log # Show
- Path:
- GET /v7.0/monitored_events/{monitored_event_id}/logs/{log_id}
- Description:
- Authentication required:
- yes
- Scope:
- monitored_event.log#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- log
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Passed |
passed |
Boolean |
|
Value |
value |
Custom |
|
Created_at |
created_at |
Datetime |
|
Network
Manage networks
Network # Add_addresses
- Path:
- POST /v7.0/networks/{network_id}/add_addresses
- Description:
- Add IP addresses to a managed network
- Authentication required:
- yes
- Scope:
- network#add_addresses
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- network
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Count |
count |
yes |
Integer |
Present- empty
- false
- message
- must be present and non-empty
Number- message
- has to be minimally 1
- min
- 1
|
|
|
User |
user |
no |
Resource |
|
|
Owner of new IP addresses |
Environment |
environment |
no |
Resource |
|
|
Environment to which the addresses are charged |
Output parameters
- Layout:
- hash
- Namespace:
- network
Label |
Name |
Type |
Description |
Count |
count |
Integer |
Number of added IP addresses |
Network # Create
- Path:
- POST /v7.0/networks
- Description:
- Add a new network
- Authentication required:
- yes
- Scope:
- network#create
- Aliases:
- new
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- network
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Label |
label |
no |
String |
|
|
|
Ip_version |
ip_version |
yes |
Integer |
Present- empty
- false
- message
- must be present and non-empty
Include- values
- [4, 6]
- message
- %{value} cannot be used
|
|
|
Address |
address |
yes |
String |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Prefix |
prefix |
yes |
Integer |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Role |
role |
yes |
String |
Include- values
- ["public_access", "private_access"]
- message
- %{value} cannot be used
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Managed |
managed |
yes |
Boolean |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Split_access |
split_access |
no |
String |
Include- values
- ["no_access", "user_split", "owner_split"]
- message
- %{value} cannot be used
|
|
|
Split_prefix |
split_prefix |
yes |
Integer |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Purpose |
purpose |
yes |
String |
Include- values
- ["any", "vps", "export"]
- message
- %{value} cannot be used
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Add_ip_addresses |
add_ip_addresses |
no |
Boolean |
|
false |
Add all IP addresses from this network to the database now |
Output parameters
- Layout:
- object
- Namespace:
- network
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Primary_location |
primary_location |
Resource |
|
Label |
label |
String |
|
Ip_version |
ip_version |
Integer |
|
Address |
address |
String |
|
Prefix |
prefix |
Integer |
|
Role |
role |
String |
|
Managed |
managed |
Boolean |
|
Split_access |
split_access |
String |
|
Split_prefix |
split_prefix |
Integer |
|
Purpose |
purpose |
String |
|
Size |
size |
Integer |
Number of possible host IP addresses |
Used |
used |
Integer |
Number of IP addresses present in vpsAdmin |
Assigned |
assigned |
Integer |
Number of IP addresses assigned to VPSes |
Owned |
owned |
Integer |
Number of IP addresses owned by some users |
Taken |
taken |
Integer |
Number of owned and assigned IP addresses |
Network # Index
- Path:
- GET /v7.0/networks
- Description:
- List networks
- Authentication required:
- yes
- Scope:
- network#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- network
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Location |
location |
no |
Resource |
|
|
|
Purpose |
purpose |
no |
String |
Include- values
- ["any", "vps", "export"]
- message
- %{value} cannot be used
|
|
|
Output parameters
- Layout:
- object_list
- Namespace:
- networks
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Primary_location |
primary_location |
Resource |
|
Label |
label |
String |
|
Ip_version |
ip_version |
Integer |
|
Address |
address |
String |
|
Prefix |
prefix |
Integer |
|
Role |
role |
String |
|
Managed |
managed |
Boolean |
|
Split_access |
split_access |
String |
|
Split_prefix |
split_prefix |
Integer |
|
Purpose |
purpose |
String |
|
Size |
size |
Integer |
Number of possible host IP addresses |
Used |
used |
Integer |
Number of IP addresses present in vpsAdmin |
Assigned |
assigned |
Integer |
Number of IP addresses assigned to VPSes |
Owned |
owned |
Integer |
Number of IP addresses owned by some users |
Taken |
taken |
Integer |
Number of owned and assigned IP addresses |
Network # Show
- Path:
- GET /v7.0/networks/{network_id}
- Description:
- Show a network
- Authentication required:
- yes
- Scope:
- network#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- network
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Primary_location |
primary_location |
Resource |
|
Label |
label |
String |
|
Ip_version |
ip_version |
Integer |
|
Address |
address |
String |
|
Prefix |
prefix |
Integer |
|
Role |
role |
String |
|
Managed |
managed |
Boolean |
|
Split_access |
split_access |
String |
|
Split_prefix |
split_prefix |
Integer |
|
Purpose |
purpose |
String |
|
Size |
size |
Integer |
Number of possible host IP addresses |
Used |
used |
Integer |
Number of IP addresses present in vpsAdmin |
Assigned |
assigned |
Integer |
Number of IP addresses assigned to VPSes |
Owned |
owned |
Integer |
Number of IP addresses owned by some users |
Taken |
taken |
Integer |
Number of owned and assigned IP addresses |
Network # Update
- Path:
- PUT /v7.0/networks/{network_id}
- Description:
- Update a network
- Authentication required:
- yes
- Scope:
- network#update
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- network
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Label |
label |
no |
String |
|
|
|
Ip_version |
ip_version |
no |
Integer |
Include- values
- [4, 6]
- message
- %{value} cannot be used
|
|
|
Address |
address |
no |
String |
|
|
|
Prefix |
prefix |
no |
Integer |
|
|
|
Role |
role |
no |
String |
Include- values
- ["public_access", "private_access"]
- message
- %{value} cannot be used
|
|
|
Managed |
managed |
no |
Boolean |
|
|
|
Split_access |
split_access |
no |
String |
Include- values
- ["no_access", "user_split", "owner_split"]
- message
- %{value} cannot be used
|
|
|
Split_prefix |
split_prefix |
no |
Integer |
|
|
|
Purpose |
purpose |
no |
String |
Include- values
- ["any", "vps", "export"]
- message
- %{value} cannot be used
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- network
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Primary_location |
primary_location |
Resource |
|
Label |
label |
String |
|
Ip_version |
ip_version |
Integer |
|
Address |
address |
String |
|
Prefix |
prefix |
Integer |
|
Role |
role |
String |
|
Managed |
managed |
Boolean |
|
Split_access |
split_access |
String |
|
Split_prefix |
split_prefix |
Integer |
|
Purpose |
purpose |
String |
|
Size |
size |
Integer |
Number of possible host IP addresses |
Used |
used |
Integer |
Number of IP addresses present in vpsAdmin |
Assigned |
assigned |
Integer |
Number of IP addresses assigned to VPSes |
Owned |
owned |
Integer |
Number of IP addresses owned by some users |
Taken |
taken |
Integer |
Number of owned and assigned IP addresses |
Network interface
Manage VPS network interfaces
Network interface # Index
- Path:
- GET /v7.0/network_interfaces
- Description:
- List network interfaces
- Authentication required:
- yes
- Scope:
- network_interface#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- network_interface
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
VPS |
vps |
no |
Resource |
|
|
VPS the interface is assigned to, can be null |
Location |
location |
no |
Resource |
|
|
Location this IP address is available in |
User |
user |
no |
Resource |
|
|
|
Output parameters
- Layout:
- object_list
- Namespace:
- network_interfaces
Label |
Name |
Type |
Description |
ID |
id |
Integer |
Interface ID |
VPS |
vps |
Resource |
VPS the interface is assigned to, can be null |
Name |
name |
String |
|
Type |
type |
String |
|
MAC Address |
mac |
String |
|
Max outgoing data throughput |
max_tx |
Integer |
|
Max incoming data throughput |
max_rx |
Integer |
|
Network interface # Show
- Path:
- GET /v7.0/network_interfaces/{network_interface_id}
- Description:
- Show a network interface
- Authentication required:
- yes
- Scope:
- network_interface#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- network_interface
Label |
Name |
Type |
Description |
ID |
id |
Integer |
Interface ID |
VPS |
vps |
Resource |
VPS the interface is assigned to, can be null |
Name |
name |
String |
|
Type |
type |
String |
|
MAC Address |
mac |
String |
|
Max outgoing data throughput |
max_tx |
Integer |
|
Max incoming data throughput |
max_rx |
Integer |
|
Network interface # Update
- Path:
- PUT /v7.0/network_interfaces/{network_interface_id}
- Description:
- Modify a network interface
- Authentication required:
- yes
- Scope:
- network_interface#update
- Aliases:
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- network_interface
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Name |
name |
no |
String |
Format- rx
- \A[a-zA-Z\-_.0-9]{1,30}\z
- match
- true
- description
- message
- bad format
|
|
|
Max outgoing data throughput |
max_tx |
no |
Integer |
|
|
|
Max incoming data throughput |
max_rx |
no |
Integer |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- network_interface
Label |
Name |
Type |
Description |
ID |
id |
Integer |
Interface ID |
VPS |
vps |
Resource |
VPS the interface is assigned to, can be null |
Name |
name |
String |
|
Type |
type |
String |
|
MAC Address |
mac |
String |
|
Max outgoing data throughput |
max_tx |
Integer |
|
Max incoming data throughput |
max_rx |
Integer |
|
Network interface accounting
Network interface accounting
Network interface accounting # Index
- Path:
- GET /v7.0/network_interface_accountings
- Description:
- List network interface accounting
- Authentication required:
- yes
- Scope:
- network_interface_accounting#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- network_interface_accounting
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
25 |
Number of objects to retrieve |
User |
user |
no |
Resource |
|
|
|
Environment |
environment |
no |
Resource |
|
|
|
Location |
location |
no |
Resource |
|
|
|
Node |
node |
no |
Resource |
|
|
|
VPS |
vps |
no |
Resource |
|
|
|
Year |
year |
no |
Integer |
|
|
|
Month |
month |
no |
Integer |
|
|
|
From |
from |
no |
Datetime |
|
|
|
To |
to |
no |
Datetime |
|
|
|
Order |
order |
no |
String |
Include- values
- ["created_at", "updated_at", "descending", "ascending"]
- message
- %{value} cannot be used
|
created_at |
|
From_bytes |
from_bytes |
no |
Integer |
|
|
Paginate by in/out bytes |
From_date |
from_date |
no |
Datetime |
|
|
Paginate by create/update date |
Output parameters
- Layout:
- object_list
- Namespace:
- network_interface_accountings
Label |
Name |
Type |
Description |
NetworkInterface |
network_interface |
Resource |
|
Bytes |
bytes |
Integer |
|
Bytes_in |
bytes_in |
Integer |
|
Bytes_out |
bytes_out |
Integer |
|
Packets |
packets |
Integer |
|
Packets_in |
packets_in |
Integer |
|
Packets_out |
packets_out |
Integer |
|
Year |
year |
Integer |
|
Month |
month |
Integer |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Network interface accounting # User_top
- Path:
- GET /v7.0/network_interface_accountings/user_top
- Description:
- Summed users' traffic
- Authentication required:
- yes
- Scope:
- network_interface_accounting#user_top
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- network_interface_accounting
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
25 |
Number of objects to retrieve |
Environment |
environment |
no |
Resource |
|
|
|
Location |
location |
no |
Resource |
|
|
|
Node |
node |
no |
Resource |
|
|
|
Year |
year |
no |
Integer |
|
|
|
Month |
month |
no |
Integer |
|
|
|
From |
from |
no |
Datetime |
|
|
|
To |
to |
no |
Datetime |
|
|
|
From_bytes |
from_bytes |
no |
Integer |
|
|
Paginate by in/out bytes |
Output parameters
- Layout:
- object_list
- Namespace:
- network_interface_accountings
Label |
Name |
Type |
Description |
User |
user |
Resource |
|
Bytes |
bytes |
Integer |
|
Bytes_in |
bytes_in |
Integer |
|
Bytes_out |
bytes_out |
Integer |
|
Packets |
packets |
Integer |
|
Packets_in |
packets_in |
Integer |
|
Packets_out |
packets_out |
Integer |
|
Year |
year |
Integer |
|
Month |
month |
Integer |
|
Network interface monitor
View current network interface traffic
Network interface monitor # Index
- Path:
- GET /v7.0/network_interface_monitors
- Description:
- List current network interface traffic
- Authentication required:
- yes
- Scope:
- network_interface_monitor#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- network_interface_monitor
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
25 |
Number of objects to retrieve |
User |
user |
no |
Resource |
|
|
|
Environment |
environment |
no |
Resource |
|
|
|
Location |
location |
no |
Resource |
|
|
|
Node |
node |
no |
Resource |
|
|
|
VPS |
vps |
no |
Resource |
|
|
|
NetworkInterface |
network_interface |
no |
Resource |
|
|
|
Order |
order |
no |
String |
|
-bytes |
|
Output parameters
- Layout:
- object_list
- Namespace:
- network_interface_monitors
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
NetworkInterface |
network_interface |
Resource |
|
Bytes |
bytes |
Integer |
|
Bytes_in |
bytes_in |
Integer |
|
Bytes_out |
bytes_out |
Integer |
|
Packets |
packets |
Integer |
|
Packets_in |
packets_in |
Integer |
|
Packets_out |
packets_out |
Integer |
|
Delta |
delta |
Integer |
|
Updated_at |
updated_at |
Datetime |
|
Network interface monitor # Show
- Path:
- GET /v7.0/network_interface_monitors/{network_interface_monitor_id}
- Description:
- Show current network interface traffic
- Authentication required:
- yes
- Scope:
- network_interface_monitor#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- network_interface_monitor
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
NetworkInterface |
network_interface |
Resource |
|
Bytes |
bytes |
Integer |
|
Bytes_in |
bytes_in |
Integer |
|
Bytes_out |
bytes_out |
Integer |
|
Packets |
packets |
Integer |
|
Packets_in |
packets_in |
Integer |
|
Packets_out |
packets_out |
Integer |
|
Delta |
delta |
Integer |
|
Updated_at |
updated_at |
Datetime |
|
News log
Browse and manage news
News log # Create
- Path:
- POST /v7.0/news_logs
- Description:
- Publish news
- Authentication required:
- yes
- Scope:
- news_log#create
- Aliases:
- new
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- news_log
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Message |
message |
yes |
Text |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Published at |
published_at |
no |
Datetime |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- news_log
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Message |
message |
Text |
|
Published at |
published_at |
Datetime |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
News log # Delete
- Path:
- DELETE /v7.0/news_logs/{news_log_id}
- Description:
- Delete news
- Authentication required:
- yes
- Scope:
- news_log#delete
- Aliases:
- destroy
- Blocking:
- no
Input parameters
Output parameters
News log # Index
- Path:
- GET /v7.0/news_logs
- Description:
- List news
- Authentication required:
- no
- Scope:
- news_log#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- news_log
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Since |
since |
no |
Datetime |
|
|
List news published later than this date |
Output parameters
- Layout:
- object_list
- Namespace:
- news_logs
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Message |
message |
Text |
|
Published at |
published_at |
Datetime |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
News log # Show
- Path:
- GET /v7.0/news_logs/{news_log_id}
- Description:
- Show news
- Authentication required:
- no
- Scope:
- news_log#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- news_log
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Message |
message |
Text |
|
Published at |
published_at |
Datetime |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
News log # Update
- Path:
- PUT /v7.0/news_logs/{news_log_id}
- Description:
- Update news
- Authentication required:
- yes
- Scope:
- news_log#update
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- news_log
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Message |
message |
yes |
Text |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Published at |
published_at |
no |
Datetime |
|
|
|
Output parameters
- Layout:
- object
- Namespace:
- news_log
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Message |
message |
Text |
|
Published at |
published_at |
Datetime |
|
Created_at |
created_at |
Datetime |
|
Updated_at |
updated_at |
Datetime |
|
Node
Manage nodes
Node # Create
- Path:
- POST /v7.0/nodes
- Description:
- Create a new node
- Authentication required:
- yes
- Scope:
- node#create
- Aliases:
- new
- Blocking:
- yes
Input parameters
- Layout:
- object
- Namespace:
- node
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
ID |
id |
no |
Integer |
|
|
Node ID |
Name |
name |
yes |
String |
Present- empty
- false
- message
- must be present and non-empty
Format- rx
- \A[a-zA-Z0-9.\-_]+\z
- match
- true
- description
- message
- invalid format
|
|
Node name |
Role |
type |
yes |
String |
Include- values
- ["node", "storage", "mailer", "dns_server"]
- message
- %{value} cannot be used
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Hypervisor type |
hypervisor_type |
no |
String |
Include- values
- ["vpsadminos"]
- message
- %{value} cannot be used
|
|
vpsadminos |
Location |
location |
yes |
Resource |
|
|
Location node is placed in |
IPv4 address |
ip_addr |
yes |
String |
Present- empty
- false
- message
- must be present and non-empty
Format- rx
- \A\d+\.\d+\.\d+\.\d+\z
- match
- true
- description
- message
- not a valid IPv4 address
|
|
Node's IP address |
Max tx |
max_tx |
no |
Integer |
|
|
Maximum output throughput |
Max tx |
max_rx |
no |
Integer |
|
|
Maximum input throughput |
Cpus |
cpus |
yes |
Integer |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Total_memory |
total_memory |
yes |
Integer |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Total_swap |
total_swap |
yes |
Integer |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Max_vps |
max_vps |
no |
Integer |
|
|
|
Maintenance |
maintenance |
no |
Boolean |
|
|
Put the node into maintenance mode |
Output parameters
- Layout:
- object
- Namespace:
- node
Label |
Name |
Type |
Description |
ID |
id |
Integer |
Node ID |
Active |
active |
Boolean |
|
Name |
name |
String |
Node name |
Domain name |
domain_name |
String |
Node name including location domain |
FQDN |
fqdn |
String |
|
Role |
type |
String |
|
Hypervisor type |
hypervisor_type |
String |
vpsadminos |
Location |
location |
Resource |
Location node is placed in |
IPv4 address |
ip_addr |
String |
Node's IP address |
Max tx |
max_tx |
Integer |
Maximum output throughput |
Max tx |
max_rx |
Integer |
Maximum input throughput |
Cpus |
cpus |
Integer |
|
Total_memory |
total_memory |
Integer |
|
Total_swap |
total_swap |
Integer |
|
Max_vps |
max_vps |
Integer |
|
Status |
status |
Boolean |
|
Uptime |
uptime |
Integer |
|
Loadavg1 |
loadavg1 |
Float |
|
Loadavg5 |
loadavg5 |
Float |
|
Loadavg15 |
loadavg15 |
Float |
|
Process count |
process_count |
Integer |
|
Cpu_user |
cpu_user |
Float |
|
Cpu_nice |
cpu_nice |
Float |
|
Cpu_system |
cpu_system |
Float |
|
Cpu_idle |
cpu_idle |
Float |
|
Cpu_iowait |
cpu_iowait |
Float |
|
Cpu_irq |
cpu_irq |
Float |
|
Cpu_softirq |
cpu_softirq |
Float |
|
Cpu_guest |
cpu_guest |
Float |
|
Used memory |
used_memory |
Integer |
in MB |
Used swap |
used_swap |
Integer |
in MB |
Arc_c_max |
arc_c_max |
Integer |
|
Arc_c |
arc_c |
Integer |
|
Arc_size |
arc_size |
Integer |
|
Arc_hitpercent |
arc_hitpercent |
Integer |
|
Version |
version |
String |
|
Kernel |
kernel |
String |
|
Cgroup version |
cgroup_version |
String |
|
Pool_state |
pool_state |
String |
|
Pool_scan |
pool_scan |
String |
|
Pool_scan_percent |
pool_scan_percent |
Float |
|
Pool_checked_at |
pool_checked_at |
Datetime |
|
Pool_status |
pool_status |
Boolean |
|
Node # Evacuate
- Path:
- POST /v7.0/nodes/{node_id}/evacuate
- Description:
- Evacuate node
- Authentication required:
- yes
- Scope:
- node#evacuate
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- node
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Target node |
dst_node |
yes |
Resource |
|
|
|
Stop on error |
stop_on_error |
no |
Boolean |
|
true |
|
Maintenance_window |
maintenance_window |
no |
Boolean |
|
true |
Run migrations in every VPS's maintenance window |
Concurrency |
concurrency |
no |
Integer |
|
1 |
How many migrations run concurrently |
Cleanup_data |
cleanup_data |
no |
Boolean |
|
true |
|
Send_mail |
send_mail |
no |
Boolean |
|
true |
|
Reason |
reason |
no |
String |
|
|
|
Output parameters
- Layout:
- hash
- Namespace:
- node
Label |
Name |
Type |
Description |
Migration_plan_id |
migration_plan_id |
Integer |
|
Node # Index
- Path:
- GET /v7.0/nodes
- Description:
- List nodes
- Authentication required:
- yes
- Scope:
- node#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- node
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
Number of objects to retrieve |
Location |
location |
no |
Resource |
|
|
Location node is placed in |
Environment |
environment |
no |
Resource |
|
|
|
Role |
type |
no |
String |
Include- values
- ["node", "storage", "mailer", "dns_server"]
- message
- %{value} cannot be used
|
|
|
Hypervisor type |
hypervisor_type |
no |
String |
Include- values
- ["vpsadminos"]
- message
- %{value} cannot be used
|
|
vpsadminos |
State |
state |
no |
String |
Include- values
- ["all", "active", "inactive"]
- message
- %{value} cannot be used
|
|
|
Output parameters
- Layout:
- object_list
- Namespace:
- nodes
Label |
Name |
Type |
Description |
ID |
id |
Integer |
Node ID |
Active |
active |
Boolean |
|
Name |
name |
String |
Node name |
Domain name |
domain_name |
String |
Node name including location domain |
FQDN |
fqdn |
String |
|
Role |
type |
String |
|
Hypervisor type |
hypervisor_type |
String |
vpsadminos |
Location |
location |
Resource |
Location node is placed in |
IPv4 address |
ip_addr |
String |
Node's IP address |
Max tx |
max_tx |
Integer |
Maximum output throughput |
Max tx |
max_rx |
Integer |
Maximum input throughput |
Cpus |
cpus |
Integer |
|
Total_memory |
total_memory |
Integer |
|
Total_swap |
total_swap |
Integer |
|
Max_vps |
max_vps |
Integer |
|
Status |
status |
Boolean |
|
Uptime |
uptime |
Integer |
|
Loadavg1 |
loadavg1 |
Float |
|
Loadavg5 |
loadavg5 |
Float |
|
Loadavg15 |
loadavg15 |
Float |
|
Process count |
process_count |
Integer |
|
Cpu_user |
cpu_user |
Float |
|
Cpu_nice |
cpu_nice |
Float |
|
Cpu_system |
cpu_system |
Float |
|
Cpu_idle |
cpu_idle |
Float |
|
Cpu_iowait |
cpu_iowait |
Float |
|
Cpu_irq |
cpu_irq |
Float |
|
Cpu_softirq |
cpu_softirq |
Float |
|
Cpu_guest |
cpu_guest |
Float |
|
Used memory |
used_memory |
Integer |
in MB |
Used swap |
used_swap |
Integer |
in MB |
Arc_c_max |
arc_c_max |
Integer |
|
Arc_c |
arc_c |
Integer |
|
Arc_size |
arc_size |
Integer |
|
Arc_hitpercent |
arc_hitpercent |
Integer |
|
Version |
version |
String |
|
Kernel |
kernel |
String |
|
Cgroup version |
cgroup_version |
String |
|
Pool_state |
pool_state |
String |
|
Pool_scan |
pool_scan |
String |
|
Pool_scan_percent |
pool_scan_percent |
Float |
|
Pool_checked_at |
pool_checked_at |
Datetime |
|
Pool_status |
pool_status |
Boolean |
|
Maintenance lock |
maintenance_lock |
String |
|
Maintenance reason |
maintenance_lock_reason |
String |
|
Examples
Example #0
Ruby
require 'haveapi-client'
client = HaveAPI::Client.new("https://api.vpsfree.cz", version: "7.0")
reply = client.node.index
# reply is an instance of HaveAPI::Client::ResourceInstanceList,
# which is a subclass of Array
JavaScript
import HaveAPI from 'haveapi-client'
var api = new HaveAPI.Client("https://api.vpsfree.cz", {version: "7.0"});
api.node.index(function (client, reply) {
console.log('Response', reply);
// reply is an instance of HaveAPI.Client.ResourceInstanceList
});
PHP
$api = new \HaveAPI\Client("https://api.vpsfree.cz", "7.0");
$reply = $api->node->index();
// $reply is an instance of \HaveAPI\Client\ResourceInstanceList
CLI
$ haveapi-cli -u https://api.vpsfree.cz --version 7.0 node index
ID: 1
Active: -
Name: node1
Domain name: -
FQDN: -
Role: node
Hypervisor type: -
Location: The Location (#1)
IPv4 address: 192.168.0.10
Max tx: -
Max tx: -
Cpus: -
Total_memory: -
Total_swap: -
Max_vps: -
Status: -
Uptime: -
Loadavg1: -
Loadavg5: -
Loadavg15: -
Process count: -
Cpu_user: -
Cpu_nice: -
Cpu_system: -
Cpu_idle: -
Cpu_iowait: -
Cpu_irq: -
Cpu_softirq: -
Cpu_guest: -
Used memory: -
Used swap: -
Arc_c_max: -
Arc_c: -
Arc_size: -
Arc_hitpercent: -
Version: -
Kernel: -
Cgroup version: -
Pool_state: -
Pool_scan: -
Pool_scan_percent: -
Pool_checked_at: -
Pool_status: -
Maintenance lock: no
Maintenance reason: -
File system
# Mount the file system
$ haveapi-fs https://api.vpsfree.cz /mnt/api.vpsfree.cz -o version=7.0
# Change to action directory
$ cd /mnt/api.vpsfree.cz/node/actions/index
# Execute the action
$ echo 1 > exec
# Query the action's result
$ cat status
1
curl
Request
$ curl --request GET \
--data-binary "{
\"node\": {}
}" \
'https://api.vpsfree.cz/v7.0/nodes'
Response
{
"status": true,
"message": null,
"response": {
"nodes": [
{
"id": 1,
"name": "node1",
"type": "node",
"location": {
"id": 1,
"label": "The Location"
},
"ip_addr": "192.168.0.10",
"maintenance_lock": "no"
}
]
},
"errors": null
}
HTTP
Request
GET /v7.0/nodes HTTP/1.1
Host: api.vpsfree.cz
Content-Type: application/json
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 335
{
"status": true,
"message": null,
"response": {
"nodes": [
{
"id": 1,
"name": "node1",
"type": "node",
"location": {
"id": 1,
"label": "The Location"
},
"ip_addr": "192.168.0.10",
"maintenance_lock": "no"
}
]
},
"errors": null
}
Node # Overview_list
- Path:
- GET /v7.0/nodes/overview_list
- Description:
- List all nodes with some additional information
- Authentication required:
- yes
- Scope:
- node#overview_list
- Aliases:
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object_list
- Namespace:
- nodes
Label |
Name |
Type |
Description |
ID |
id |
Integer |
Node ID |
Active |
active |
Boolean |
|
Name |
name |
String |
Node name |
Domain name |
domain_name |
String |
Node name including location domain |
FQDN |
fqdn |
String |
|
Role |
type |
String |
|
Hypervisor type |
hypervisor_type |
String |
vpsadminos |
Location |
location |
Resource |
Location node is placed in |
IPv4 address |
ip_addr |
String |
Node's IP address |
Max tx |
max_tx |
Integer |
Maximum output throughput |
Max tx |
max_rx |
Integer |
Maximum input throughput |
Cpus |
cpus |
Integer |
|
Total_memory |
total_memory |
Integer |
|
Total_swap |
total_swap |
Integer |
|
Max_vps |
max_vps |
Integer |
|
Status |
status |
Boolean |
|
Uptime |
uptime |
Integer |
|
Loadavg1 |
loadavg1 |
Float |
|
Loadavg5 |
loadavg5 |
Float |
|
Loadavg15 |
loadavg15 |
Float |
|
Process count |
process_count |
Integer |
|
Cpu_user |
cpu_user |
Float |
|
Cpu_nice |
cpu_nice |
Float |
|
Cpu_system |
cpu_system |
Float |
|
Cpu_idle |
cpu_idle |
Float |
|
Cpu_iowait |
cpu_iowait |
Float |
|
Cpu_irq |
cpu_irq |
Float |
|
Cpu_softirq |
cpu_softirq |
Float |
|
Cpu_guest |
cpu_guest |
Float |
|
Used memory |
used_memory |
Integer |
in MB |
Used swap |
used_swap |
Integer |
in MB |
Arc_c_max |
arc_c_max |
Integer |
|
Arc_c |
arc_c |
Integer |
|
Arc_size |
arc_size |
Integer |
|
Arc_hitpercent |
arc_hitpercent |
Integer |
|
Version |
version |
String |
|
Kernel |
kernel |
String |
|
Cgroup version |
cgroup_version |
String |
|
Pool_state |
pool_state |
String |
|
Pool_scan |
pool_scan |
String |
|
Pool_scan_percent |
pool_scan_percent |
Float |
|
Pool_checked_at |
pool_checked_at |
Datetime |
|
Pool_status |
pool_status |
Boolean |
|
Last report |
last_report |
Datetime |
|
Running VPS |
vps_running |
Integer |
Number of running VPSes |
Stopped VPS |
vps_stopped |
Integer |
Number of stopped VPSes |
Deleted VPS |
vps_deleted |
Integer |
Number of lazily deleted VPSes |
Total VPS |
vps_total |
Integer |
Total number of VPSes |
Free VPS slots |
vps_free |
Integer |
Number of free VPS slots |
Max VPS slots |
vps_max |
Integer |
Number of running VPSes |
Maintenance lock |
maintenance_lock |
String |
|
Maintenance reason |
maintenance_lock_reason |
String |
|
Node # Public_status
- Path:
- GET /v7.0/nodes/public_status
- Description:
- Public node status
- Authentication required:
- no
- Scope:
- node#public_status
- Aliases:
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object_list
- Namespace:
- nodes
Label |
Name |
Type |
Description |
Id |
id |
Integer |
|
Status |
status |
Boolean |
|
Node name |
name |
String |
|
FQDN |
fqdn |
String |
|
Location |
location |
Resource |
Location node is placed in |
Last report |
last_report |
Datetime |
|
VPS count |
vps_count |
Integer |
|
Free VPS slots |
vps_free |
Integer |
|
Kernel |
kernel |
String |
|
Role |
type |
String |
node, storage or mailer |
Hypervisor type |
hypervisor_type |
String |
vpsadminos |
CPU idle |
cpu_idle |
Float |
|
Cgroup version |
cgroup_version |
String |
|
Pool_state |
pool_state |
String |
|
Pool_scan |
pool_scan |
String |
|
Pool_scan_percent |
pool_scan_percent |
Float |
|
Pool_checked_at |
pool_checked_at |
Datetime |
|
Pool_status |
pool_status |
Boolean |
|
Maintenance lock |
maintenance_lock |
String |
|
Maintenance reason |
maintenance_lock_reason |
String |
|
Examples
Example #0
Ruby
require 'haveapi-client'
client = HaveAPI::Client.new("https://api.vpsfree.cz", version: "7.0")
reply = client.node.public_status
# reply is an instance of HaveAPI::Client::ResourceInstanceList,
# which is a subclass of Array
JavaScript
import HaveAPI from 'haveapi-client'
var api = new HaveAPI.Client("https://api.vpsfree.cz", {version: "7.0"});
api.node.public_status(function (client, reply) {
console.log('Response', reply);
// reply is an instance of HaveAPI.Client.ResourceInstanceList
});
PHP
$api = new \HaveAPI\Client("https://api.vpsfree.cz", "7.0");
$reply = $api->node->public_status();
// $reply is an instance of \HaveAPI\Client\ResourceInstanceList
CLI
$ haveapi-cli -u https://api.vpsfree.cz --version 7.0 node public_status
Id Status Node name FQDN Location Last report VPS count Free VPS slots Kernel Role Hypervisor type CPU idle Cgroup version Pool_state Pool_scan Pool_scan_percent Pool_checked_at Pool_status Maintenance lock Maintenance reason
- true node1.prg - Prague (#1) 2016-11-20T08:30:50+01:00 68 12 2.6.32-042stab120.6 - - 65.3 - - - - - - - -
- - node2.prg - Prague (#1) 2016-11-14T06:41:23+01:00 0 80 2.6.32-042stab120.6 - - 100.0 - - - - - - lock HW upgrade
- true node3.prg - Prague (#1) 2016-11-20T08:30:46+01:00 65 15 2.6.32-042stab120.6 - - 72.6 - - - - - - - -
File system
# Mount the file system
$ haveapi-fs https://api.vpsfree.cz /mnt/api.vpsfree.cz -o version=7.0
# Change to action directory
$ cd /mnt/api.vpsfree.cz/node/actions/public_status
# Execute the action
$ echo 1 > exec
# Query the action's result
$ cat status
1
curl
Request
$ curl --request GET \
--data-binary "{
\"node\": {}
}" \
'https://api.vpsfree.cz/v7.0/nodes/public_status'
Response
{
"status": true,
"message": null,
"response": {
"nodes": [
{
"status": true,
"name": "node1.prg",
"location": {
"id": 1,
"label": "Prague"
},
"last_report": "2016-11-20T08:30:50+01:00",
"vps_count": 68,
"vps_free": 12,
"kernel": "2.6.32-042stab120.6",
"cpu_idle": 65.3
},
{
"status": false,
"name": "node2.prg",
"location": {
"id": 1,
"label": "Prague"
},
"last_report": "2016-11-14T06:41:23+01:00",
"vps_count": 0,
"vps_free": 80,
"kernel": "2.6.32-042stab120.6",
"cpu_idle": 100.0,
"maintenance_lock": "lock",
"maintenance_lock_reason": "HW upgrade"
},
{
"status": true,
"name": "node3.prg",
"location": {
"id": 1,
"label": "Prague"
},
"last_report": "2016-11-20T08:30:46+01:00",
"vps_count": 65,
"vps_free": 15,
"kernel": "2.6.32-042stab120.6",
"cpu_idle": 72.6
}
]
},
"errors": null
}
HTTP
Request
GET /v7.0/nodes/public_status HTTP/1.1
Host: api.vpsfree.cz
Content-Type: application/json
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 1135
{
"status": true,
"message": null,
"response": {
"nodes": [
{
"status": true,
"name": "node1.prg",
"location": {
"id": 1,
"label": "Prague"
},
"last_report": "2016-11-20T08:30:50+01:00",
"vps_count": 68,
"vps_free": 12,
"kernel": "2.6.32-042stab120.6",
"cpu_idle": 65.3
},
{
"status": false,
"name": "node2.prg",
"location": {
"id": 1,
"label": "Prague"
},
"last_report": "2016-11-14T06:41:23+01:00",
"vps_count": 0,
"vps_free": 80,
"kernel": "2.6.32-042stab120.6",
"cpu_idle": 100.0,
"maintenance_lock": "lock",
"maintenance_lock_reason": "HW upgrade"
},
{
"status": true,
"name": "node3.prg",
"location": {
"id": 1,
"label": "Prague"
},
"last_report": "2016-11-20T08:30:46+01:00",
"vps_count": 65,
"vps_free": 15,
"kernel": "2.6.32-042stab120.6",
"cpu_idle": 72.6
}
]
},
"errors": null
}
Node # Set_maintenance
- Path:
- POST /v7.0/nodes/{node_id}/set_maintenance
- Description:
- Set maintenance lock
- Authentication required:
- yes
- Scope:
- node#set_maintenance
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- hash
- Namespace:
- node
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Lock |
lock |
yes |
Boolean |
Present- empty
- false
- message
- must be present and non-empty
|
|
|
Reason |
reason |
no |
String |
|
|
|
Output parameters
Node # Show
- Path:
- GET /v7.0/nodes/{node_id}
- Description:
- Show node
- Authentication required:
- yes
- Scope:
- node#show
- Aliases:
- find
- Blocking:
- no
Input parameters
Output parameters
- Layout:
- object
- Namespace:
- node
Label |
Name |
Type |
Description |
ID |
id |
Integer |
Node ID |
Active |
active |
Boolean |
|
Name |
name |
String |
Node name |
Domain name |
domain_name |
String |
Node name including location domain |
FQDN |
fqdn |
String |
|
Role |
type |
String |
|
Hypervisor type |
hypervisor_type |
String |
vpsadminos |
Location |
location |
Resource |
Location node is placed in |
IPv4 address |
ip_addr |
String |
Node's IP address |
Max tx |
max_tx |
Integer |
Maximum output throughput |
Max tx |
max_rx |
Integer |
Maximum input throughput |
Cpus |
cpus |
Integer |
|
Total_memory |
total_memory |
Integer |
|
Total_swap |
total_swap |
Integer |
|
Max_vps |
max_vps |
Integer |
|
Status |
status |
Boolean |
|
Uptime |
uptime |
Integer |
|
Loadavg1 |
loadavg1 |
Float |
|
Loadavg5 |
loadavg5 |
Float |
|
Loadavg15 |
loadavg15 |
Float |
|
Process count |
process_count |
Integer |
|
Cpu_user |
cpu_user |
Float |
|
Cpu_nice |
cpu_nice |
Float |
|
Cpu_system |
cpu_system |
Float |
|
Cpu_idle |
cpu_idle |
Float |
|
Cpu_iowait |
cpu_iowait |
Float |
|
Cpu_irq |
cpu_irq |
Float |
|
Cpu_softirq |
cpu_softirq |
Float |
|
Cpu_guest |
cpu_guest |
Float |
|
Used memory |
used_memory |
Integer |
in MB |
Used swap |
used_swap |
Integer |
in MB |
Arc_c_max |
arc_c_max |
Integer |
|
Arc_c |
arc_c |
Integer |
|
Arc_size |
arc_size |
Integer |
|
Arc_hitpercent |
arc_hitpercent |
Integer |
|
Version |
version |
String |
|
Kernel |
kernel |
String |
|
Cgroup version |
cgroup_version |
String |
|
Pool_state |
pool_state |
String |
|
Pool_scan |
pool_scan |
String |
|
Pool_scan_percent |
pool_scan_percent |
Float |
|
Pool_checked_at |
pool_checked_at |
Datetime |
|
Pool_status |
pool_status |
Boolean |
|
Maintenance lock |
maintenance_lock |
String |
|
Maintenance reason |
maintenance_lock_reason |
String |
|
Examples
Example #0
Ruby
require 'haveapi-client'
client = HaveAPI::Client.new("https://api.vpsfree.cz", version: "7.0")
reply = client.node.show(2)
# reply is an instance of HaveAPI::Client::ResourceInstance
# reply.id = 2
# reply.name = "node2"
# reply.type = "node"
# reply.location = HaveAPI::Client::ResourceInstance(resource: location, id: 1, label: "The Location")
# reply.ip_addr = "192.168.0.11"
# reply.maintenance_lock = "no"
JavaScript
import HaveAPI from 'haveapi-client'
var api = new HaveAPI.Client("https://api.vpsfree.cz", {version: "7.0"});
api.node.show(2, function (client, reply) {
console.log('Response', reply);
// reply is an instance of HaveAPI.Client.ResourceInstance
// reply.id = 2
// reply.name = "node2"
// reply.type = "node"
// reply.location = HaveAPI.Client.ResourceInstance(resource: location, id: 1, label: "The Location")
// reply.ip_addr = "192.168.0.11"
// reply.maintenance_lock = "no"
});
PHP
$api = new \HaveAPI\Client("https://api.vpsfree.cz", "7.0");
$reply = $api->node->show(2);
// $reply is an instance of \HaveAPI\Client\ResourceInstance
// $reply->id = 2
// $reply->name = "node2"
// $reply->type = "node"
// $reply->location = \HaveAPI\Client\ResourceInstance(resource: location, id: 1, label: "The Location")
// $reply->ip_addr = "192.168.0.11"
// $reply->maintenance_lock = "no"
CLI
$ haveapi-cli -u https://api.vpsfree.cz --version 7.0 node show 2
ID: 2
Active: -
Name: node2
Domain name: -
FQDN: -
Role: node
Hypervisor type: -
Location: The Location (#1)
IPv4 address: 192.168.0.11
Max tx: -
Max tx: -
Cpus: -
Total_memory: -
Total_swap: -
Max_vps: -
Status: -
Uptime: -
Loadavg1: -
Loadavg5: -
Loadavg15: -
Process count: -
Cpu_user: -
Cpu_nice: -
Cpu_system: -
Cpu_idle: -
Cpu_iowait: -
Cpu_irq: -
Cpu_softirq: -
Cpu_guest: -
Used memory: -
Used swap: -
Arc_c_max: -
Arc_c: -
Arc_size: -
Arc_hitpercent: -
Version: -
Kernel: -
Cgroup version: -
Pool_state: -
Pool_scan: -
Pool_scan_percent: -
Pool_checked_at: -
Pool_status: -
Maintenance lock: no
Maintenance reason: -
File system
# Mount the file system
$ haveapi-fs https://api.vpsfree.cz /mnt/api.vpsfree.cz -o version=7.0
# Change to action directory
$ cd /mnt/api.vpsfree.cz/node/actions/show
# Execute the action
$ echo 1 > exec
# Query the action's result
$ cat status
1
# Query the output parameters
$ cat output/id
2
$ cat output/name
node2
$ cat output/type
node
$ cat output/location
{:id=>1, :label=>"The Location"}
$ cat output/ip_addr
192.168.0.11
$ cat output/maintenance_lock
no
curl
Request
$ curl --request GET \
--data-binary "{
\"node\": {}
}" \
'https://api.vpsfree.cz/v7.0/nodes/2'
Response
{
"status": true,
"message": null,
"response": {
"node": {
"id": 2,
"name": "node2",
"type": "node",
"location": {
"id": 1,
"label": "The Location"
},
"ip_addr": "192.168.0.11",
"maintenance_lock": "no"
}
},
"errors": null
}
HTTP
Request
GET /v7.0/nodes/2 HTTP/1.1
Host: api.vpsfree.cz
Content-Type: application/json
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 300
{
"status": true,
"message": null,
"response": {
"node": {
"id": 2,
"name": "node2",
"type": "node",
"location": {
"id": 1,
"label": "The Location"
},
"ip_addr": "192.168.0.11",
"maintenance_lock": "no"
}
},
"errors": null
}
Node # Update
- Path:
- PUT /v7.0/nodes/{node_id}
- Description:
- Update node
- Authentication required:
- yes
- Scope:
- node#update
- Aliases:
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- node
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
Active |
active |
no |
Boolean |
|
|
|
Name |
name |
no |
String |
Format- rx
- \A[a-zA-Z0-9.\-_]+\z
- match
- true
- description
- message
- invalid format
|
|
Node name |
FQDN |
fqdn |
no |
String |
|
|
|
Role |
type |
no |
String |
Include- values
- ["node", "storage", "mailer", "dns_server"]
- message
- %{value} cannot be used
|
|
|
Hypervisor type |
hypervisor_type |
no |
String |
Include- values
- ["vpsadminos"]
- message
- %{value} cannot be used
|
|
vpsadminos |
Location |
location |
no |
Resource |
|
|
Location node is placed in |
IPv4 address |
ip_addr |
no |
String |
Format- rx
- \A\d+\.\d+\.\d+\.\d+\z
- match
- true
- description
- message
- not a valid IPv4 address
|
|
Node's IP address |
Max tx |
max_tx |
no |
Integer |
|
|
Maximum output throughput |
Max tx |
max_rx |
no |
Integer |
|
|
Maximum input throughput |
Cpus |
cpus |
no |
Integer |
|
|
|
Total_memory |
total_memory |
no |
Integer |
|
|
|
Total_swap |
total_swap |
no |
Integer |
|
|
|
Max_vps |
max_vps |
no |
Integer |
|
|
|
Output parameters
Examples
Example #0
Ruby
require 'haveapi-client'
client = HaveAPI::Client.new("https://api.vpsfree.cz", version: "7.0")
reply = client.node.update(2, {:name=>"node2", :type=>"storage", :location=>1, :ip_addr=>"192.168.0.11"})
# reply is an instance of HaveAPI::Client::ResourceInstance
JavaScript
import HaveAPI from 'haveapi-client'
var api = new HaveAPI.Client("https://api.vpsfree.cz", {version: "7.0"});
api.node.update(2, {
"name": "node2",
"type": "storage",
"location": 1,
"ip_addr": "192.168.0.11"
}, function (client, reply) {
console.log('Response', reply);
// reply is an instance of HaveAPI.Client.ResourceInstance
});
PHP
$api = new \HaveAPI\Client("https://api.vpsfree.cz", "7.0");
$reply = $api->node->update(2, [
"name" => "node2",
"type" => "storage",
"location" => 1,
"ip_addr" => "192.168.0.11"
]);
// $reply is an instance of \HaveAPI\Client\ResourceInstance
CLI
$ haveapi-cli -u https://api.vpsfree.cz --version 7.0 node update 2 -- \
--name 'node2' \
--type 'storage' \
--location '1' \
--ip-addr '192.168.0.11'
File system
# Mount the file system
$ haveapi-fs https://api.vpsfree.cz /mnt/api.vpsfree.cz -o version=7.0
# Change to action directory
$ cd /mnt/api.vpsfree.cz/node/actions/update
# Prepare input parameters
$ echo 'node2' > input/name
$ echo 'storage' > input/type
$ echo '1' > input/location
$ echo '192.168.0.11' > input/ip_addr
# Execute the action
$ echo 1 > exec
# Query the action's result
$ cat status
1
curl
Request
$ curl --request PUT \
--data-binary "{
\"node\": {
\"name\": \"node2\",
\"type\": \"storage\",
\"location\": 1,
\"ip_addr\": \"192.168.0.11\"
}
}" \
'https://api.vpsfree.cz/v7.0/nodes/2'
Response
{
"status": true,
"message": null,
"response": {
"node": {}
},
"errors": null
}
HTTP
Request
PUT /v7.0/nodes/2 HTTP/1.1
Host: api.vpsfree.cz
Content-Type: application/json
{
"node": {
"name": "node2",
"type": "storage",
"location": 1,
"ip_addr": "192.168.0.11"
}
}
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 93
{
"status": true,
"message": null,
"response": {
"node": {}
},
"errors": null
}
Status
View node statuses in time
Node.Status # Index
- Path:
- GET /v7.0/nodes/{node_id}/statuses
- Description:
- Authentication required:
- yes
- Scope:
- node.status#index
- Aliases:
- list
- Blocking:
- no
Input parameters
- Layout:
- object
- Namespace:
- status
Label |
Name |
Required |
Type |
Validators |
Default |
Description |
From ID |
from_id |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
|
List objects with greater/lesser ID |
Limit |
limit |
no |
Integer |
Number- message
- has to be minimally 0
- min
- 0
|
25 |
Number of objects to retrieve |
From |
from |