Actions Moduleを以前のバージョンにロールバック
curl --request POST \
--url https://{tenantDomain}/api/v2/actions/modules/{id}/rollback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"module_version_id": "<string>"
}
'import requests
url = "https://{tenantDomain}/api/v2/actions/modules/{id}/rollback"
payload = { "module_version_id": "<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({module_version_id: '<string>'})
};
fetch('https://{tenantDomain}/api/v2/actions/modules/{id}/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://{tenantDomain}/api/v2/actions/modules/{id}/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([
'module_version_id' => '<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://{tenantDomain}/api/v2/actions/modules/{id}/rollback"
payload := strings.NewReader("{\n \"module_version_id\": \"<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://{tenantDomain}/api/v2/actions/modules/{id}/rollback")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"module_version_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/actions/modules/{id}/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 \"module_version_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"actions_using_module_total": 123,
"all_changes_published": true,
"code": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"dependencies": [
{
"name": "<string>",
"version": "<string>"
}
],
"id": "<string>",
"latest_version": {
"code": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"dependencies": [
{
"name": "<string>",
"version": "<string>"
}
],
"id": "<string>",
"secrets": [
{
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"version_number": 123
},
"latest_version_number": 123,
"name": "<string>",
"secrets": [
{
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"updated_at": "2023-11-07T05:31:56Z"
}Action モジュールのロールバック
Actions Module のドラフトを、以前に作成したバージョンにロールバックします。この操作により、指定したバージョンの code、依存関係、シークレットが現在のドラフトにコピーされます。
POST
https://{tenantDomain}/api/v2
/
actions
/
modules
/
{id}
/
rollback
Actions Moduleを以前のバージョンにロールバック
curl --request POST \
--url https://{tenantDomain}/api/v2/actions/modules/{id}/rollback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"module_version_id": "<string>"
}
'import requests
url = "https://{tenantDomain}/api/v2/actions/modules/{id}/rollback"
payload = { "module_version_id": "<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({module_version_id: '<string>'})
};
fetch('https://{tenantDomain}/api/v2/actions/modules/{id}/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://{tenantDomain}/api/v2/actions/modules/{id}/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([
'module_version_id' => '<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://{tenantDomain}/api/v2/actions/modules/{id}/rollback"
payload := strings.NewReader("{\n \"module_version_id\": \"<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://{tenantDomain}/api/v2/actions/modules/{id}/rollback")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"module_version_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/actions/modules/{id}/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 \"module_version_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"actions_using_module_total": 123,
"all_changes_published": true,
"code": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"dependencies": [
{
"name": "<string>",
"version": "<string>"
}
],
"id": "<string>",
"latest_version": {
"code": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"dependencies": [
{
"name": "<string>",
"version": "<string>"
}
],
"id": "<string>",
"secrets": [
{
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"version_number": 123
},
"latest_version_number": 123,
"name": "<string>",
"secrets": [
{
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"updated_at": "2023-11-07T05:31:56Z"
}承認
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
パスパラメータ
ロールバックするモジュールの一意の ID。
ボディ
application/jsonapplication/x-www-form-urlencoded
ロールバック先のモジュールバージョンの一意のID。
レスポンス
ロールバックに成功しました。
このモジュールを使用しているデプロイ済みの Actions の数。
ドラフトの変更がすべてバージョンとして公開されているかどうか。
モジュールのドラフトバージョンのソースコード。
モジュールが作成されたタイムスタンプ。
モジュールのドラフトバージョンの npm 依存関係。
Show child attributes
Show child attributes
このモジュールの一意のID。
参照オブジェクトとしての最新の公開済みバージョン。公開済みバージョンがない場合は省略されます。
Show child attributes
Show child attributes
最新の公開済みバージョンのバージョン番号。バージョンが公開されていない場合は省略されます。
このモジュールの名前。
モジュールのドラフトバージョンのシークレット(名前とタイムスタンプのみ。値は返されません)。
Show child attributes
Show child attributes
モジュールが最後に更新されたタイムスタンプ。
⌘I