Create platform API key
curl --request POST \
--url https://api.runaether.dev/orgs/{orgID}/platform-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'import requests
url = "https://api.runaether.dev/orgs/{orgID}/platform-keys"
payload = { "name": "<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({name: '<string>'})
};
fetch('https://api.runaether.dev/orgs/{orgID}/platform-keys', 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.runaether.dev/orgs/{orgID}/platform-keys",
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>'
]),
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.runaether.dev/orgs/{orgID}/platform-keys"
payload := strings.NewReader("{\n \"name\": \"<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://api.runaether.dev/orgs/{orgID}/platform-keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/orgs/{orgID}/platform-keys")
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}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"last_used_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_name": "<string>",
"prefix": "<string>",
"revoked_at": "2023-11-07T05:31:56Z",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"code": "bad_gateway",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "bad_gateway",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "session_auth_required",
"error": "<string>"
}{
"code": "bad_gateway",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "bad_gateway",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}Platform API Keys
Create platform API key
Mints an API key pinned to the organization the path names and returns it with its raw key, shown only this once.
Use this tool when you need to:
- Give a script, CI job or the Aether CLI a credential that acts as the caller in one organization
- Replace a leaked or lost key, after revoking the old one
Examples:
- POST /orgs/{orgID}/platform-keys {"name": "CI deploys"}
- POST /orgs/6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21/platform-keys {"name": "laptop CLI"}
Hints:
- orgID is the organization's uuid; a malformed one is refused with 400 before the schema. name is required, 1 to 100 characters with at least one that is not a space, and is stored trimmed; a blank name or one over 100 characters is refused with 422.
- Answers 201 with key, aether_ and 64 hex characters, which is never shown again, and prefix, its first 12 characters, which listPlatformKeys shows.
- The key acts as the caller, in that organization at the root paths (a path that names an organization acts in that one), with their role there checked on every request; it is deleted with the caller's membership in its organization.
- Use listPlatformKeys instead to see existing keys and revokePlatformKey instead to revoke one.
- Members with a product role (owner, admin, member) may mint one, with a session-authenticated sign-in: an API key or a JWT without a session is refused with 403 session_auth_required, a viewer or billing member with 403 org_role_insufficient, and a non-member with 403 org_membership_required.
POST
/
orgs
/
{orgID}
/
platform-keys
Create platform API key
curl --request POST \
--url https://api.runaether.dev/orgs/{orgID}/platform-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'import requests
url = "https://api.runaether.dev/orgs/{orgID}/platform-keys"
payload = { "name": "<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({name: '<string>'})
};
fetch('https://api.runaether.dev/orgs/{orgID}/platform-keys', 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.runaether.dev/orgs/{orgID}/platform-keys",
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>'
]),
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.runaether.dev/orgs/{orgID}/platform-keys"
payload := strings.NewReader("{\n \"name\": \"<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://api.runaether.dev/orgs/{orgID}/platform-keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/orgs/{orgID}/platform-keys")
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}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"last_used_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_name": "<string>",
"prefix": "<string>",
"revoked_at": "2023-11-07T05:31:56Z",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"code": "bad_gateway",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "bad_gateway",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "session_auth_required",
"error": "<string>"
}{
"code": "bad_gateway",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "bad_gateway",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Required string length:
1 - 100Pattern:
\SResponse
Created
Minimum string length:
1Minimum string length:
1Minimum string length:
1Minimum string length:
1