Skip to content

Latest commit

 

History

History
90 lines (68 loc) · 1.96 KB

General - Configuration Settings Set.adoc

File metadata and controls

90 lines (68 loc) · 1.96 KB

General - Configuration Settings Set

The /api/edge/set.json endpoint allows you to set a specific part of the device’s configuration.

It does not support a HTTP GET.

This method is CSRF protected so also requires a X-CSRF-TOKEN (see Sensitive Requests (CSRF Protection)).

Request

A HTTP POST to /api/edge/set.json with the JSON configuration attributes to set as the request content.

Response

Root

Name Type Values Description

SET

Object

status object

An object that contains status values for the set request.

SESSION_ID

String

A session ID

The authorisation string for this session that confirms the user is correctly authenticated.

GET

String

JSON configuration

The parent section of the set value after the set.

COMMIT

Object

status object

An object that contains status values for the configuration commit request.

SAVE

Object

status object

An object that contains status values for the configuration save request.

success

Boolean

true or false

Whether the API request was successful.

status Object

Name Type Values Description

failure

String

A boolean encapsulated in a string (e.g. "0" or "1")

Whether the configuration settings set operation failed.

success

String

A boolean encapsulated in a string (e.g. "0" or "1")

Whether the configuration settings set operation was successful.

Examples

Custom Attribute Successful Set

POST /api/edge/set.json Request
{"custom-attribute":{"hi":null}}
POST /api/edge/set.json Response
{"SET": {"failure": "0", "success": "1"}, "SESSION_ID": "742dfcc13b8d449aa36a4a1847bfcef7", "GET": {"custom-attribute": {"hi": null}}, "COMMIT": {"failure": "0", "success": "1"}, "SAVE": {"success": "1"}, "success": true}