Skip to main content
POST
/
api
/
v1
/
actions
Trigger an action on a bunch of devices.
curl --request POST \
  --url https://cloud.bytebeam.io/api/v1/actions \
  --header 'Content-Type: application/json' \
  --header 'x-bytebeam-api-key: <api-key>' \
  --header 'x-bytebeam-tenant: <api-key>' \
  --data '
{
  "params": {},
  "search_type": "<string>",
  "action": "<string>",
  "search_query": "<string>",
  "device_ids": [
    "<string>"
  ],
  "timeout": 123,
  "metadata": {},
  "search_key": "<string>"
}
'
import requests

url = "https://cloud.bytebeam.io/api/v1/actions"

payload = {
"params": {},
"search_type": "<string>",
"action": "<string>",
"search_query": "<string>",
"device_ids": ["<string>"],
"timeout": 123,
"metadata": {},
"search_key": "<string>"
}
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({
params: {},
search_type: '<string>',
action: '<string>',
search_query: '<string>',
device_ids: ['<string>'],
timeout: 123,
metadata: {},
search_key: '<string>'
})
};

fetch('https://cloud.bytebeam.io/api/v1/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/api/v1/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([
'params' => [

],
'search_type' => '<string>',
'action' => '<string>',
'search_query' => '<string>',
'device_ids' => [
'<string>'
],
'timeout' => 123,
'metadata' => [

],
'search_key' => '<string>'
]),
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/api/v1/actions"

payload := strings.NewReader("{\n \"params\": {},\n \"search_type\": \"<string>\",\n \"action\": \"<string>\",\n \"search_query\": \"<string>\",\n \"device_ids\": [\n \"<string>\"\n ],\n \"timeout\": 123,\n \"metadata\": {},\n \"search_key\": \"<string>\"\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/api/v1/actions")
.header("x-bytebeam-api-key", "<api-key>")
.header("x-bytebeam-tenant", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"params\": {},\n \"search_type\": \"<string>\",\n \"action\": \"<string>\",\n \"search_query\": \"<string>\",\n \"device_ids\": [\n \"<string>\"\n ],\n \"timeout\": 123,\n \"metadata\": {},\n \"search_key\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://cloud.bytebeam.io/api/v1/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 \"params\": {},\n \"search_type\": \"<string>\",\n \"action\": \"<string>\",\n \"search_query\": \"<string>\",\n \"device_ids\": [\n \"<string>\"\n ],\n \"timeout\": 123,\n \"metadata\": {},\n \"search_key\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": 123,
  "created_at": "<string>",
  "phases": {
    "name": "<string>",
    "trigger_on": {}
  }
}

Authorizations

x-bytebeam-api-key
string
header
required

API key required to authenticate requests.

x-bytebeam-tenant
string
header
required

Tenant(Project) name required to identify the project.

Body

params
object
required
search_type
string
required
action
string
required
schedule
object
search_query
string
device_ids
string[]
timeout
integer<int64>
metadata
object
search_key
string

Response

id
integer<int64>
required
created_at
string
required
phases
object