Create License Op
curl --request POST \
--url https://app.apigene.ai/api/tenant/create_license \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tenant_id": "<string>",
"plan": "enterprise",
"features": {
"max_orgs_per_tenant": 50,
"max_users_per_org": 100,
"max_public_apis_per_tenant": 50,
"max_private_apis_per_org": 50
},
"expires_in_days": 123,
"issued_to": "<string>"
}
'import requests
url = "https://app.apigene.ai/api/tenant/create_license"
payload = {
"tenant_id": "<string>",
"plan": "enterprise",
"features": {
"max_orgs_per_tenant": 50,
"max_users_per_org": 100,
"max_public_apis_per_tenant": 50,
"max_private_apis_per_org": 50
},
"expires_in_days": 123,
"issued_to": "<string>"
}
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({
tenant_id: '<string>',
plan: 'enterprise',
features: {
max_orgs_per_tenant: 50,
max_users_per_org: 100,
max_public_apis_per_tenant: 50,
max_private_apis_per_org: 50
},
expires_in_days: 123,
issued_to: '<string>'
})
};
fetch('https://app.apigene.ai/api/tenant/create_license', 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://app.apigene.ai/api/tenant/create_license",
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([
'tenant_id' => '<string>',
'plan' => 'enterprise',
'features' => [
'max_orgs_per_tenant' => 50,
'max_users_per_org' => 100,
'max_public_apis_per_tenant' => 50,
'max_private_apis_per_org' => 50
],
'expires_in_days' => 123,
'issued_to' => '<string>'
]),
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://app.apigene.ai/api/tenant/create_license"
payload := strings.NewReader("{\n \"tenant_id\": \"<string>\",\n \"plan\": \"enterprise\",\n \"features\": {\n \"max_orgs_per_tenant\": 50,\n \"max_users_per_org\": 100,\n \"max_public_apis_per_tenant\": 50,\n \"max_private_apis_per_org\": 50\n },\n \"expires_in_days\": 123,\n \"issued_to\": \"<string>\"\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://app.apigene.ai/api/tenant/create_license")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tenant_id\": \"<string>\",\n \"plan\": \"enterprise\",\n \"features\": {\n \"max_orgs_per_tenant\": 50,\n \"max_users_per_org\": 100,\n \"max_public_apis_per_tenant\": 50,\n \"max_private_apis_per_org\": 50\n },\n \"expires_in_days\": 123,\n \"issued_to\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.apigene.ai/api/tenant/create_license")
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 \"tenant_id\": \"<string>\",\n \"plan\": \"enterprise\",\n \"features\": {\n \"max_orgs_per_tenant\": 50,\n \"max_users_per_org\": 100,\n \"max_public_apis_per_tenant\": 50,\n \"max_private_apis_per_org\": 50\n },\n \"expires_in_days\": 123,\n \"issued_to\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"token": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Tenant
Create License Op
Create a signed license token for a tenant. Only available in non-SaaS deployments.
POST
/
api
/
tenant
/
create_license
Create License Op
curl --request POST \
--url https://app.apigene.ai/api/tenant/create_license \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tenant_id": "<string>",
"plan": "enterprise",
"features": {
"max_orgs_per_tenant": 50,
"max_users_per_org": 100,
"max_public_apis_per_tenant": 50,
"max_private_apis_per_org": 50
},
"expires_in_days": 123,
"issued_to": "<string>"
}
'import requests
url = "https://app.apigene.ai/api/tenant/create_license"
payload = {
"tenant_id": "<string>",
"plan": "enterprise",
"features": {
"max_orgs_per_tenant": 50,
"max_users_per_org": 100,
"max_public_apis_per_tenant": 50,
"max_private_apis_per_org": 50
},
"expires_in_days": 123,
"issued_to": "<string>"
}
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({
tenant_id: '<string>',
plan: 'enterprise',
features: {
max_orgs_per_tenant: 50,
max_users_per_org: 100,
max_public_apis_per_tenant: 50,
max_private_apis_per_org: 50
},
expires_in_days: 123,
issued_to: '<string>'
})
};
fetch('https://app.apigene.ai/api/tenant/create_license', 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://app.apigene.ai/api/tenant/create_license",
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([
'tenant_id' => '<string>',
'plan' => 'enterprise',
'features' => [
'max_orgs_per_tenant' => 50,
'max_users_per_org' => 100,
'max_public_apis_per_tenant' => 50,
'max_private_apis_per_org' => 50
],
'expires_in_days' => 123,
'issued_to' => '<string>'
]),
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://app.apigene.ai/api/tenant/create_license"
payload := strings.NewReader("{\n \"tenant_id\": \"<string>\",\n \"plan\": \"enterprise\",\n \"features\": {\n \"max_orgs_per_tenant\": 50,\n \"max_users_per_org\": 100,\n \"max_public_apis_per_tenant\": 50,\n \"max_private_apis_per_org\": 50\n },\n \"expires_in_days\": 123,\n \"issued_to\": \"<string>\"\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://app.apigene.ai/api/tenant/create_license")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tenant_id\": \"<string>\",\n \"plan\": \"enterprise\",\n \"features\": {\n \"max_orgs_per_tenant\": 50,\n \"max_users_per_org\": 100,\n \"max_public_apis_per_tenant\": 50,\n \"max_private_apis_per_org\": 50\n },\n \"expires_in_days\": 123,\n \"issued_to\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.apigene.ai/api/tenant/create_license")
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 \"tenant_id\": \"<string>\",\n \"plan\": \"enterprise\",\n \"features\": {\n \"max_orgs_per_tenant\": 50,\n \"max_users_per_org\": 100,\n \"max_public_apis_per_tenant\": 50,\n \"max_private_apis_per_org\": 50\n },\n \"expires_in_days\": 123,\n \"issued_to\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"token": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
JWT Authorization header using the Bearer scheme. Example: 'Authorization: Bearer {token}'
Body
application/json
Response
Successful Response
⌘I
