Clear a runner key's host binding
curl --request DELETE \
--url https://api.outerlayer.ai/v1/api-keys/{apiKeyId}/host-key \
--header 'Authorization: Bearer <token>' \
--header 'X-Outerlayer-App-Id: <api-key>'import requests
url = "https://api.outerlayer.ai/v1/api-keys/{apiKeyId}/host-key"
headers = {
"X-Outerlayer-App-Id": "<api-key>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'X-Outerlayer-App-Id': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.outerlayer.ai/v1/api-keys/{apiKeyId}/host-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://api.outerlayer.ai/v1/api-keys/{apiKeyId}/host-key",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Outerlayer-App-Id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.outerlayer.ai/v1/api-keys/{apiKeyId}/host-key"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Outerlayer-App-Id", "<api-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.outerlayer.ai/v1/api-keys/{apiKeyId}/host-key")
.header("X-Outerlayer-App-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/api-keys/{apiKeyId}/host-key")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Outerlayer-App-Id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"app_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"name": "<string>",
"permissions": [
"<string>"
],
"created_by_name": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"hostKey": {
"boundAt": "2023-11-07T05:31:56Z",
"fingerprint": "<string>"
},
"key_prefix": "<string>",
"last_used_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}API Keys
Clear a runner key's host binding
Clears the host key a runner key is bound to, so its next signed claim binds the key of whichever host sends it. Use it to move a runner to a new host. The change is written to the org audit log. Clearing a key that is not bound changes nothing. A key already in use picks up the change at once: the binding is read on every request.
DELETE
/
v1
/
api-keys
/
{apiKeyId}
/
host-key
Clear a runner key's host binding
curl --request DELETE \
--url https://api.outerlayer.ai/v1/api-keys/{apiKeyId}/host-key \
--header 'Authorization: Bearer <token>' \
--header 'X-Outerlayer-App-Id: <api-key>'import requests
url = "https://api.outerlayer.ai/v1/api-keys/{apiKeyId}/host-key"
headers = {
"X-Outerlayer-App-Id": "<api-key>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'X-Outerlayer-App-Id': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.outerlayer.ai/v1/api-keys/{apiKeyId}/host-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://api.outerlayer.ai/v1/api-keys/{apiKeyId}/host-key",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Outerlayer-App-Id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.outerlayer.ai/v1/api-keys/{apiKeyId}/host-key"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Outerlayer-App-Id", "<api-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.outerlayer.ai/v1/api-keys/{apiKeyId}/host-key")
.header("X-Outerlayer-App-Id", "<api-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/api-keys/{apiKeyId}/host-key")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Outerlayer-App-Id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"app_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"name": "<string>",
"permissions": [
"<string>"
],
"created_by_name": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"hostKey": {
"boundAt": "2023-11-07T05:31:56Z",
"fingerprint": "<string>"
},
"key_prefix": "<string>",
"last_used_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}