- Legion API
- Terminals
- Update terminal
Update terminal
const url = 'https://legion.picogrid.com/v2/terminals/example';const options = { method: 'PATCH', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","location":{"type":"lat_lng_alt","altitude":1,"latitude":1,"longitude":1}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://legion.picogrid.com/v2/terminals/example \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "location": { "type": "lat_lng_alt", "altitude": 1, "latitude": 1, "longitude": 1 } }'Update the terminal specified by the id in the url path
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The id of the terminal you want to target
Request Bodyrequired
Section titled “Request Bodyrequired”Specify the fields of the terminal to update here
object
Provide the latitude and longitude of the resource using WGS84, and the altitude of the resource in meters above sea level
object
The altitude of the resource in meters above sea level
Responses
Section titled “Responses”Success
object
Gives multiple different formats and units to choose between that all represent the location of the resource
object
Provides the latitude and longitude of the resource using WGS84, and the altitude of the resource in meters above sea level
object
The altitude of the resource in meters above sea level
Examplegenerated
{ "id": "example", "name": "example", "location": { "lat_long_alt": { "altitude": 1, "latitude": 1, "longitude": 1 } }}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Bad Request Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Authentication Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Unauthorized Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Resource Not Found Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Timeout Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Bad Gateway Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Version 2 · commit 0771262
