Backup trial state and eligibility for an instance
curl --request GET \
--url https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{instance_id}/backup-trial \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{instance_id}/backup-trial"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{instance_id}/backup-trial', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{instance_id}/backup-trial",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{instance_id}/backup-trial"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{instance_id}/backup-trial")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{instance_id}/backup-trial")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"trial": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"instance": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"instance_name": "<string>",
"whmcs_service_id": 123,
"whmcs_order_id": 123,
"whmcs_invoice_id": 123,
"status": "pending",
"source": "staff",
"trial": true,
"cycle": "<string>",
"monthly_price": "<string>",
"cycle_price": "<string>",
"credited": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"reminded_at": "2023-11-07T05:31:56Z",
"resolved_at": "2023-11-07T05:31:56Z",
"failure_reason": "<string>",
"created": "2023-11-07T05:31:56Z"
},
"eligible": true,
"reason": "<string>",
"monthly_price": "<string>",
"currency": "<string>",
"trial_days": 123
}v1
Backup trial state and eligibility for an instance
Reports whether the daily backup option can be offered on this instance and returns the latest trial for it, so the caller can either show the offer or reflect an activation already under way. reason is empty when eligible, otherwise one of instance_not_active, backup_already_enabled, missing_whmcs_service, missing_whmcs_client, trial_already_open, backup_option_unavailable, unsupported_billing_cycle.
GET
/
v1
/
organizations
/
{organization_id}
/
projects
/
{project_id}
/
compute
/
instances
/
{instance_id}
/
backup-trial
Backup trial state and eligibility for an instance
curl --request GET \
--url https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{instance_id}/backup-trial \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{instance_id}/backup-trial"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{instance_id}/backup-trial', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{instance_id}/backup-trial",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{instance_id}/backup-trial"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{instance_id}/backup-trial")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{instance_id}/backup-trial")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"trial": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"instance": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"instance_name": "<string>",
"whmcs_service_id": 123,
"whmcs_order_id": 123,
"whmcs_invoice_id": 123,
"status": "pending",
"source": "staff",
"trial": true,
"cycle": "<string>",
"monthly_price": "<string>",
"cycle_price": "<string>",
"credited": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"reminded_at": "2023-11-07T05:31:56Z",
"resolved_at": "2023-11-07T05:31:56Z",
"failure_reason": "<string>",
"created": "2023-11-07T05:31:56Z"
},
"eligible": true,
"reason": "<string>",
"monthly_price": "<string>",
"currency": "<string>",
"trial_days": 123
}Authorizations
Use Authorization: Bearer <token> header. Token can be a JWT token or an API key (format: sk-onetsolutions-...).
Path Parameters
⌘I

