Create API key
curl --request POST \
--url https://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/tenant/{tenantId}/api-key \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"permissions": []
}
'import requests
url = "https://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/tenant/{tenantId}/api-key"
payload = {
"name": "<string>",
"permissions": []
}
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({name: '<string>', permissions: []})
};
fetch('https://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/tenant/{tenantId}/api-key', 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://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/tenant/{tenantId}/api-key",
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([
'name' => '<string>',
'permissions' => [
]
]),
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://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/tenant/{tenantId}/api-key"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"permissions\": []\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://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/tenant/{tenantId}/api-key")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"permissions\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/tenant/{tenantId}/api-key")
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 \"name\": \"<string>\",\n \"permissions\": []\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"permissions": [
"create_tenant"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"tenant_id": "<string>",
"secret": "<string>"
}{
"code": "common.internal_error",
"error": "<string>",
"meta": {}
}{
"code": "common.internal_error",
"error": "<string>",
"meta": {}
}{
"code": "common.internal_error",
"error": "<string>",
"meta": {}
}{
"code": "common.internal_error",
"error": "<string>",
"meta": {}
}{
"code": "common.internal_error",
"error": "<string>",
"meta": {}
}Tenants
Create API key
POST
/
tenant
/
{tenantId}
/
api-key
Create API key
curl --request POST \
--url https://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/tenant/{tenantId}/api-key \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"permissions": []
}
'import requests
url = "https://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/tenant/{tenantId}/api-key"
payload = {
"name": "<string>",
"permissions": []
}
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({name: '<string>', permissions: []})
};
fetch('https://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/tenant/{tenantId}/api-key', 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://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/tenant/{tenantId}/api-key",
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([
'name' => '<string>',
'permissions' => [
]
]),
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://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/tenant/{tenantId}/api-key"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"permissions\": []\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://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/tenant/{tenantId}/api-key")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"permissions\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://9nr7sbhimh.execute-api.us-west-1.amazonaws.com/prod/tenant/{tenantId}/api-key")
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 \"name\": \"<string>\",\n \"permissions\": []\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"permissions": [
"create_tenant"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"tenant_id": "<string>",
"secret": "<string>"
}{
"code": "common.internal_error",
"error": "<string>",
"meta": {}
}{
"code": "common.internal_error",
"error": "<string>",
"meta": {}
}{
"code": "common.internal_error",
"error": "<string>",
"meta": {}
}{
"code": "common.internal_error",
"error": "<string>",
"meta": {}
}{
"code": "common.internal_error",
"error": "<string>",
"meta": {}
}Authorizations
Bearer token in the Authorization header (e.g. JWT / Cognito access token).
Path Parameters
Tenant identifier.
Body
application/json
Fine-grained capability string (matches paas-lib permission identifiers).
Available options:
create_tenant, read_tenant, update_tenant, delete_tenant, manage_tenant_members, manage_tenant_settings, manage_tenant_api_keys, create_integration, read_integration, update_integration, delete_integration, create_project, read_project, update_project, delete_project, bulk_deploy_project, clone_project, create_environment, read_environment, update_environment, delete_environment, clone_environment, deploy_environment, read_workflow, read_tenant_workflows, create_resource, read_resource, update_resource, delete_resource, list_tenants, manage_super_admins, read_system, update_system, read_github_repos, read_github_app, read_my_invitations, read_tenant_invitations, create_invitation, delete_invitation Response
Created
Fine-grained capability string (matches paas-lib permission identifiers).
Available options:
create_tenant, read_tenant, update_tenant, delete_tenant, manage_tenant_members, manage_tenant_settings, manage_tenant_api_keys, create_integration, read_integration, update_integration, delete_integration, create_project, read_project, update_project, delete_project, bulk_deploy_project, clone_project, create_environment, read_environment, update_environment, delete_environment, clone_environment, deploy_environment, read_workflow, read_tenant_workflows, create_resource, read_resource, update_resource, delete_resource, list_tenants, manage_super_admins, read_system, update_system, read_github_repos, read_github_app, read_my_invitations, read_tenant_invitations, create_invitation, delete_invitation