curl --request GET \
--url https://api.example.com/api/v1/devices/latest-executions/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/devices/latest-executions/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/devices/latest-executions/', 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.example.com/api/v1/devices/latest-executions/",
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.example.com/api/v1/devices/latest-executions/"
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.example.com/api/v1/devices/latest-executions/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/devices/latest-executions/")
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{
"count": 123,
"results": [
{
"device_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"device_name": "<string>",
"rack": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"location": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"position": 123,
"in_triage": true,
"entered_triage_at": "2023-11-07T05:31:56Z",
"latest_execution": {
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"job_device_status_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow_name": "EnrollmentWorkflow",
"status": "running",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"failure_code": "<string>",
"failure_message": "<string>",
"responsible_team": "fleet_manager",
"temporal_link": "<string>"
}
}
],
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2"
}{
"detail": "<string>",
"code": "error",
"field_errors": [
{
"field": "<string>",
"messages": [
"<string>"
]
}
]
}{
"detail": "<string>",
"code": "error",
"field_errors": [
{
"field": "<string>",
"messages": [
"<string>"
]
}
]
}{
"detail": "<string>",
"code": "error",
"field_errors": [
{
"field": "<string>",
"messages": [
"<string>"
]
}
]
}List latest job execution per device
List each device in a site with its latest job execution.
Device-first: one row per device, ordered by the latest execution’s
created_at (most recent first), with never-run devices last. A
device that has never run a job returns latest_execution: null. The
status filter matches the device’s LATEST execution — a device whose
most recent run passed is excluded from status=failed even if it
failed earlier, and never-run devices drop out when status is set.
workflow_id/workflow_name narrow which runs count as “latest”;
workflow_name uses the workflow’s temporal name.
curl --request GET \
--url https://api.example.com/api/v1/devices/latest-executions/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/devices/latest-executions/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/devices/latest-executions/', 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.example.com/api/v1/devices/latest-executions/",
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.example.com/api/v1/devices/latest-executions/"
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.example.com/api/v1/devices/latest-executions/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/devices/latest-executions/")
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{
"count": 123,
"results": [
{
"device_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"device_name": "<string>",
"rack": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"location": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"position": 123,
"in_triage": true,
"entered_triage_at": "2023-11-07T05:31:56Z",
"latest_execution": {
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"job_device_status_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow_name": "EnrollmentWorkflow",
"status": "running",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"failure_code": "<string>",
"failure_message": "<string>",
"responsible_team": "fleet_manager",
"temporal_link": "<string>"
}
}
],
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2"
}{
"detail": "<string>",
"code": "error",
"field_errors": [
{
"field": "<string>",
"messages": [
"<string>"
]
}
]
}{
"detail": "<string>",
"code": "error",
"field_errors": [
{
"field": "<string>",
"messages": [
"<string>"
]
}
]
}{
"detail": "<string>",
"code": "error",
"field_errors": [
{
"field": "<string>",
"messages": [
"<string>"
]
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Query Parameters
Number of results to return per page.
1 <= x <= 500A page number within the paginated result set.
Site to scope the device list to. Required.
Filter to devices whose LATEST execution has one of these statuses. Multiple values may be separated by commas.
running- Runningcompleted- Completedfailed- Failedcancelled- Cancelledterminated- Terminatedsuperseded- Supersededtimed_out- Timed Out
running, completed, failed, cancelled, terminated, superseded, timed_out Narrow which runs count as 'latest' to this workflow.
Narrow which runs count as 'latest' to this temporal workflow name.
EnrollmentWorkflow- Enrollment WorkflowSingleNodeBurnInWorkflow- Single Node Burn-In WorkflowMultiNodeBurnInPairwiseWorkflow- Multi-Node Burn-In Pairwise WorkflowMultiNodeBurnInCollectiveWorkflow- Multi-Node Burn-In Collective WorkflowPrepareHardwareTestImagesWorkflow- Prepare Hardware-Test Images WorkflowReportGenerationWorkflow- Report Generation WorkflowSlurmAdoptWorkflow- Add to Test Cluster WorkflowSlurmReleaseWorkflow- Release from Test Cluster WorkflowCustomerReleaseWorkflow- Customer Release WorkflowIronicNodeCleanWorkflow- Ironic Node Clean WorkflowQuarantineWorkflow- Quarantine WorkflowReleaseWorkflow- Release WorkflowUnenrollmentWorkflow- Unenrollment WorkflowConnectivityVerificationWorkflow- Connectivity Verification WorkflowFirmwareInventoryWorkflow- Firmware Inventory WorkflowFirmwareVerificationWorkflow- Firmware Verification WorkflowFirmwarePolicyVerificationWorkflow- Firmware Policy Verification WorkflowNVSwitchFirmwarePolicyVerificationWorkflow- NVSwitch Firmware Policy Verification WorkflowNodeSwapWorkflow- Node Swap WorkflowPowerCycleWorkflow- Power Cycle WorkflowPowerOffWorkflow- Power Off WorkflowSetMaintenanceModeWorkflow- Set Maintenance Mode WorkflowDisableMaintenanceModeWorkflow- Disable Maintenance Mode WorkflowColdResetBmcWorkflow- Cold Reset BMC WorkflowSlurmDrainNodeWorkflow- Slurm Drain Node WorkflowSlurmResumeNodeWorkflow- Slurm Resume Drained Node WorkflowFrontendVrfReturnWorkflow- Frontend VRF Return WorkflowFrontendVrfIsolateWorkflow- Frontend VRF Isolate WorkflowNvLinkIsolateWorkflow- NVLink Isolate WorkflowNvLinkReturnWorkflow- NVLink Return WorkflowBackendVrfIsolateWorkflow- Back-end VRF Isolate WorkflowBackendVrfReturnWorkflow- Back-end VRF Return WorkflowImageNodeWorkflow- Image Node WorkflowUnimageNodeWorkflow- Unimage Node WorkflowNodeDiagnosticsWorkflow- Node Diagnostics Workflow
EnrollmentWorkflow, SingleNodeBurnInWorkflow, MultiNodeBurnInPairwiseWorkflow, MultiNodeBurnInCollectiveWorkflow, PrepareHardwareTestImagesWorkflow, ReportGenerationWorkflow, SlurmAdoptWorkflow, SlurmReleaseWorkflow, CustomerReleaseWorkflow, IronicNodeCleanWorkflow, QuarantineWorkflow, ReleaseWorkflow, UnenrollmentWorkflow, ConnectivityVerificationWorkflow, FirmwareInventoryWorkflow, FirmwareVerificationWorkflow, FirmwarePolicyVerificationWorkflow, NVSwitchFirmwarePolicyVerificationWorkflow, NodeSwapWorkflow, PowerCycleWorkflow, PowerOffWorkflow, SetMaintenanceModeWorkflow, DisableMaintenanceModeWorkflow, ColdResetBmcWorkflow, SlurmDrainNodeWorkflow, SlurmResumeNodeWorkflow, FrontendVrfReturnWorkflow, FrontendVrfIsolateWorkflow, NvLinkIsolateWorkflow, NvLinkReturnWorkflow, BackendVrfIsolateWorkflow, BackendVrfReturnWorkflow, ImageNodeWorkflow, UnimageNodeWorkflow, NodeDiagnosticsWorkflow