curl --request POST \
--url https://api.nonce.app/private-api/v1/{workspace_id}/farms/{farm_id}/miner/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": {
"in": [
"miner_abc123",
"miner_def456"
]
},
"agent_id": {
"contains": "S19"
},
"sn": {
"contains": "S19"
},
"mac": {
"contains": "S19"
},
"status": {
"in": [
"online",
"offline"
]
},
"ops_status": {
"in": [
"online",
"offline"
]
},
"unstable": true,
"lifecycle_statuses": {
"in": [
"online",
"offline"
]
},
"health_statuses": {
"in": [
"online",
"offline"
]
},
"ip_ranges": [
"192.168.1.5",
"192.168.144.0/24",
"10.0.0.1-10.0.0.50"
],
"page": 4503599627370496,
"limit": 5000
}
'import requests
url = "https://api.nonce.app/private-api/v1/{workspace_id}/farms/{farm_id}/miner/search"
payload = {
"id": { "in": ["miner_abc123", "miner_def456"] },
"agent_id": { "contains": "S19" },
"sn": { "contains": "S19" },
"mac": { "contains": "S19" },
"status": { "in": ["online", "offline"] },
"ops_status": { "in": ["online", "offline"] },
"unstable": True,
"lifecycle_statuses": { "in": ["online", "offline"] },
"health_statuses": { "in": ["online", "offline"] },
"ip_ranges": ["192.168.1.5", "192.168.144.0/24", "10.0.0.1-10.0.0.50"],
"page": 4503599627370496,
"limit": 5000
}
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({
id: {in: ['miner_abc123', 'miner_def456']},
agent_id: {contains: 'S19'},
sn: {contains: 'S19'},
mac: {contains: 'S19'},
status: {in: ['online', 'offline']},
ops_status: {in: ['online', 'offline']},
unstable: true,
lifecycle_statuses: {in: ['online', 'offline']},
health_statuses: {in: ['online', 'offline']},
ip_ranges: ['192.168.1.5', '192.168.144.0/24', '10.0.0.1-10.0.0.50'],
page: 4503599627370496,
limit: 5000
})
};
fetch('https://api.nonce.app/private-api/v1/{workspace_id}/farms/{farm_id}/miner/search', 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.nonce.app/private-api/v1/{workspace_id}/farms/{farm_id}/miner/search",
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([
'id' => [
'in' => [
'miner_abc123',
'miner_def456'
]
],
'agent_id' => [
'contains' => 'S19'
],
'sn' => [
'contains' => 'S19'
],
'mac' => [
'contains' => 'S19'
],
'status' => [
'in' => [
'online',
'offline'
]
],
'ops_status' => [
'in' => [
'online',
'offline'
]
],
'unstable' => true,
'lifecycle_statuses' => [
'in' => [
'online',
'offline'
]
],
'health_statuses' => [
'in' => [
'online',
'offline'
]
],
'ip_ranges' => [
'192.168.1.5',
'192.168.144.0/24',
'10.0.0.1-10.0.0.50'
],
'page' => 4503599627370496,
'limit' => 5000
]),
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.nonce.app/private-api/v1/{workspace_id}/farms/{farm_id}/miner/search"
payload := strings.NewReader("{\n \"id\": {\n \"in\": [\n \"miner_abc123\",\n \"miner_def456\"\n ]\n },\n \"agent_id\": {\n \"contains\": \"S19\"\n },\n \"sn\": {\n \"contains\": \"S19\"\n },\n \"mac\": {\n \"contains\": \"S19\"\n },\n \"status\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"ops_status\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"unstable\": true,\n \"lifecycle_statuses\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"health_statuses\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"ip_ranges\": [\n \"192.168.1.5\",\n \"192.168.144.0/24\",\n \"10.0.0.1-10.0.0.50\"\n ],\n \"page\": 4503599627370496,\n \"limit\": 5000\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.nonce.app/private-api/v1/{workspace_id}/farms/{farm_id}/miner/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": {\n \"in\": [\n \"miner_abc123\",\n \"miner_def456\"\n ]\n },\n \"agent_id\": {\n \"contains\": \"S19\"\n },\n \"sn\": {\n \"contains\": \"S19\"\n },\n \"mac\": {\n \"contains\": \"S19\"\n },\n \"status\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"ops_status\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"unstable\": true,\n \"lifecycle_statuses\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"health_statuses\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"ip_ranges\": [\n \"192.168.1.5\",\n \"192.168.144.0/24\",\n \"10.0.0.1-10.0.0.50\"\n ],\n \"page\": 4503599627370496,\n \"limit\": 5000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nonce.app/private-api/v1/{workspace_id}/farms/{farm_id}/miner/search")
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 \"id\": {\n \"in\": [\n \"miner_abc123\",\n \"miner_def456\"\n ]\n },\n \"agent_id\": {\n \"contains\": \"S19\"\n },\n \"sn\": {\n \"contains\": \"S19\"\n },\n \"mac\": {\n \"contains\": \"S19\"\n },\n \"status\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"ops_status\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"unstable\": true,\n \"lifecycle_statuses\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"health_statuses\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"ip_ranges\": [\n \"192.168.1.5\",\n \"192.168.144.0/24\",\n \"10.0.0.1-10.0.0.50\"\n ],\n \"page\": 4503599627370496,\n \"limit\": 5000\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"id": "002b1a50fa281efe0f320ebc39f5047b",
"farm_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"farm": {
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "Farm Name"
},
"workspace_id": "org_xxxxxxxxxxxxxxxxxxxxxxxxxxx",
"serial_number": "HTM3FS28HD25011939878367054H36045",
"model": "Antminer S19",
"ip": "192.168.1.100",
"mac": "00:1B:44:11:3A:B7",
"firmware_version": "20250304.15.REL",
"rack": "A1",
"position": 3,
"is_mining": true,
"last_check_succeed": true,
"stale": false,
"overheat": false,
"low_hashrate": false,
"overpower": false,
"underpower": false,
"status": "online",
"ops_status": null,
"unstable_reason": null,
"lifecycle_status": "online",
"health_status": null,
"mining_mode": "normal",
"mining_mode_preset": "<string>",
"hashrate": 100120000000000,
"hashrate_24h": 100120000000000,
"power": 9771,
"temp": 75.5,
"temperature_inlet_avg": 35.5,
"temperature_outlet_avg": 65.5,
"efficiency": 34,
"uptime": 86400,
"last_updated_at": "2025-08-27T00:00:00Z",
"created_at": "2025-08-27T00:00:00Z",
"errors": [
{
"code": "E001",
"message": "Temperature too high"
}
],
"hashboards": [
{
"serial_number": "HB123456",
"hashrate": 25120000000000,
"chips": 4,
"chip_frequency": 650
}
],
"total_chips": 5,
"expected_chips": 4,
"anomaly_flags": 0,
"pools": [],
"psus": []
}
],
"pagination": {
"total": 50,
"limit": 10,
"offset": 0,
"hasNext": true,
"hasPrevious": false
},
"error": null
}{
"statusCode": 400,
"message": "Invalid request parameters",
"error": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid or missing API key",
"error": "Unauthorized"
}{
"statusCode": 403,
"message": "Access denied to workspace",
"error": "Forbidden"
}Search Miners
Search miners in the farm with operator-object filters. Supports id, agent_id, sn, mac, status, ops_status, and ip_ranges criteria. lifecycle_statuses is the legacy combined filter; still accepted for backward compatibility (values are auto-routed to status / ops_status). health_statuses is deprecated and ignored at runtime. Omit body for an unfiltered first-page list.
curl --request POST \
--url https://api.nonce.app/private-api/v1/{workspace_id}/farms/{farm_id}/miner/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": {
"in": [
"miner_abc123",
"miner_def456"
]
},
"agent_id": {
"contains": "S19"
},
"sn": {
"contains": "S19"
},
"mac": {
"contains": "S19"
},
"status": {
"in": [
"online",
"offline"
]
},
"ops_status": {
"in": [
"online",
"offline"
]
},
"unstable": true,
"lifecycle_statuses": {
"in": [
"online",
"offline"
]
},
"health_statuses": {
"in": [
"online",
"offline"
]
},
"ip_ranges": [
"192.168.1.5",
"192.168.144.0/24",
"10.0.0.1-10.0.0.50"
],
"page": 4503599627370496,
"limit": 5000
}
'import requests
url = "https://api.nonce.app/private-api/v1/{workspace_id}/farms/{farm_id}/miner/search"
payload = {
"id": { "in": ["miner_abc123", "miner_def456"] },
"agent_id": { "contains": "S19" },
"sn": { "contains": "S19" },
"mac": { "contains": "S19" },
"status": { "in": ["online", "offline"] },
"ops_status": { "in": ["online", "offline"] },
"unstable": True,
"lifecycle_statuses": { "in": ["online", "offline"] },
"health_statuses": { "in": ["online", "offline"] },
"ip_ranges": ["192.168.1.5", "192.168.144.0/24", "10.0.0.1-10.0.0.50"],
"page": 4503599627370496,
"limit": 5000
}
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({
id: {in: ['miner_abc123', 'miner_def456']},
agent_id: {contains: 'S19'},
sn: {contains: 'S19'},
mac: {contains: 'S19'},
status: {in: ['online', 'offline']},
ops_status: {in: ['online', 'offline']},
unstable: true,
lifecycle_statuses: {in: ['online', 'offline']},
health_statuses: {in: ['online', 'offline']},
ip_ranges: ['192.168.1.5', '192.168.144.0/24', '10.0.0.1-10.0.0.50'],
page: 4503599627370496,
limit: 5000
})
};
fetch('https://api.nonce.app/private-api/v1/{workspace_id}/farms/{farm_id}/miner/search', 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.nonce.app/private-api/v1/{workspace_id}/farms/{farm_id}/miner/search",
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([
'id' => [
'in' => [
'miner_abc123',
'miner_def456'
]
],
'agent_id' => [
'contains' => 'S19'
],
'sn' => [
'contains' => 'S19'
],
'mac' => [
'contains' => 'S19'
],
'status' => [
'in' => [
'online',
'offline'
]
],
'ops_status' => [
'in' => [
'online',
'offline'
]
],
'unstable' => true,
'lifecycle_statuses' => [
'in' => [
'online',
'offline'
]
],
'health_statuses' => [
'in' => [
'online',
'offline'
]
],
'ip_ranges' => [
'192.168.1.5',
'192.168.144.0/24',
'10.0.0.1-10.0.0.50'
],
'page' => 4503599627370496,
'limit' => 5000
]),
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.nonce.app/private-api/v1/{workspace_id}/farms/{farm_id}/miner/search"
payload := strings.NewReader("{\n \"id\": {\n \"in\": [\n \"miner_abc123\",\n \"miner_def456\"\n ]\n },\n \"agent_id\": {\n \"contains\": \"S19\"\n },\n \"sn\": {\n \"contains\": \"S19\"\n },\n \"mac\": {\n \"contains\": \"S19\"\n },\n \"status\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"ops_status\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"unstable\": true,\n \"lifecycle_statuses\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"health_statuses\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"ip_ranges\": [\n \"192.168.1.5\",\n \"192.168.144.0/24\",\n \"10.0.0.1-10.0.0.50\"\n ],\n \"page\": 4503599627370496,\n \"limit\": 5000\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.nonce.app/private-api/v1/{workspace_id}/farms/{farm_id}/miner/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": {\n \"in\": [\n \"miner_abc123\",\n \"miner_def456\"\n ]\n },\n \"agent_id\": {\n \"contains\": \"S19\"\n },\n \"sn\": {\n \"contains\": \"S19\"\n },\n \"mac\": {\n \"contains\": \"S19\"\n },\n \"status\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"ops_status\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"unstable\": true,\n \"lifecycle_statuses\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"health_statuses\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"ip_ranges\": [\n \"192.168.1.5\",\n \"192.168.144.0/24\",\n \"10.0.0.1-10.0.0.50\"\n ],\n \"page\": 4503599627370496,\n \"limit\": 5000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nonce.app/private-api/v1/{workspace_id}/farms/{farm_id}/miner/search")
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 \"id\": {\n \"in\": [\n \"miner_abc123\",\n \"miner_def456\"\n ]\n },\n \"agent_id\": {\n \"contains\": \"S19\"\n },\n \"sn\": {\n \"contains\": \"S19\"\n },\n \"mac\": {\n \"contains\": \"S19\"\n },\n \"status\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"ops_status\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"unstable\": true,\n \"lifecycle_statuses\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"health_statuses\": {\n \"in\": [\n \"online\",\n \"offline\"\n ]\n },\n \"ip_ranges\": [\n \"192.168.1.5\",\n \"192.168.144.0/24\",\n \"10.0.0.1-10.0.0.50\"\n ],\n \"page\": 4503599627370496,\n \"limit\": 5000\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"id": "002b1a50fa281efe0f320ebc39f5047b",
"farm_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"farm": {
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "Farm Name"
},
"workspace_id": "org_xxxxxxxxxxxxxxxxxxxxxxxxxxx",
"serial_number": "HTM3FS28HD25011939878367054H36045",
"model": "Antminer S19",
"ip": "192.168.1.100",
"mac": "00:1B:44:11:3A:B7",
"firmware_version": "20250304.15.REL",
"rack": "A1",
"position": 3,
"is_mining": true,
"last_check_succeed": true,
"stale": false,
"overheat": false,
"low_hashrate": false,
"overpower": false,
"underpower": false,
"status": "online",
"ops_status": null,
"unstable_reason": null,
"lifecycle_status": "online",
"health_status": null,
"mining_mode": "normal",
"mining_mode_preset": "<string>",
"hashrate": 100120000000000,
"hashrate_24h": 100120000000000,
"power": 9771,
"temp": 75.5,
"temperature_inlet_avg": 35.5,
"temperature_outlet_avg": 65.5,
"efficiency": 34,
"uptime": 86400,
"last_updated_at": "2025-08-27T00:00:00Z",
"created_at": "2025-08-27T00:00:00Z",
"errors": [
{
"code": "E001",
"message": "Temperature too high"
}
],
"hashboards": [
{
"serial_number": "HB123456",
"hashrate": 25120000000000,
"chips": 4,
"chip_frequency": 650
}
],
"total_chips": 5,
"expected_chips": 4,
"anomaly_flags": 0,
"pools": [],
"psus": []
}
],
"pagination": {
"total": 50,
"limit": 10,
"offset": 0,
"hasNext": true,
"hasPrevious": false
},
"error": null
}{
"statusCode": 400,
"message": "Invalid request parameters",
"error": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid or missing API key",
"error": "Unauthorized"
}{
"statusCode": 403,
"message": "Access denied to workspace",
"error": "Forbidden"
}Authorizations
Clerk Machine API Key for authentication
Body
Miner ID filter. Supports exact match (eq) or set membership (in).
Show child attributes
Show child attributes
{ "in": ["miner_abc123", "miner_def456"] }String filter operators. Provide at least one operator.
Show child attributes
Show child attributes
{ "contains": "S19" }String filter operators. Provide at least one operator.
Show child attributes
Show child attributes
{ "contains": "S19" }String filter operators. Provide at least one operator.
Show child attributes
Show child attributes
{ "contains": "S19" }Run status filter. Accepted values: online, stale.
Show child attributes
Show child attributes
{ "in": ["online", "offline"] }Ops status filter. Accepted values: maintenance, retired, off_rack, transit, archived.
Show child attributes
Show child attributes
{ "in": ["online", "offline"] }Unstable filter. true returns only miners with non-null unstable_reason. Omit to include both stable and unstable miners.
Deprecated — legacy combined filter. Use status and ops_status instead. Values are auto-routed to the matching axis. Note: run-state and ops-state are now independent — filtering by a run-state value (e.g. online) no longer excludes miners with an ops_status set. Will be removed in a future major version.
Show child attributes
Show child attributes
{ "in": ["online", "offline"] }Deprecated — accepted for backward compatibility but ignored at runtime. Use anomaly_filters (anomaly bitmask) or hashrate_realization (ratio range) instead.
Show child attributes
Show child attributes
{ "in": ["online", "offline"] }Filter miners by IPv4 ranges. A miner matches if its IP falls into any of the provided ranges. Each item accepts one of: single address 192.168.1.5, CIDR 192.168.1.0/24, or hyphen range 192.168.1.1-192.168.1.254. At most 10 ranges per request.
10^(?:(?:(25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)\/(?:3[0-2]|[12]?\d)|(?:(25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)-(?:(25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:(25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?))$[
"192.168.1.5",
"192.168.144.0/24",
"10.0.0.1-10.0.0.50"
]1 <= x <= 90071992547409911 <= x <= 10000Response
Successfully retrieved miner status