Developer Access

Swagger reference and real integration examples are ready together.

This page provides endpoint reference documentation. For a fast start, you can use the PHP, Node.js and Python examples below and then continue with the separate how-to guide.

1. Create a token

Create an API client from the admin panel and save the token when it is shown for the first and only time.

2. Test with ping

`GET /api/v1/ping` is the fastest way to verify auth, headers and connectivity.

3. Use the task model

Provision, format and snapshot operations are asynchronous and return tasks; follow progress from task endpoints.

Quick Start Examples

The examples below help you build the integration skeleton even without Swagger. For a more detailed tutorial, continue with the How-To Guide.

<?php
$baseUrl = rtrim('https://yamanvm.yamanhosting.com', '/');
$token = 'yvm_live_xxxxxxxxxxxxxxxxx';
$requestId = 'php-quickstart-001';

$headers = [
    'Authorization: Bearer ' . $token,
    'Accept: application/json',
    'X-Request-Id: ' . $requestId,
];

$ch = curl_init($baseUrl . '/api/v1/ping');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => $headers,
]);

$raw = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

$data = json_decode($raw, true);
var_dump($status, $data);
const baseUrl = 'https://yamanvm.yamanhosting.com';
const token = 'yvm_live_xxxxxxxxxxxxxxxxx';

const response = await fetch(`${baseUrl}/api/v1/servers`, {
  headers: {
    Authorization: `Bearer ${token}`,
    Accept: 'application/json',
    'X-Request-Id': 'node-quickstart-001',
  },
});

const data = await response.json();
console.log(response.status, data);
import requests

base_url = "https://yamanvm.yamanhosting.com"
token = "yvm_live_xxxxxxxxxxxxxxxxx"

response = requests.get(
    f"{base_url}/api/v1/servers/3/tasks",
    headers={
        "Authorization": f"Bearer {token}",
        "Accept": "application/json",
        "X-Request-Id": "python-quickstart-001",
    },
    timeout=30,
)

print(response.status_code)
print(response.json())