curl --request PUT \
--url https://api.outerlayer.ai/v1/runner-version \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actor": "<string>",
"runUrl": "<string>",
"version": "<string>"
}
'import requests
url = "https://api.outerlayer.ai/v1/runner-version"
payload = {
"actor": "<string>",
"runUrl": "<string>",
"version": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({actor: '<string>', runUrl: '<string>', version: '<string>'})
};
fetch('https://api.outerlayer.ai/v1/runner-version', 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/runner-version",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'actor' => '<string>',
'runUrl' => '<string>',
'version' => '<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.outerlayer.ai/v1/runner-version"
payload := strings.NewReader("{\n \"actor\": \"<string>\",\n \"runUrl\": \"<string>\",\n \"version\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.outerlayer.ai/v1/runner-version")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"actor\": \"<string>\",\n \"runUrl\": \"<string>\",\n \"version\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/runner-version")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"actor\": \"<string>\",\n \"runUrl\": \"<string>\",\n \"version\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"changed": true,
"effectiveVersion": "<string>",
"previousVersion": "<string>",
"version": "<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>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Set the CLI version this gateway names to its runners
Stores the @outerlayer/cli version that follow factories of this gateway move their runners to. The gateway names the higher of this version and the version it was built from, so a stored version never lowers what a deploy names. Needs this gateway’s runner version key as a bearer token, and no factory named. The gateway refuses a version npm does not serve (422 version_not_published), a version below the one it names now (409 version_below_current), and a call while npm cannot be read (503 npm_unavailable). A gateway with no runner version key configured answers 403 to every caller. Setting the version already stored answers 200 with changed false and writes nothing. runUrl and actor are what the caller reports about the workflow run and the GitHub actor; the gateway records them in its audit log and cannot verify them.
curl --request PUT \
--url https://api.outerlayer.ai/v1/runner-version \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actor": "<string>",
"runUrl": "<string>",
"version": "<string>"
}
'import requests
url = "https://api.outerlayer.ai/v1/runner-version"
payload = {
"actor": "<string>",
"runUrl": "<string>",
"version": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({actor: '<string>', runUrl: '<string>', version: '<string>'})
};
fetch('https://api.outerlayer.ai/v1/runner-version', 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/runner-version",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'actor' => '<string>',
'runUrl' => '<string>',
'version' => '<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.outerlayer.ai/v1/runner-version"
payload := strings.NewReader("{\n \"actor\": \"<string>\",\n \"runUrl\": \"<string>\",\n \"version\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.outerlayer.ai/v1/runner-version")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"actor\": \"<string>\",\n \"runUrl\": \"<string>\",\n \"version\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerlayer.ai/v1/runner-version")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"actor\": \"<string>\",\n \"runUrl\": \"<string>\",\n \"version\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"changed": true,
"effectiveVersion": "<string>",
"previousVersion": "<string>",
"version": "<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>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
This gateway's runner version key. The gateway holds only its SHA-256 hash.
Body
Response
The version is stored, or was already stored.
Show child attributes
Show child attributes