Get Task Batch
curl --request GET \
--url https://api.nonce.app/public-api/v2/workspaces/{workspace_id}/farms/{farm_id}/task-batches/{task_batch_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nonce.app/public-api/v2/workspaces/{workspace_id}/farms/{farm_id}/task-batches/{task_batch_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nonce.app/public-api/v2/workspaces/{workspace_id}/farms/{farm_id}/task-batches/{task_batch_id}', 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/public-api/v2/workspaces/{workspace_id}/farms/{farm_id}/task-batches/{task_batch_id}",
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://api.nonce.app/public-api/v2/workspaces/{workspace_id}/farms/{farm_id}/task-batches/{task_batch_id}"
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://api.nonce.app/public-api/v2/workspaces/{workspace_id}/farms/{farm_id}/task-batches/{task_batch_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nonce.app/public-api/v2/workspaces/{workspace_id}/farms/{farm_id}/task-batches/{task_batch_id}")
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{
"success": true,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_name": "miner.system.reboot",
"status": "succeed",
"task_count": 4503599627370495,
"succeed_count": 4503599627370495,
"unsuccessful_count": 4503599627370495,
"task_params": {},
"metadata": {},
"created_by": {
"type": "user",
"id": "user_2xGz1234567890",
"name": "John Doe",
"avatar": "https://example.com/avatar.png",
"metadata": {}
},
"created_at": "2023-11-07T05:31:56Z",
"created_count": 4503599627370495,
"queuing_count": 4503599627370495,
"pending_count": 4503599627370495,
"failed_count": 4503599627370495,
"timed_out_count": 4503599627370495,
"cancelled_count": 4503599627370495
},
"error": null
}{
"success": false,
"data": null,
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed"
}
}{
"success": false,
"data": null,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing credential"
}
}{
"success": false,
"data": null,
"error": {
"code": "FORBIDDEN",
"message": "Access denied"
}
}{
"success": false,
"data": null,
"error": {
"code": "TASK_BATCH_NOT_FOUND",
"message": "Task batch not found"
}
}{
"success": false,
"data": null,
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error"
}
}Task Batches
Get Task Batch
GET
/
public-api
/
v2
/
workspaces
/
{workspace_id}
/
farms
/
{farm_id}
/
task-batches
/
{task_batch_id}
Get Task Batch
curl --request GET \
--url https://api.nonce.app/public-api/v2/workspaces/{workspace_id}/farms/{farm_id}/task-batches/{task_batch_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nonce.app/public-api/v2/workspaces/{workspace_id}/farms/{farm_id}/task-batches/{task_batch_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nonce.app/public-api/v2/workspaces/{workspace_id}/farms/{farm_id}/task-batches/{task_batch_id}', 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/public-api/v2/workspaces/{workspace_id}/farms/{farm_id}/task-batches/{task_batch_id}",
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://api.nonce.app/public-api/v2/workspaces/{workspace_id}/farms/{farm_id}/task-batches/{task_batch_id}"
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://api.nonce.app/public-api/v2/workspaces/{workspace_id}/farms/{farm_id}/task-batches/{task_batch_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nonce.app/public-api/v2/workspaces/{workspace_id}/farms/{farm_id}/task-batches/{task_batch_id}")
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{
"success": true,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_name": "miner.system.reboot",
"status": "succeed",
"task_count": 4503599627370495,
"succeed_count": 4503599627370495,
"unsuccessful_count": 4503599627370495,
"task_params": {},
"metadata": {},
"created_by": {
"type": "user",
"id": "user_2xGz1234567890",
"name": "John Doe",
"avatar": "https://example.com/avatar.png",
"metadata": {}
},
"created_at": "2023-11-07T05:31:56Z",
"created_count": 4503599627370495,
"queuing_count": 4503599627370495,
"pending_count": 4503599627370495,
"failed_count": 4503599627370495,
"timed_out_count": 4503599627370495,
"cancelled_count": 4503599627370495
},
"error": null
}{
"success": false,
"data": null,
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed"
}
}{
"success": false,
"data": null,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing credential"
}
}{
"success": false,
"data": null,
"error": {
"code": "FORBIDDEN",
"message": "Access denied"
}
}{
"success": false,
"data": null,
"error": {
"code": "TASK_BATCH_NOT_FOUND",
"message": "Task batch not found"
}
}{
"success": false,
"data": null,
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error"
}
}Authorizations
oauth-jwtclerk-api-key
Clerk OAuth JWT access token
Path Parameters
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Task Batch ID
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$