create entity
curl --request POST \
--url https://api.example.com/api/v1/instance \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"licenseId": 123,
"organisationId": 123,
"projectId": 123
}
'import requests
url = "https://api.example.com/api/v1/instance"
payload = {
"licenseId": 123,
"organisationId": 123,
"projectId": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({licenseId: 123, organisationId: 123, projectId: 123})
};
fetch('https://api.example.com/api/v1/instance', 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.example.com/api/v1/instance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'licenseId' => 123,
'organisationId' => 123,
'projectId' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/instance"
payload := strings.NewReader("{\n \"licenseId\": 123,\n \"organisationId\": 123,\n \"projectId\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/instance")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"licenseId\": 123,\n \"organisationId\": 123,\n \"projectId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/instance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"licenseId\": 123,\n \"organisationId\": 123,\n \"projectId\": 123\n}"
response = http.request(request)
puts response.read_body{
"license": {
"name": "<string>",
"version": "<string>",
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"icon": "<string>",
"scoreGroups": [
{
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"name": "<string>",
"title": "<string>",
"description": "<string>"
}
],
"params": "{ \"\"minScore\": 0, \"maxScore\": 1 }",
"groupScript": "<string>",
"scoreScript": "<string>"
},
"organisationId": 123,
"projectId": 123,
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"licenseInstanceMeta": [
{
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"licenseInstanceId": 123,
"startedAt": "2022-03-10T16:15:50Z",
"expiredAt": "2022-03-10T16:15:50Z"
}
]
}License Instance Route
create entity
POST
/
api
/
v1
/
instance
create entity
curl --request POST \
--url https://api.example.com/api/v1/instance \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"licenseId": 123,
"organisationId": 123,
"projectId": 123
}
'import requests
url = "https://api.example.com/api/v1/instance"
payload = {
"licenseId": 123,
"organisationId": 123,
"projectId": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({licenseId: 123, organisationId: 123, projectId: 123})
};
fetch('https://api.example.com/api/v1/instance', 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.example.com/api/v1/instance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'licenseId' => 123,
'organisationId' => 123,
'projectId' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/instance"
payload := strings.NewReader("{\n \"licenseId\": 123,\n \"organisationId\": 123,\n \"projectId\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/instance")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"licenseId\": 123,\n \"organisationId\": 123,\n \"projectId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/instance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"licenseId\": 123,\n \"organisationId\": 123,\n \"projectId\": 123\n}"
response = http.request(request)
puts response.read_body{
"license": {
"name": "<string>",
"version": "<string>",
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"icon": "<string>",
"scoreGroups": [
{
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"name": "<string>",
"title": "<string>",
"description": "<string>"
}
],
"params": "{ \"\"minScore\": 0, \"maxScore\": 1 }",
"groupScript": "<string>",
"scoreScript": "<string>"
},
"organisationId": 123,
"projectId": 123,
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"licenseInstanceMeta": [
{
"id": 1,
"createdAt": 123,
"updatedAt": 123,
"licenseInstanceId": 123,
"startedAt": "2022-03-10T16:15:50Z",
"expiredAt": "2022-03-10T16:15:50Z"
}
]
}Authorizations
Authentication
Body
application/json
License id
Organisation id
Project id
Organisation Tenant License status
Available options:
PENDING, LICENCED, CANCELED Status of the entity. Default: 'ACTIVE'
Available options:
ACTIVE, DISABLED, DELETED Response
200 - application/json
OK
License object
Show child attributes
Show child attributes
Organisation id
Project id
Organisation Tenant License status
Available options:
PENDING, LICENCED, CANCELED Unique identifier of the entity
Example:
1
Time when entity was created
Time when entity was updated
Status of the entity. Default: 'ACTIVE'
Available options:
ACTIVE, DISABLED, DELETED Metadata of license instance
Show child attributes
Show child attributes
⌘I