Portal

Adopt this appliance into the Portal

PUT /portal/adopt

Adopt Sidecar

This change is staged. Send PUT /services/apply to apply it.

Body parameters
email string Required
password string Required
curl
curl -X PUT "https://appliance.example.com/api/v1/portal/adopt" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "email": "<email>",
  "password": "<password>"
}'
PHP
<?php

$url = 'https://appliance.example.com/api/v1/portal/adopt';
$headers = [
    'Authorization: Bearer ' . $token,
    'Content-Type: application/json',
];

$payload = [
    'email' => '<email>',
    'password' => '<password>',
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS => json_encode($payload),
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}
payload = {
    "email": "<email>",
    "password": "<password>"
}

response = requests.put("https://appliance.example.com/api/v1/portal/adopt", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/portal/adopt', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "email": "<email>",
  "password": "<password>"
}),
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Update Sidecar successfully"
}

Remote

GET /portal/remote

Remote Sidecar details

curl
curl -X GET "https://appliance.example.com/api/v1/portal/remote" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

$url = 'https://appliance.example.com/api/v1/portal/remote';
$headers = [
    'Authorization: Bearer ' . $token,
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}

response = requests.get("https://appliance.example.com/api/v1/portal/remote", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/portal/remote', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Remote Sidecar Details",
  "data": {
    "managementIP": "10.10.10.10",
    "managementPort": 12000
  }
}

PUT /portal/remote

Update Remote Sidecar

This change is staged. Send PUT /services/apply to apply it.

Body parameters
managementIP string Required
managementPort string Required
curl
curl -X PUT "https://appliance.example.com/api/v1/portal/remote" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "managementIP": "<managementIP>",
  "managementPort": "<managementPort>"
}'
PHP
<?php

$url = 'https://appliance.example.com/api/v1/portal/remote';
$headers = [
    'Authorization: Bearer ' . $token,
    'Content-Type: application/json',
];

$payload = [
    'managementIP' => '<managementIP>',
    'managementPort' => '<managementPort>',
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS => json_encode($payload),
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}
payload = {
    "managementIP": "<managementIP>",
    "managementPort": "<managementPort>"
}

response = requests.put("https://appliance.example.com/api/v1/portal/remote", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/portal/remote', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "managementIP": "<managementIP>",
  "managementPort": "<managementPort>"
}),
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Remote Sidecar updated successfully"
}

Get the Portal connection status

GET /portal/status

Status

curl
curl -X GET "https://appliance.example.com/api/v1/portal/status" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

$url = 'https://appliance.example.com/api/v1/portal/status';
$headers = [
    'Authorization: Bearer ' . $token,
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}

response = requests.get("https://appliance.example.com/api/v1/portal/status", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/portal/status', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Sidecar Details",
  "data": {
    "adopted": false
  }
}

Sidecar

GET /{applianceId}/portal/sidecar

Get Sidecar

Path parameters
applianceId string Required

The id of the cluster node the request is for.

curl
curl -X GET "https://appliance.example.com/api/v1/{applianceId}/portal/sidecar" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

$url = 'https://appliance.example.com/api/v1/{applianceId}/portal/sidecar';
$headers = [
    'Authorization: Bearer ' . $token,
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}

response = requests.get("https://appliance.example.com/api/v1/{applianceId}/portal/sidecar", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/portal/sidecar', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Sidecar Details",
  "data": []
}

PUT /{applianceId}/portal/sidecar

Update Sidecar

This change is staged. Send PUT /services/apply to apply it.

Path parameters
applianceId string Required

The id of the cluster node the request is for.

Body parameters
enabled boolean Required
portalAddress string Required
portalPort integer Required
managementIPId string Required
managementPort integer Required
subnetIds array Required
curl
curl -X PUT "https://appliance.example.com/api/v1/{applianceId}/portal/sidecar" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "enabled": true,
  "portalAddress": "<portalAddress>",
  "portalPort": 0,
  "managementIPId": "<managementIPId>",
  "managementPort": 0,
  "subnetIds": [
    "<subnetIds>"
  ]
}'
PHP
<?php

$url = 'https://appliance.example.com/api/v1/{applianceId}/portal/sidecar';
$headers = [
    'Authorization: Bearer ' . $token,
    'Content-Type: application/json',
];

$payload = [
    'enabled' => true,
    'portalAddress' => '<portalAddress>',
    'portalPort' => 0,
    'managementIPId' => '<managementIPId>',
    'managementPort' => 0,
    'subnetIds' => [
        '<subnetIds>',
    ],
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS => json_encode($payload),
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}
payload = {
    "enabled": true,
    "portalAddress": "<portalAddress>",
    "portalPort": 0,
    "managementIPId": "<managementIPId>",
    "managementPort": 0,
    "subnetIds": [
        "<subnetIds>"
    ]
}

response = requests.put("https://appliance.example.com/api/v1/{applianceId}/portal/sidecar", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/portal/sidecar', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "enabled": true,
  "portalAddress": "<portalAddress>",
  "portalPort": 0,
  "managementIPId": "<managementIPId>",
  "managementPort": 0,
  "subnetIds": [
    "<subnetIds>"
  ]
}),
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Sidecar updated successfully"
}