Config

This section describes the following Config API Procedures:

GET/config/version

GET/config/allServerAttributes

GET/config/serverAttributes/{path}

PUT/config/serverAttributes

GET/config/version

This API is used to get the server version.

Parameters

None

Example

curl -X GET -u admin:admin "http://localhost:9400/rest/config/version/v1"

GET/config/allServerAttributes

This API is used to get all server attributes in TDV server optionally including definition(s). By default, attribute definitions are not included.

Parameters

Name

Deacription

Parameter Type

Data Type

includeDefinitions

Include attribute definitions

query

Boolean

Example to get all server attributes in TDV server

curl -X GET -u admin:admin "http://localhost:9400/rest/config/v1/allServerAttributes" -H "Content-Type:application/json"

Example to get all server attributes in TDV server with definitions

curl -X GET -u admin:admin "http://localhost:9400/rest/config/v1/allServerAttributes?includeDefinitions=true" -H "Content-Type:application/json"

GET/config/serverAttributes/{path}

This API is used to get server attributes for the given path optionally including children/definition(s). By default, attribute definitions are not included. Child attributes are not included in the response by default.

Parameters

Name

Deacription

Parameter Type

Data Type

path

Attribute to be fetched.

path

string

includeDefinitions

Include attribute definitions.

query

boolean

includeChildren Include all immediate child attributes.

query

boolean

Example to get server attribute excluding definitions for path with children "/server/communications"

curl -X GET -u admin:admin "http://localhost:9400/rest/config/v1/serverAttributes/{path}?path=%2Fserver%2Fcommunications&includeChildren=true" -H "Content-Type:application/json"
curl -X GET -u admin:admin "http://localhost:9400/rest/config/v1/serverAttributes/%2Fserver%2Fcommunications?includeChildren=true" -H "Content-Type:application/json"

Example to get server attribute including definitions for path with children "/server/communications"

curl -X GET -u admin:admin "http://localhost:9400/rest/config/v1/serverAttributes/%2Fserver%2Fcommunications?includeDefinitions=true&includeChildren=true" -H "Content-Type:application/json"

Example to get server attribute including definitions for path "/server/communications"

curl -X GET -u admin:admin "http://localhost:9400/rest/config/v1/serverAttributes/%2Fserver%2Fcommunications?includeDefinitions=true" -H "Content-Type:application/json"

PUT/config/serverAttributes

This API is used to set value(s) for server attributes.

Parameters

None

Request Body

Example value - Schema

{

"attributeBeans": [

{

"name": "string",

"type": "string",

"value": {}

}

]

}

Example to set value for /server/config/debug/metadata/silentImpactAnalysis

curl -X PUT -u admin:admin "http://localhost:9400/rest/config/v1/serverAttributes"  -H "Content-Type: application/json"  -d "{\"attributeBeans\":[{\"name\":\"/server/config/debug/metadata/silentImpactAnalysis\",\"type\":\"BOOLEAN\",
\"value\":true}]}"

Example to set value 2 for /sources/common/traceLevel

curl -X PUT -u admin:admin "http://localhost:9400/rest/config/v1/serverAttributes"  -H "Content-Type: application/json"  -d "{\"attributeBeans\":[{\"name\":\"/sources/common/traceLevel\",\"type\":\"INTEGER\",\"value\":2}]}"

Example to set MAP value for /server/config/security/filesystem/RootNameMapping where values in key value pairs are of different types

curl -X PUT -u admin:admin "http://localhost:9400/rest/config/v1/serverAttributes"  -H "Content-Type: application/json"  -d "{\"attributeBeans\":[{\"name\":\"/server/config/security/filesystem/RootNameMapping\",\"type\":\"MAP\",
\"value\":{\"prop1\":{\"type\":\"INTEGER\", \"value\":1}, \"prop2\":{\"type\":\"STRING\", \"value\":\"Doll\"}}}]}"

Example to remove all key value pairs of MAP config /server/config/security/filesystem/RootNameMapping

curl -X PUT -u admin:admin "http://localhost:9400/rest/config/v1/serverAttributes"  -H "Content-Type: application/json"  -d "{\"attributeBeans\":[{\"name\":\"/server/config/security/filesystem/RootNameMapping\",\"type\":\"MAP\",
\"value\":null}]}"