EMI.CONF.GET

September 17th, 2009 Leave a comment Go to comments

This method is used to retrieve the EMI.CONF key and value from the specified configuration data state tree.

Request Parameters

Name Type Mandatory Description
session JSON String yes Session ID
key JSON String or JSON Array of Strings yes Specify EMI.CONF key to be retrieved
rec JSON Boolean no Specify if the keys are traversed recursively. If set to “TRUE”, response shall contain also all sub keys of the specified key. Default: “FALSE”.
state JSON String no Specify the configuration data state tree [current|new] to be used with this request. Default: “current”

NOTE! The parameter “key” can have values of JSON String or JSON Array of Strings. For example, value “a.b.c.d” and [ "a", "b.c", "d" ] will result in the identification of the same key.

Response

Name Type Description
data JSON Array Result array

Result Array Structure:

"data":
[
     { "key": _JSON String_, "value": _JSON String_ },
     ...
]

Error Codes

Reference Description
EOK No errors (contains warnings)
EBADPARAM Error in parameters
ENOTFOUND The specified EMI.CONF key not found
EGENERAL Some other error
ESESSION Session with the given ID is not found

Examples

Request to EMI-RPC Server:

{
     "EMI-RPC":"1.0",
     "id": 2,
     "method":"emi.conf.get",
     "params":
     {
          "session":"",
          "key":"aa.bb.cc",
          "rec":FALSE,
          "state":"new"
     }
}

Response from EMI-RPC Server:

{
     "EMI-RPC":"1.0",
     "id": 2,
     "result":
     {
          "data": [ {"key":"aa.bb.cc", "value":"some value"} ]
     }
}
  1. No comments yet.
  1. No trackbacks yet.