curl --request POST \
--url https://api.example.com/v0/admin/plugins/plan/rollback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idempotency_key": "<string>",
"plan_id": "<string>",
"pinned_work": "drain"
}
'import requests
url = "https://api.example.com/v0/admin/plugins/plan/rollback"
payload = {
"idempotency_key": "<string>",
"plan_id": "<string>",
"pinned_work": "drain"
}
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({idempotency_key: '<string>', plan_id: '<string>', pinned_work: 'drain'})
};
fetch('https://api.example.com/v0/admin/plugins/plan/rollback', 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.example.com/v0/admin/plugins/plan/rollback",
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([
'idempotency_key' => '<string>',
'plan_id' => '<string>',
'pinned_work' => 'drain'
]),
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.example.com/v0/admin/plugins/plan/rollback"
payload := strings.NewReader("{\n \"idempotency_key\": \"<string>\",\n \"plan_id\": \"<string>\",\n \"pinned_work\": \"drain\"\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.example.com/v0/admin/plugins/plan/rollback")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"<string>\",\n \"plan_id\": \"<string>\",\n \"pinned_work\": \"drain\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/admin/plugins/plan/rollback")
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 \"idempotency_key\": \"<string>\",\n \"plan_id\": \"<string>\",\n \"pinned_work\": \"drain\"\n}"
response = http.request(request)
puts response.read_body{
"plan_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"activated_at": "2023-11-07T05:31:56Z",
"source": "configuration",
"roles": [
{
"role": "<string>",
"registration_id": "<string>",
"plugin_id": "<string>",
"version": "<string>"
}
],
"previous_plan_id": "<string>"
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"field": "<string>",
"resync_url": "<string>"
}Rollback pipeline plan
Make an earlier plan’s roles active again, as a new immutable Pipeline Plan with source rollback that api and worker follow without restarting. The default target is the plan the active one replaced; plan_id names another one. Registrations the rollback brings back serve again, even when they were draining or inactive. Registrations it takes out drain, or stop with pinned_work=stop. The target must keep the rules of an activation. Otherwise the answer is 409 plugin_conflict, or 422 unsupported_role when the rollback would change an alert-rule plugin. Every plugin it brings back must answer discovery at its endpoint with its manifest’s digest. Otherwise the answer is 409 plugin_unreachable, naming the plugin and the cause, and no plan changes. 409 no_previous_plan when there is no earlier plan to return to. A rollback to the active plan’s roles returns the active plan. The same idempotency key with the same request returns the plan it recorded. The same key with another request is 409 idempotency_conflict. Nothing already produced is rewritten. Requires plugins:admin.
curl --request POST \
--url https://api.example.com/v0/admin/plugins/plan/rollback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idempotency_key": "<string>",
"plan_id": "<string>",
"pinned_work": "drain"
}
'import requests
url = "https://api.example.com/v0/admin/plugins/plan/rollback"
payload = {
"idempotency_key": "<string>",
"plan_id": "<string>",
"pinned_work": "drain"
}
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({idempotency_key: '<string>', plan_id: '<string>', pinned_work: 'drain'})
};
fetch('https://api.example.com/v0/admin/plugins/plan/rollback', 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.example.com/v0/admin/plugins/plan/rollback",
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([
'idempotency_key' => '<string>',
'plan_id' => '<string>',
'pinned_work' => 'drain'
]),
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.example.com/v0/admin/plugins/plan/rollback"
payload := strings.NewReader("{\n \"idempotency_key\": \"<string>\",\n \"plan_id\": \"<string>\",\n \"pinned_work\": \"drain\"\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.example.com/v0/admin/plugins/plan/rollback")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"<string>\",\n \"plan_id\": \"<string>\",\n \"pinned_work\": \"drain\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/admin/plugins/plan/rollback")
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 \"idempotency_key\": \"<string>\",\n \"plan_id\": \"<string>\",\n \"pinned_work\": \"drain\"\n}"
response = http.request(request)
puts response.read_body{
"plan_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"activated_at": "2023-11-07T05:31:56Z",
"source": "configuration",
"roles": [
{
"role": "<string>",
"registration_id": "<string>",
"plugin_id": "<string>",
"version": "<string>"
}
],
"previous_plan_id": "<string>"
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"field": "<string>",
"resync_url": "<string>"
}Authorizations
API key, not necessarily a JWT. Server derives Organization, permitted actions and Corpus scope; every resource access is authorized.
Body
1 - 200The plan whose roles become active again; absent returns to the plan the active one replaced (its previous_plan_id).
1What happens to work pinned to a plan naming a plugin version the rollback takes out. drain lets it finish on that version, which stays draining meanwhile. stop keeps it from calling that version again once each process follows the new plan (within plugin_plan_poll). Its next call fails instead. The processing of a Version then stops with the diagnostic pinned_plan_stopped, with the outcome of pinned_plugin_unavailable, and a rebuild fails with that code. A connector run fails as when its plugin is unavailable, and its next run uses the active plan.
drain, stop Response
Successful response
1What recorded the plan, and so why the plan changed. configuration is the startup configuration, which applies the roles its pins changed since it last applied, even over an earlier activation of the same role. activation is an operator activation. rollback is an operator rollback to an earlier plan's roles.
configuration, activation, rollback One entry per role, sorted by role.
Show child attributes
Show child attributes
The plan this one replaced; absent for the first plan of the deployment.
1