PXE Query

Request

Request Format
Field Description
URL http://localhost:8083/api/osinstall/v1/report/deviceMacInfo
encode UTF-8
method HTTP POST
payload application/json

Payload

Payload
Field Type Required Description
Sn string yes device serial number
MAC string yes device MAC address

Payload Sample

{
   "Sn": "test",
   "Mac": "EA:1F:2d:3a:4H"
}

Code Sample (PHP)

<?php
  $data = array("Sn" => "test","Mac" => "EA:1F:2d:3a:4H");
  $str = json_encode($data);
  $ch = curl_init('http://localhost:8083/api/osinstall/v1/report/deviceMacInfo');
  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
  curl_setopt($ch, CURLOPT_POSTFIELDS, $str);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, array(
      'Content-Type: application/json',
      'Content-Length: ' . strlen($str))
  );

  $result = curl_exec($ch);
  echo $result;
  ?>

Response

Response Format
Field Description
Status success or failure
Content.Result
  • true success
  • false failed
Message return message

Sample Response Message

{
    "Content": {
        "Result": "true"
    },
    "Message": "success",
    "Status": "success"
}