Query parameters

You can use query parameters with requests to the configuration resource URIs.

You can access various kinds of data by using query parameters. All the parameters are optional. The parameters are used only on certain API requests, as specified. The default behavior is for the parameters not to be specified.

view

The view query parameter specifies the amount of detail that is returned in a request. Set view=recursive to receive the requested data and the contents of any referenced objects. Use with the depth parameter to control the depth of recursion (the default is seven levels of recursion). The recursive process can impact performance substantially.

  • Each retrieved level of referenced configuration contents is a new depth. The depth parameter specifies how many levels to retrieve. The retrieved contents appear in the data under the _embedded : descendents field of the object.
    "_embedded": {
      "descendants": [ ]
    }
  • The referenced data from all the depths is retrieved as a flat list of objects and types. No information about the hierarchical relationship between the returned data is conveyed by this list.

Example:

/mgmt/config/default/class/object?view=recursive&depth=2
depth

The depth query parameter limits the returned payload to a specified number of expansions, controlling the number of referenced objects that are retrieved. The value of the parameter is an integer in the range 1 - 7. The recursive process can impact performance substantially.

  • This parameter is ignored unless it is used with the view=recursive parameter.
  • When the view=recursive parameter is used without a depth parameter, the value of depth defaults to 7.
Example:
/mgmt/config/default/class/object?view=recursive&depth=4
state
The state query parameter retrieves the runtime state of a configuration object. The value of the state parameter can be any of true | false, 1 | 0, yes | no. The runtime state of an object is indicated by five labels:
  • opstate indicates whether the object is operational. If an object is not operational, the opstate is down; otherwise, the opstate is up. For example, the opstate is down, when the object is incorrectly configured.
  • adminstate indicates whether an object can be used. If an object can be used, the adminstate is enabled; otherwise, the adminstate is disabled.
  • eventcode corresponds to the message ID associated with the current state of the object. When no error occurs, the eventcode is 0.
  • errorcode contains the message text that is associated with the event code. When no error occurs, the errorcode is "".
  • configstate indicates the saved state of the configuration. It can have one of the following values:
    • saved configuration is saved.
    • modified the configuration has been modified but not saved.
    • new the configuration is new but has not been saved.
Example:
/mgmt/config/default/class/object?state=true
The state of an object is retrieved with a GET request. The response contains both the runtime state and the configuration.
"state": {
  "opstate": "down",
  "adminstate": "disabled",
  "eventcode": "0x0034000d",
  "errorcode": "Object is disabled",
  "configstate": "saved"
}