Update the sensor definition by uploading an external file.
curl --request PUT \
--url https://api.example.com/avx-sensorlabs/v8/sensors/{id}/externalfiles \
--header 'Content-Type: multipart/form-data' \
--form file=@example-file \
--form externalFileInfo=import requests
url = "https://api.example.com/avx-sensorlabs/v8/sensors/{id}/externalfiles"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "externalFileInfo": "" }
response = requests.put(url, data=payload, files=files)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('externalFileInfo', '');
const options = {method: 'PUT'};
options.body = form;
fetch('https://api.example.com/avx-sensorlabs/v8/sensors/{id}/externalfiles', 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/avx-sensorlabs/v8/sensors/{id}/externalfiles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"externalFileInfo\"\r\n\r\n\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data"
],
]);
$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.example.com/avx-sensorlabs/v8/sensors/{id}/externalfiles"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"externalFileInfo\"\r\n\r\n\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("PUT", url, payload)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/avx-sensorlabs/v8/sensors/{id}/externalfiles")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"externalFileInfo\"\r\n\r\n\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/avx-sensorlabs/v8/sensors/{id}/externalfiles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"externalFileInfo\"\r\n\r\n\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_bodyusing RestSharp;
var options = new RestClientOptions("https://api.example.com/avx-sensorlabs/v8/sensors/{id}/externalfiles");
var client = new RestClient(options);
var request = new RestRequest("");
request.AlwaysMultipartFormData = true;
request.FormBoundary = "---011000010111000001101001";
request.AddFile("file", "example-file");
request.AddParameter("externalFileInfo", "");
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.example.com/avx-sensorlabs/v8/sensors/{id}/externalfiles");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Content-Type: multipart/form-data");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"externalFileInfo\"\r\n\r\n\r\n-----011000010111000001101001--");
CURLcode ret = curl_easy_perform(hnd);{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Update the sensor definition by uploading an external file.
Additional form field required:
externalFileInfo (string containing JSON)
{
"externalFileInfo": {
"radarInfo": {
"id": "0",
"RadarExternalsEnum": "PulseSequence",
"radarItemType": "Mode"
},
"lidarInfo": null,
"cameraInfo": null
}
}
{
"externalFileInfo": {
"radarInfo": {
"id": "0",
"RadarExternalsEnum": "PatternTableFile",
"radarItemType": "Rx"
},
"lidarInfo": null,
"cameraInfo": null
}
}
{
"externalFileInfo": {
"radarInfo": null,
"lidarInfo": {
"LidarExternalsEnum": "FiringSequenceFilePath"
},
"cameraInfo": null
}
}
{
"externalFileInfo": {
"radarInfo": null,
"lidarInfo": null,
"cameraInfo": {
"CameraExternalsEnum": "CfaTransmissionR",
"ImagerId": "0"
}
}
}
TransmitterWeightingSequence,
ChirpSequence,
PulseSequence,
PiecewiseLinearModelSequence,
PatternTableFile
FiringSequenceFilePath,
LidarLensDistortion,
IntensityFilePath
CfaTransmissionR,
CfaTransmissionG,
CfaTransmissionB,
QuantumEfficiency,
LensTransmission,
CameraLensDistortion,
FragmentShader,
ThermalRelativeIllumination,
ThermalPointSpreadFunction,
ThermalSensitivity,
ThermalRelativeNetd
PUT
/
avx-sensorlabs
/
v8
/
sensors
/
{id}
/
externalfiles
Update the sensor definition by uploading an external file.
curl --request PUT \
--url https://api.example.com/avx-sensorlabs/v8/sensors/{id}/externalfiles \
--header 'Content-Type: multipart/form-data' \
--form file=@example-file \
--form externalFileInfo=import requests
url = "https://api.example.com/avx-sensorlabs/v8/sensors/{id}/externalfiles"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "externalFileInfo": "" }
response = requests.put(url, data=payload, files=files)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('externalFileInfo', '');
const options = {method: 'PUT'};
options.body = form;
fetch('https://api.example.com/avx-sensorlabs/v8/sensors/{id}/externalfiles', 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/avx-sensorlabs/v8/sensors/{id}/externalfiles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"externalFileInfo\"\r\n\r\n\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data"
],
]);
$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.example.com/avx-sensorlabs/v8/sensors/{id}/externalfiles"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"externalFileInfo\"\r\n\r\n\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("PUT", url, payload)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/avx-sensorlabs/v8/sensors/{id}/externalfiles")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"externalFileInfo\"\r\n\r\n\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/avx-sensorlabs/v8/sensors/{id}/externalfiles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"externalFileInfo\"\r\n\r\n\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_bodyusing RestSharp;
var options = new RestClientOptions("https://api.example.com/avx-sensorlabs/v8/sensors/{id}/externalfiles");
var client = new RestClient(options);
var request = new RestRequest("");
request.AlwaysMultipartFormData = true;
request.FormBoundary = "---011000010111000001101001";
request.AddFile("file", "example-file");
request.AddParameter("externalFileInfo", "");
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.example.com/avx-sensorlabs/v8/sensors/{id}/externalfiles");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Content-Type: multipart/form-data");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"externalFileInfo\"\r\n\r\n\r\n-----011000010111000001101001--");
CURLcode ret = curl_easy_perform(hnd);{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Was this page helpful?