Settings

Get Settings

Get all of the settings from pb.settings (or equivalent). Each setting has one of 4 distinct types:

  • String
  • Boolean
  • List of Strings
  • altsubmitmasters: Has a special list of Endpoint Privilege Management for Unix and Linux objects.
GET https://pbuild:24351/REST/settings?appid=<appid>&timestamp=<timestamp>&hmac=<hmac
RESPONSE {"status":0,"settings":[{"values":["8da3e912","83099374","52adfcae","27825f05"],
"description":"Validation","name":"validation","type":3},
{"description":"Licensing Data to Save","name":"licensedata","value":"datenodename","type":2}, ...

Get Setting

Gets an individual setting as specified on the URL.

GET https://pbuild:24351/REST/setting/submitmasters?appid=<appid>&timestamp=
<timestamp>&hmac=<hmac>
RESPONSE {"setting":[{"values":["pbuild","pbuild2","pbuild3"],"description":"Submit
Policy Servers","name":"submitmasters","type":3}],"status":0}

Put Setting

Put (modify) a setting into the pb.settings file. The type needs to correspond to the original setting type.

PUT https://pbuild:24351/REST/setting/warnuseronerror?appid=<appid>&timestamp
=<timestamp>&hmac=<hmac>
REQUEST {"setting":{"name":"warnuseronerror","value":"no","type":1}}
RESPONSE {"status":0}

Get Settings file as attachment

Retrieves the whole pb.settings file as a binary attachment.

GET https://pbuild:24351/REST/settingsfile?appid=<appid>&timestamp=
<timestamp>&hmac=<hmac>&file=%2Fetc%2Fpb.settings <binary attachment>

Post Setting

Verifies settings are sent.

POST https://localhost:24351/REST/settings/verify -d '{ "settings": [ { "disabled": false, "name": "lockfiletimeout", "value": "xyz" }, { "disabled": false, "name": "pbresttimeskew", "value": "60abc" } ] }'

If settings data is sent to verify:

{
  "settings": [
    {
      "disabled": false,
      "type": "string",
      "gtype": 4,
      "deprecated": false,
      "name": "guiport",
      "description": "PBGUI Daemon Port",
      "default": "24348",
      "value": "12345xx"
    },
    {
      "disabled": false,
      "type": "string",
      "gtype": 4,
      "deprecated": false,
      "name": "masterport",
      "description": "Policy Server Daemon Port",
      "default": "24345",
      "value": "12346xx"
    }
  ]
}

Notice the invalid values for both (appended "xx" to the port numbers.The result:

{
   "status": 3967,
   "error": "3967  Daemon port guiport (24345xx) must have a numeric value between 1024 and 65535 or an absolute path",
   "settings": [
      {
         "name": "masterport",
         "type": 2,
         "value": "24345xx",
         "error": {
            "value": "24345xx",
            "min": 1024,
            "max": 65535,
            "emsg": "3967  Daemon port masterport (24345xx) must have a numeric value between 1024 and 65535 or an absolute path"
         }
      },
      {
         "name": "guiport",
         "type": 2,
         "value": "24345xx",
         "error": {
            "value": "24345xx",
            "min": 1024,
            "max": 65535,
            "emsg": "3967  Daemon port guiport (24345xx) must have a numeric value between 1024 and 65535 or an absolute path"
         }
      }
   ]
}