Get firmware policy snapshot
curl --request GET \
--url https://api.example.com/api/v1/firmware-policy-snapshots/{workflow_run_id}/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/firmware-policy-snapshots/{workflow_run_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.example.com/api/v1/firmware-policy-snapshots/{workflow_run_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.example.com/api/v1/firmware-policy-snapshots/{workflow_run_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.example.com/api/v1/firmware-policy-snapshots/{workflow_run_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.example.com/api/v1/firmware-policy-snapshots/{workflow_run_id}/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/firmware-policy-snapshots/{workflow_run_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{
"workflow_run_id": "<string>",
"device_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"components": [
{
"component_key": "<string>",
"expected_versions": [
{
"version": "<string>",
"vendor": "<string>",
"model_name": "<string>"
}
],
"members": [
{
"member_key": "<string>",
"probe_path": "<string>",
"endpoint": "bmc",
"field": "<string>",
"collection_method": "redfish",
"evidence_authority": "bmc_firmware_inventory",
"collectable": true,
"uncollectable_reason": "not_in_firmware_inventory",
"member_role": "boot",
"profile_vendor": "<string>",
"profile_model_name": "<string>",
"expected_versions": [
{
"version": "<string>",
"vendor": "<string>",
"model_name": "<string>"
}
],
"uncollectable_detail": "<string>"
}
],
"component_class": "bmc",
"collector_admission": {
"version": "<string>",
"platform_class": "<string>",
"component_key": "<string>",
"native_family": "cx7",
"method": "redfish",
"paths": [
"<string>"
],
"field": "<string>",
"endpoint": "<string>",
"evidence_authority": "bmc_firmware_inventory",
"collection_source": "bmc_vendor_scan",
"collection_tool": "<string>",
"expected_count": 2
}
}
],
"snapshot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"switch_admission": {
"schema_version": "switch-admission-1.0",
"applicability_name": "netbox_assigned_switch_policy",
"applicability_version": "v1",
"submission_mode": "DRY_RUN",
"guard": {
"device_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"netbox_device_id": 123,
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role_organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role_slug": "<string>",
"device_class": "<string>",
"device_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type_organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type_kind": "<string>",
"vendor": "<string>",
"model": "<string>",
"inventory_only": true,
"platform_class": "<string>",
"serial": "<string>",
"site_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rack_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"cache_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cache_device_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cache_netbox_device_id": 123,
"cache_site_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fetched_at": "2023-11-07T05:31:56Z",
"last_synced_at": "2023-11-07T05:31:56Z",
"freshness_deadline": "2023-11-07T05:31:56Z",
"source_updated_at": "2023-11-07T05:31:56Z",
"source_generated_at": "2023-11-07T05:31:56Z",
"source_marker": "<string>",
"policy_payload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"policy_id": "<string>",
"digest_contract": "<string>",
"producer_digest": "<string>",
"raw_content_hash": "<string>",
"approval_status": "<string>",
"approved_by": "<string>",
"approved_date": "<string>",
"selected_role": "nvswitch_tray",
"selected_level": "<string>",
"rules": [
{
"policy_component_key": "<string>",
"member_key": "<string>",
"expected_versions": [
"<string>"
],
"declaration": {
"method": "redfish",
"paths": [
"<string>"
],
"field": "<string>",
"endpoint": "bmc",
"fabric_uniform_required": null
},
"expected_authority": "mgx_redfish_inventory_v1",
"collection_source": "<string>",
"collection_tool": "<string>",
"expected_count": 1,
"version": "switch-plan-v1",
"scheduled": false
}
],
"binding_digest": "<string>"
}
}{
"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>"
]
}
]
}{
"detail": "<string>",
"code": "error",
"field_errors": [
{
"field": "<string>",
"messages": [
"<string>"
]
}
]
}Firmware Verification
Get firmware policy snapshot
Return one immutable snapshot and its typed collection operations.
GET
/
api
/
v1
/
firmware-policy-snapshots
/
{workflow_run_id}
/
Get firmware policy snapshot
curl --request GET \
--url https://api.example.com/api/v1/firmware-policy-snapshots/{workflow_run_id}/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/firmware-policy-snapshots/{workflow_run_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.example.com/api/v1/firmware-policy-snapshots/{workflow_run_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.example.com/api/v1/firmware-policy-snapshots/{workflow_run_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.example.com/api/v1/firmware-policy-snapshots/{workflow_run_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.example.com/api/v1/firmware-policy-snapshots/{workflow_run_id}/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/firmware-policy-snapshots/{workflow_run_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{
"workflow_run_id": "<string>",
"device_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"components": [
{
"component_key": "<string>",
"expected_versions": [
{
"version": "<string>",
"vendor": "<string>",
"model_name": "<string>"
}
],
"members": [
{
"member_key": "<string>",
"probe_path": "<string>",
"endpoint": "bmc",
"field": "<string>",
"collection_method": "redfish",
"evidence_authority": "bmc_firmware_inventory",
"collectable": true,
"uncollectable_reason": "not_in_firmware_inventory",
"member_role": "boot",
"profile_vendor": "<string>",
"profile_model_name": "<string>",
"expected_versions": [
{
"version": "<string>",
"vendor": "<string>",
"model_name": "<string>"
}
],
"uncollectable_detail": "<string>"
}
],
"component_class": "bmc",
"collector_admission": {
"version": "<string>",
"platform_class": "<string>",
"component_key": "<string>",
"native_family": "cx7",
"method": "redfish",
"paths": [
"<string>"
],
"field": "<string>",
"endpoint": "<string>",
"evidence_authority": "bmc_firmware_inventory",
"collection_source": "bmc_vendor_scan",
"collection_tool": "<string>",
"expected_count": 2
}
}
],
"snapshot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"switch_admission": {
"schema_version": "switch-admission-1.0",
"applicability_name": "netbox_assigned_switch_policy",
"applicability_version": "v1",
"submission_mode": "DRY_RUN",
"guard": {
"device_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"netbox_device_id": 123,
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role_organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role_slug": "<string>",
"device_class": "<string>",
"device_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type_organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type_kind": "<string>",
"vendor": "<string>",
"model": "<string>",
"inventory_only": true,
"platform_class": "<string>",
"serial": "<string>",
"site_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rack_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"cache_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cache_device_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cache_netbox_device_id": 123,
"cache_site_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fetched_at": "2023-11-07T05:31:56Z",
"last_synced_at": "2023-11-07T05:31:56Z",
"freshness_deadline": "2023-11-07T05:31:56Z",
"source_updated_at": "2023-11-07T05:31:56Z",
"source_generated_at": "2023-11-07T05:31:56Z",
"source_marker": "<string>",
"policy_payload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"policy_id": "<string>",
"digest_contract": "<string>",
"producer_digest": "<string>",
"raw_content_hash": "<string>",
"approval_status": "<string>",
"approved_by": "<string>",
"approved_date": "<string>",
"selected_role": "nvswitch_tray",
"selected_level": "<string>",
"rules": [
{
"policy_component_key": "<string>",
"member_key": "<string>",
"expected_versions": [
"<string>"
],
"declaration": {
"method": "redfish",
"paths": [
"<string>"
],
"field": "<string>",
"endpoint": "bmc",
"fabric_uniform_required": null
},
"expected_authority": "mgx_redfish_inventory_v1",
"collection_source": "<string>",
"collection_tool": "<string>",
"expected_count": 1,
"version": "switch-plan-v1",
"scheduled": false
}
],
"binding_digest": "<string>"
}
}{
"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>"
]
}
]
}{
"detail": "<string>",
"code": "error",
"field_errors": [
{
"field": "<string>",
"messages": [
"<string>"
]
}
]
}Authorizations
oauth2cookieAuth
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Response
Show child attributes
Show child attributes
Typed admission evidence in the existing immutable topology carrier.
The immutable snapshot member retains the complete policy payload and cache observation. This carrier binds those values to the exact switch guard/rules.
Show child attributes
Show child attributes