List workers
curl --request GET \
--url https://console.cloudblast.io/api/v2/workers \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.cloudblast.io/api/v2/workers"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://console.cloudblast.io/api/v2/workers', 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://console.cloudblast.io/api/v2/workers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://console.cloudblast.io/api/v2/workers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://console.cloudblast.io/api/v2/workers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.cloudblast.io/api/v2/workers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"name": "api-worker",
"status": "active",
"runtime_status": "running",
"runtime_status_at": "2023-11-07T05:31:56Z",
"provisioned": true,
"last_deployment_status": "finished",
"last_deployment_at": "2023-11-07T05:31:56Z",
"last_error": "<string>",
"fqdn": "api-worker.workers.cloudblast.io",
"location_id": 1,
"git_source": "public",
"git_repository": "https://github.com/example/app",
"git_branch": "main",
"build_pack": "nixpacks",
"ports_exposes": "3000",
"base_directory": "<string>",
"publish_directory": "<string>",
"install_command": "<string>",
"build_command": "<string>",
"start_command": "<string>",
"is_spa": false,
"limits": {
"cpu": 1,
"memory_mb": 1024,
"disk_mb": 5120
},
"usage": {
"cpu_percent": 3.5,
"memory_mb": 184,
"disk_mb": 612
},
"billing_type": "hourly",
"suspended_at": "2023-11-07T05:31:56Z",
"suspension_reason": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"location": {
"id": 1,
"name": "Frankfurt",
"short_code": "fra",
"description": "Germany",
"out_of_stock": false
}
}
],
"meta": {
"current_page": 1,
"last_page": 3,
"per_page": 25,
"total": 72
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Missing or invalid Authorization header. Use: Authorization: Bearer <token>"
}
}Workers
List Workers
Returns a paginated list of your workers, newest first. Optionally filter by status.
GET
/
workers
List workers
curl --request GET \
--url https://console.cloudblast.io/api/v2/workers \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.cloudblast.io/api/v2/workers"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://console.cloudblast.io/api/v2/workers', 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://console.cloudblast.io/api/v2/workers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://console.cloudblast.io/api/v2/workers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://console.cloudblast.io/api/v2/workers")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.cloudblast.io/api/v2/workers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"name": "api-worker",
"status": "active",
"runtime_status": "running",
"runtime_status_at": "2023-11-07T05:31:56Z",
"provisioned": true,
"last_deployment_status": "finished",
"last_deployment_at": "2023-11-07T05:31:56Z",
"last_error": "<string>",
"fqdn": "api-worker.workers.cloudblast.io",
"location_id": 1,
"git_source": "public",
"git_repository": "https://github.com/example/app",
"git_branch": "main",
"build_pack": "nixpacks",
"ports_exposes": "3000",
"base_directory": "<string>",
"publish_directory": "<string>",
"install_command": "<string>",
"build_command": "<string>",
"start_command": "<string>",
"is_spa": false,
"limits": {
"cpu": 1,
"memory_mb": 1024,
"disk_mb": 5120
},
"usage": {
"cpu_percent": 3.5,
"memory_mb": 184,
"disk_mb": 612
},
"billing_type": "hourly",
"suspended_at": "2023-11-07T05:31:56Z",
"suspension_reason": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"location": {
"id": 1,
"name": "Frankfurt",
"short_code": "fra",
"description": "Germany",
"out_of_stock": false
}
}
],
"meta": {
"current_page": 1,
"last_page": 3,
"per_page": 25,
"total": 72
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Missing or invalid Authorization header. Use: Authorization: Bearer <token>"
}
}Authorizations
API token from your CloudBlast account settings. Pass as Authorization: Bearer <token>.
Query Parameters
Page number for pagination
Filter by worker status. Omit to list all workers.
Available options:
pending, provisioning, active, suspended, abuse_suspended, cancelled, deleting, failed