Skip to main content
Version: 3.5.0

Preset

note

This resource demonstrates the interaction with preset in SENSR. You can import or export preset to the current open project.

GET

/internal/settings/preset

  • Get detailed information about the desired preset

  • If you do not pass any name, this command returns full available preset list in the project.

  • Parameters
    • name : Preset name.
  • Return code
    • 200 OK
    • 400 BAD REQ
  • Example

$ curl -X GET 'http://localhost:9080/internal/settings/preset'
** Respond **
{
"official": [
"highway_bigtruck",
"indoor",
"indoor_light",
"outdoor",
"outdoor_light",
"long_range"
],
"custom": [
"my_preset1"
]
}


POST

/internal/settings/preset

  • Return algorithm configuration of a desired algo node as encrypted string.

  • You can save the returned string as a file and import it with PUT command.

  • Parameters
    • method : preset operation. ('export' is the only supported method now.)
    • node-uri : ID of algo node.
  • Return code
    • 200 OK
    • 400 BAD REQ
  • Example

$ curl -X POST 'http://localhost:9080/internal/settings/preset?method=export&node-uri=algo_0000'
** Respond **
W3BhcmFtZXX.........XXEEGE==


PUT

/internal/settings/preset

  • Import a preset into the current project.

  • Parameters
    • name : Name of the imported preset.
  • Return code
    • 200 OK
    • 400 BAD REQ
  • Example

$ curl -X PUT 'http://localhost:9080/internal/settings/preset?name=my_preset1'
--data 'W3BhcmFtZXX.........XXEEGE=='
** Respond **
200 OK


DELETE

/internal/settings/preset

  • Delete a preset. You can delete custom preset only.

  • Parameters
    • name : Preset name.
  • Return code
    • 200 OK
    • 400 BAD REQ
  • Example

$ curl -X DELETE 'http://localhost:9080/internal/settings/preset?name=my_preset1'        
** Respond **
200 OK

Logo
If you need access, please contact