cURL
curl --request POST \
--url https://cloud.bytebeam.io/mock/api/v2/actions \
--header 'Content-Type: application/json' \
--header 'x-bytebeam-api-key: <api-key>' \
--header 'x-bytebeam-tenant: <api-key>' \
--data '
{
"action": "<string>",
"params": {},
"release_notes": "<string>",
"retry_count": 123,
"phases": [
{
"name": "<string>",
"filter": {},
"fraction": 123,
"timestamp": 123,
"success_percentage": 123,
"failure_percentage": 123
}
],
"timeout": 123
}
'import requests
url = "https://cloud.bytebeam.io/mock/api/v2/actions"
payload = {
"action": "<string>",
"params": {},
"release_notes": "<string>",
"retry_count": 123,
"phases": [
{
"name": "<string>",
"filter": {},
"fraction": 123,
"timestamp": 123,
"success_percentage": 123,
"failure_percentage": 123
}
],
"timeout": 123
}
headers = {
"x-bytebeam-api-key": "<api-key>",
"x-bytebeam-tenant": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-bytebeam-api-key': '<api-key>',
'x-bytebeam-tenant': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
action: '<string>',
params: {},
release_notes: '<string>',
retry_count: 123,
phases: [
{
name: '<string>',
filter: {},
fraction: 123,
timestamp: 123,
success_percentage: 123,
failure_percentage: 123
}
],
timeout: 123
})
};
fetch('https://cloud.bytebeam.io/mock/api/v2/actions', 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://cloud.bytebeam.io/mock/api/v2/actions",
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([
'action' => '<string>',
'params' => [
],
'release_notes' => '<string>',
'retry_count' => 123,
'phases' => [
[
'name' => '<string>',
'filter' => [
],
'fraction' => 123,
'timestamp' => 123,
'success_percentage' => 123,
'failure_percentage' => 123
]
],
'timeout' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-bytebeam-api-key: <api-key>",
"x-bytebeam-tenant: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cloud.bytebeam.io/mock/api/v2/actions"
payload := strings.NewReader("{\n \"action\": \"<string>\",\n \"params\": {},\n \"release_notes\": \"<string>\",\n \"retry_count\": 123,\n \"phases\": [\n {\n \"name\": \"<string>\",\n \"filter\": {},\n \"fraction\": 123,\n \"timestamp\": 123,\n \"success_percentage\": 123,\n \"failure_percentage\": 123\n }\n ],\n \"timeout\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-bytebeam-api-key", "<api-key>")
req.Header.Add("x-bytebeam-tenant", "<api-key>")
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://cloud.bytebeam.io/mock/api/v2/actions")
.header("x-bytebeam-api-key", "<api-key>")
.header("x-bytebeam-tenant", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"<string>\",\n \"params\": {},\n \"release_notes\": \"<string>\",\n \"retry_count\": 123,\n \"phases\": [\n {\n \"name\": \"<string>\",\n \"filter\": {},\n \"fraction\": 123,\n \"timestamp\": 123,\n \"success_percentage\": 123,\n \"failure_percentage\": 123\n }\n ],\n \"timeout\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.bytebeam.io/mock/api/v2/actions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-bytebeam-api-key"] = '<api-key>'
request["x-bytebeam-tenant"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"action\": \"<string>\",\n \"params\": {},\n \"release_notes\": \"<string>\",\n \"retry_count\": 123,\n \"phases\": [\n {\n \"name\": \"<string>\",\n \"filter\": {},\n \"fraction\": 123,\n \"timestamp\": 123,\n \"success_percentage\": 123,\n \"failure_percentage\": 123\n }\n ],\n \"timeout\": 123\n}"
response = http.request(request)
puts response.read_bodyThis response has no body data.API Reference
Post mockapiv2actions
POST
/
mock
/
api
/
v2
/
actions
cURL
curl --request POST \
--url https://cloud.bytebeam.io/mock/api/v2/actions \
--header 'Content-Type: application/json' \
--header 'x-bytebeam-api-key: <api-key>' \
--header 'x-bytebeam-tenant: <api-key>' \
--data '
{
"action": "<string>",
"params": {},
"release_notes": "<string>",
"retry_count": 123,
"phases": [
{
"name": "<string>",
"filter": {},
"fraction": 123,
"timestamp": 123,
"success_percentage": 123,
"failure_percentage": 123
}
],
"timeout": 123
}
'import requests
url = "https://cloud.bytebeam.io/mock/api/v2/actions"
payload = {
"action": "<string>",
"params": {},
"release_notes": "<string>",
"retry_count": 123,
"phases": [
{
"name": "<string>",
"filter": {},
"fraction": 123,
"timestamp": 123,
"success_percentage": 123,
"failure_percentage": 123
}
],
"timeout": 123
}
headers = {
"x-bytebeam-api-key": "<api-key>",
"x-bytebeam-tenant": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-bytebeam-api-key': '<api-key>',
'x-bytebeam-tenant': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
action: '<string>',
params: {},
release_notes: '<string>',
retry_count: 123,
phases: [
{
name: '<string>',
filter: {},
fraction: 123,
timestamp: 123,
success_percentage: 123,
failure_percentage: 123
}
],
timeout: 123
})
};
fetch('https://cloud.bytebeam.io/mock/api/v2/actions', 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://cloud.bytebeam.io/mock/api/v2/actions",
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([
'action' => '<string>',
'params' => [
],
'release_notes' => '<string>',
'retry_count' => 123,
'phases' => [
[
'name' => '<string>',
'filter' => [
],
'fraction' => 123,
'timestamp' => 123,
'success_percentage' => 123,
'failure_percentage' => 123
]
],
'timeout' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-bytebeam-api-key: <api-key>",
"x-bytebeam-tenant: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cloud.bytebeam.io/mock/api/v2/actions"
payload := strings.NewReader("{\n \"action\": \"<string>\",\n \"params\": {},\n \"release_notes\": \"<string>\",\n \"retry_count\": 123,\n \"phases\": [\n {\n \"name\": \"<string>\",\n \"filter\": {},\n \"fraction\": 123,\n \"timestamp\": 123,\n \"success_percentage\": 123,\n \"failure_percentage\": 123\n }\n ],\n \"timeout\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-bytebeam-api-key", "<api-key>")
req.Header.Add("x-bytebeam-tenant", "<api-key>")
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://cloud.bytebeam.io/mock/api/v2/actions")
.header("x-bytebeam-api-key", "<api-key>")
.header("x-bytebeam-tenant", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"<string>\",\n \"params\": {},\n \"release_notes\": \"<string>\",\n \"retry_count\": 123,\n \"phases\": [\n {\n \"name\": \"<string>\",\n \"filter\": {},\n \"fraction\": 123,\n \"timestamp\": 123,\n \"success_percentage\": 123,\n \"failure_percentage\": 123\n }\n ],\n \"timeout\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.bytebeam.io/mock/api/v2/actions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-bytebeam-api-key"] = '<api-key>'
request["x-bytebeam-tenant"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"action\": \"<string>\",\n \"params\": {},\n \"release_notes\": \"<string>\",\n \"retry_count\": 123,\n \"phases\": [\n {\n \"name\": \"<string>\",\n \"filter\": {},\n \"fraction\": 123,\n \"timestamp\": 123,\n \"success_percentage\": 123,\n \"failure_percentage\": 123\n }\n ],\n \"timeout\": 123\n}"
response = http.request(request)
puts response.read_bodyThis response has no body data.Authorizations
API key required to authenticate requests.
Tenant(Project) name required to identify the project.
Body
application/jsonapplication/transit+msgpackapplication/transit+jsonapplication/edn
Response
default - undefined
⌘I