Get one or more configuration element instances

get

/rest/{version}/configuration/configElements

Retrieves one or more instances of the specified configuration element type. If a single instance is requested:
  • For configuration element types that are singletons, which have no key attributes, the only query parameter included in the URI is elementType.
  • For element types that can have multiple instances, the query string must include &name=value for each key attribute, where name is a key attribute name and value is the associated value. The order of the key attributes in the query string does not matter. The key attributes for an element type are identified in the metadata (/configuration/elementTypes/metadata).
If multiple instances are requested, omit all key attribute query parameters to get all configured instances of the specified element type, or supply the offset and maxElements query parameters to limit the response data to the desired subset, for those element types that support paging.

By default, the SBC returns data from the edited configuration. If the client wishes to retrieve data from the current running configuration, include the optional &running=true in the request query parameters.

Request

Path Parameters
Query Parameters
  • Indicates the configuration element type being retrieved.
  • The maximum number of configuration element instances that is returned in a paged response. If there are not maxInstances element instances in the requested result set, then the response contains fewer instances than maxInstances.
  • Specifies the name and value for one key attribute of the elementType. For elementTypes having multiple key attributes, each one must be represented by "&name=value" in the query string. This query parameter is omitted entirely for singleton element types, which by definition have no key attributes, and when requesting more than one instance.
  • When requesting multiple instances of a configuration element type that supports paging and a subset of all configured element instances is desired, offset must be supplied and specifies, using a 1-based index, the first instance that is returned in the response.
  • When included with a value of true, the instance data returned in the response is from the running configuration. When omitted the instance data returned is from the edited configuration.
    Allowed Values: [ "true" ]
Header Parameters
  • The value in the Authorization header must be the string "Bearer <access token>", where <access token> is a valid, unexpired token received in response to a prior /auth/token request.

There's no request body for this operation.

Back to Top

Response

Supported Media Types

200 Response

The instance data for the requested configuration element(s) is returned in the data section of the response. If the client is requesting all instances of a specific type (paged or not) and the system configuration includes no instances, 200 OK is returned, and the <data> section of the response body is empty.
Body ()
Root Schema : schema

400 Response

The request is malformed or missing required information.
Body ()
Root Schema : response
Type: object
Show Source
Nested Schema : data
Type: object
Nested Schema : messages
Type: object
Show Source

401 Response

The client is not authorized.
Body ()
Root Schema : response
Type: object
Show Source
Nested Schema : data
Type: object
Nested Schema : messages
Type: object
Show Source

404 Response

Unsupported versionId in URI, or requested element type not supported, or element instance specified by key attribute(s) not found
Body ()
Root Schema : response
Type: object
Show Source
Nested Schema : data
Type: object
Nested Schema : messages
Type: object
Show Source
Back to Top

Examples

The following example shows how to get one or more configuration element instances by submitting a GET request on the REST resource using cURL. For more information about cURL, see Use cURL

curl -X GET \
    --header 'Accept: application/xml' \
    --header 'Authorization: Bearer <token>' \
    'https://10.0.0.2/rest/v1.0/configuration/configElements?elementType=ntp-config'

Example of the Response Headers

The following shows an example of the response headers.

HTTP/1.1 200 OK
Date: Wed, 08 Aug 2018 12:02:49 GMT
Cache-Control: no-cache
Content-Length: 490
Content-Type: application/xml
Connection: keep-alive
Keep-Alive: timeout=60, max=99
Last-Modified: Wed, 08 Aug 2018 12:02:49 GMT
X-Appweb-Seq: 124

Example of the Response Body

The following example shows the contents of the response body in XML format.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
  <data>
    <configElement>
      <elementType>ntp-config</elementType>
      <attribute>
        <name>server</name>
        <value>10.0.0.15</value>
      </attribute>
      <attribute>
        <name>last-modified-by</name>
        <value>admin@10.0.0.4</value>
      </attribute>
      <attribute>
        <name>last-modified-date</name>
        <value>2018-08-08 12:02:10</value>
      </attribute>
    </configElement>
  </data>
  <messages/>
  <links/>
</response>
Back to Top