Gets Parallels Desktop active license:
This endpoint returns Parallels Desktop active license
/v1/parallels_desktop/key
curl --location 'http://localhost/api/v1/parallels_desktop/key'
--header 'Authorization ••••••'
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/api/v1/parallels_desktop/key");
request.Headers.Add("Authorization", "••••••");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
var responseString = await response.Content.ReadAsStringAsync();
package main
import (
"fmt"
"net/http"
"strings"
"io"
)
func main() {
url := "http://localhost/api/v1/parallels_desktop/key"
method := "get"
client := &http.Client{}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "••••••")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
{
"advanced_restrictions": "string",
"cpu_total": "int64",
"deferred_activation": "string",
"edition": "string",
"expiration": "string",
"grace_period_ends_at": "string",
"is_volume": "string",
"main_period_ends_at": "string",
"max_memory": "int64",
"serial": "string",
"status": "string",
"uuid": "string"
}
{
"code": "int",
"message": "string",
"stack": [
{
"code": "int",
"description": "string",
"error": "string",
"path": "string"
}
]
}
{
"error": "OAuthErrorType",
"error_description": "string",
"error_uri": "string"
}