Log State

The state for a data and event log specifies whether or not the log is actively storing datapoint updates. The log state can be “enabled” or “disabled”. 

URI Definition

Method

URI and Fields

GET

/iap/log/state

Returns the current state for all data and event logs.

Query Parameter

  • tagsfilters logged data by tags. Can be specified both as only tag name and key=value pair.

Success Response

Current log state.

Examples

Example 1

https://localhost/iap/log/state

Response

Enabled.

Example 2

https://localhost/iap/log/state?tags=log_level_1;key1=value;keyNoValue

Response                   

[
   {
       "name":"keyNoValue",
       "value":null,
       "log_state":"disabled"
   },
   {
       "name":"key1",
       "value":"value",
       "log_state":"disabled"
   },
   {
       "name":"log_level_1",
       "value":"1",
       "log_state":"disabled"
   }
]                                                                                                                                                     


PUT

/iap/log/state

Sets the current state for all data and event logs.

Query Parameter

  • tags - allows to set log state only to specified tags

Request Body

Specifies state: enabled or disabled

Success Response

Empty.

Examples

Example 1

https://localhost/iap/log/state

Request Body

Enabled.

Response

Empty (204 response).


Example 2

https://localhost/iap/log/state?tags=log_level_1;key1=value;keyNoValue

Request Body

Disabled.

Response

Empty (204 response).                                                                                                                 


Query Parameters

Optional query parameters can be used with your REST request.  Specifying queries is described under Queries and ParametersPath Parameters, and Query Parameters.