Get

Purpose:

Get command can be used to read configuration specific to an application.  It also allows narrowing of search within a server, region or environment

Syntax:

Get /app:id|name [/server:id|name|*] [/env:id|name|*] [/region:id|name|*] [/unprotect:publicKey]

Example,

for user konfdbuser created using NewUser command and applications configured (using NewApp) and parameters added (using NewParam and NewMap), the command executed below

get /app:1

will give an output

[
  {
    "ParameterName": "Website",
    "ParameterValue": "http://www.konfdb.com/",
    "MatchProfile": "ParamId:3|App:1|Server:1|Env:1|Region:1|Suite:1",
    "IsEncrypted": false
  }
]

You can restrict the criteria by adding more filters such as environment, region and server.

For encrypted values mapped to the application, you can pass public key to give back the decrypted values.  As an example,

Get /app:1 /unprotect:BgIAAACkAABSU0ExAAQAAAEAAQCJ7Arz4xtuqY5ra9wSu04apX2iPKwZgd1CHWdDcEN7yl0Y3bhGkwrlkgCNa42pGzJwtdRfOt9Sa78noqIxUkDBIl2s/pM7opYzKJ9ESfFFfTELBAKe9sFShlQsb+0ek6kntMsmeDH1Odh9N5g7KXNc9JDG7UEas6wRrsZBzNshlw==

will give an output

 

[
  {
    "ParameterName": "Website",
    "ParameterValue": "http://www.konfdb.com/",
    "MatchProfile": "ParamId:3|App:1|Server:1|Env:1|Region:1|Suite:1",
    "IsEncrypted": false
  },
  {
    "ParameterName": "TwitterPassword",
    "ParameterValue": "SomeStrongPassword!Hey",
    "MatchProfile": "ParamId:2|App:1|Server:1|Env:1|Region:1|Suite:1",
    "IsEncrypted": true
  }
]