Pulsar Configuration API
Pulsar Configuration
Pulsar Settings configured in your organization can be retrieved using the getSetting and getSettingAttachment calls.
getSetting
The getSetting operation takes a Pulsar Setting key identifier as a data dictionary parameter and returns a dictionary with the following two key/value entries:
The 'Exists' key returns 'TRUE' or 'FALSE' depending if the setting is found.The Pulsar Setting key itself returns the setting contents if it exists.
Example
var request = {
"type" : "getSetting",
"data" : {
// Required: key for the Pulsar Setting
"key" : <key of Pulsar Setting>
}
};
pulsarBridge.send(request, function (result) {
if (result.type === 'getSettingResponse') {
var response = result.data; // this will be a dictionary containing two entries
alert('Exists: ' + response['Exists']);
var key = request.data['key'];
alert('Key: ' + key);
alert('Value: ' + response[key]);
}
else {
console.log('getSetting failed');
}
});
getSettingAttachment
The getSettingAttachment operation takes a Pulsar Setting key identifier as a data dictionary parameter and returns a dictionary with the following three key/value entries:
The 'FileName' key returns the pathless name of the file.The 'FilePath' key returns the full path of the file.The Pulsar Setting key itself returns the setting contents.
A successful response will only be returned if the following criteria are met:
- The setting exists
- The attachment exists on the setting as either an Attachment or a File
If any of these criteria are not met, an error response is returned instead.
Example
var request = {
"type" : "getSettingAttachment",
"data" : {
// Required: key for the Pulsar Setting
"key" : <key of Pulsar Setting>
}
};
pulsarBridge.send(request, function (result) {
if (result.type === 'getSettingAttachmentResponse') {
var response = result.data; // this will be a dictionary containing two entries
alert('FileName: ' + response['FileName']);
alert('FilePath: ' + response['FilePath']);
var key = request.data['key'];
alert('Key: ' + key);
alert('Value: ' + response[key]);
}
else {
console.log('getSettingAttachment failed');
}
});
, multiple selections available,