Skip to main content

Get settings list

Retrieves all available settings into the specified project

 GET /api/1.0/settings?project={projectId}

Response

Model: application/json

ARRAY 
[
{
"key": <String> the unique key for the setting
"value": <String> The value for the setting,
"section": <String> Section where the setting is applied,
"description": <string> Setting description,
}
]

Query parameters

Some parameters are allowed for a filtered response

caution

parameters with * are mandatory

section: <String> - It will return anything containing this string in section
description: <Integer> - It will return anything containing this string in the description

Example

const fetchData=async ()=>{
let j,response;
const serverResponse = await fetch(`https://cloud.rigi.tech/api/1.0/settings?project=3`, {
mode: "cors",
method: "GET",
referrer: "no-referrer",
headers: {"authorization": "Bearer " + token}
})
if(!serverResponse.ok){
try {
switch (serverResponse.status){
case 400:
j = await serverResponse.json();
break;
case 403:
response = { message: "Forbidden access to data" };
case 404:
response = { message: "Address not found" };
default:
j = await serverResponse.json()
}
} catch (e) {
response = { message: "Error fetching data" };
}
}else{
j = await serverResponse.json()
}

response = { data:j };
const {data, message} = response
if(message) console.debug(message)
if(data) console.debug(data)
}
fetchData()

Answer:

[
{
"key": "preflight_checklist",
"value": "3",
"section": "control",
"description": ""
},
{
"key": "ground_checklist",
"value": "13",
"section": "control",
"description": ""
},
{
"key": "rigi_map_selected_style",
"value": "default",
"section": "map",
"description": ""
},
{
"key": "rigi_map_selected_style_light",
"value": "light",
"section": "map",
"description": ""
},
{
"key": "daily_checklist",
"value": "12",
"section": "control",
"description": "Daily checklist configured."
},
{
"key": "vertical_distance_units",
"value": "m",
"section": "map",
"description": "Defines the unit used for vertical distances."
},
{
"key": "short_horizontal_distance_units",
"value": "m",
"section": "map",
"description": "Defines the unit used for (short) horizontal distances."
},
{
"key": "long_horizontal_distance_units",
"value": "m",
"section": "map",
"description": "Defines the unit used for (long) horizontal distances."
},
{
"key": "weight_units",
"value": "kg",
"section": "map",
"description": "Defines the unit used for weights."
},
{
"key": "vertical_speed_units",
"value": "ms",
"section": "map",
"description": "Defines the unit used for vertical speeds."
},
{
"key": "horizontal_speed_units",
"value": "ms",
"section": "map",
"description": "Defines the unit used for horizontal speeds."
},
{
"key": "horizontal_square_distance_units",
"value": "km",
"section": "map",
"description": "Defines the unit used for surfaces."
},
{
"key": "planner_maximum_telemetry_distance",
"value": "30000",
"section": "planner",
"description": null
},
{
"key": "planner_maximum_way_point_distance",
"value": "10000",
"section": "planner",
"description": null
},
{
"key": "planner_maximum_distance",
"value": "100000",
"section": "planner",
"description": null
},
{
"key": "planner_maximum_climb_angle",
"value": "6",
"section": "planner",
"description": null
},
{
"key": "enable_segment_planner",
"value": "0",
"section": "map",
"description": "Enable segment planner only for admins"
}
]