@itentialopensource/adapter-zscaler 0.6.3 → 0.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/README.md +84 -11
- package/adapter.js +661 -123
- package/adapterBase.js +23 -1
- package/entities/.generic/action.json +5 -5
- package/entities/.system/action.json +5 -5
- package/entities/.system/schemaTokenReq.json +3 -4
- package/entities/.system/schemaTokenResp.json +2 -13
- package/error.json +6 -0
- package/package.json +18 -13
- package/pronghorn.json +312 -120
- package/propertiesSchema.json +20 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/updateReport1642619799800.json +95 -0
- package/sampleProperties.json +5 -1
- package/test/integration/adapterTestBasicGet.js +1 -1
- package/test/integration/adapterTestIntegration.js +10 -2
- package/test/unit/adapterBaseTestUnit.js +6 -3
- package/test/unit/adapterTestUnit.js +489 -4
- package/utils/addAuth.js +94 -0
- package/utils/basicGet.js +1 -14
- package/utils/entitiesToDB.js +224 -0
- package/utils/modify.js +1 -1
- package/utils/packModificationScript.js +1 -1
- package/utils/patches2bundledDeps.js +90 -0
- package/utils/removeHooks.js +20 -0
- package/utils/tbScript.js +14 -8
- package/utils/tbUtils.js +98 -19
- package/utils/troubleshootingAdapter.js +2 -26
package/adapter.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
/* eslint import/no-dynamic-require: warn */
|
|
4
4
|
/* eslint object-curly-newline: warn */
|
|
5
5
|
/* eslint no-underscore-dangle: warn */
|
|
6
|
+
/* eslint no-bitwise: warn */
|
|
6
7
|
|
|
7
8
|
// Set globals
|
|
8
9
|
/* global log */
|
|
@@ -84,7 +85,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
84
85
|
* @getWorkflowFunctions
|
|
85
86
|
*/
|
|
86
87
|
getWorkflowFunctions(inIgnore) {
|
|
87
|
-
let myIgnore = [];
|
|
88
|
+
let myIgnore = ['hasEntities', 'hasDevices', 'getObfuscatedKey'];
|
|
88
89
|
if (!inIgnore && Array.isArray(inIgnore)) {
|
|
89
90
|
myIgnore = inIgnore;
|
|
90
91
|
} else if (!inIgnore && typeof inIgnore === 'string') {
|
|
@@ -248,6 +249,24 @@ class Zscaler extends AdapterBaseCl {
|
|
|
248
249
|
}
|
|
249
250
|
}
|
|
250
251
|
|
|
252
|
+
/**
|
|
253
|
+
* @summary moves entites into Mongo DB
|
|
254
|
+
*
|
|
255
|
+
* @function moveEntitiesToDB
|
|
256
|
+
* @param {getCallback} callback - a callback function to return the result (Generics)
|
|
257
|
+
* or the error
|
|
258
|
+
*/
|
|
259
|
+
moveEntitiesToDB(callback) {
|
|
260
|
+
const origin = `${this.id}-adapter-moveEntitiesToDB`;
|
|
261
|
+
log.trace(origin);
|
|
262
|
+
try {
|
|
263
|
+
return super.moveEntitiesToDB(callback);
|
|
264
|
+
} catch (err) {
|
|
265
|
+
log.error(`${origin}: ${err}`);
|
|
266
|
+
return callback(null, err);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
251
270
|
/**
|
|
252
271
|
* @summary Determines if this adapter supports the specific entity
|
|
253
272
|
*
|
|
@@ -527,6 +546,456 @@ class Zscaler extends AdapterBaseCl {
|
|
|
527
546
|
}
|
|
528
547
|
}
|
|
529
548
|
|
|
549
|
+
/* BROKER CALLS */
|
|
550
|
+
/**
|
|
551
|
+
* @summary Determines if this adapter supports any in a list of entities
|
|
552
|
+
*
|
|
553
|
+
* @function hasEntities
|
|
554
|
+
* @param {String} entityType - the entity type to check for
|
|
555
|
+
* @param {Array} entityList - the list of entities we are looking for
|
|
556
|
+
*
|
|
557
|
+
* @param {Callback} callback - A map where the entity is the key and the
|
|
558
|
+
* value is true or false
|
|
559
|
+
*/
|
|
560
|
+
hasEntities(entityType, entityList, callback) {
|
|
561
|
+
const origin = `${this.id}-adapter-hasEntities`;
|
|
562
|
+
log.trace(origin);
|
|
563
|
+
|
|
564
|
+
switch (entityType) {
|
|
565
|
+
case 'Device':
|
|
566
|
+
return this.hasDevices(entityList, callback);
|
|
567
|
+
default:
|
|
568
|
+
return callback(null, `${this.id} does not support entity ${entityType}`);
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* @summary Helper method for hasEntities for the specific device case
|
|
574
|
+
*
|
|
575
|
+
* @param {Array} deviceList - array of unique device identifiers
|
|
576
|
+
* @param {Callback} callback - A map where the device is the key and the
|
|
577
|
+
* value is true or false
|
|
578
|
+
*/
|
|
579
|
+
hasDevices(deviceList, callback) {
|
|
580
|
+
const origin = `${this.id}-adapter-hasDevices`;
|
|
581
|
+
log.trace(origin);
|
|
582
|
+
|
|
583
|
+
const findings = deviceList.reduce((map, device) => {
|
|
584
|
+
// eslint-disable-next-line no-param-reassign
|
|
585
|
+
map[device] = false;
|
|
586
|
+
log.debug(`In reduce: ${JSON.stringify(map)}`);
|
|
587
|
+
return map;
|
|
588
|
+
}, {});
|
|
589
|
+
const apiCalls = deviceList.map((device) => new Promise((resolve) => {
|
|
590
|
+
this.getDevice(device, (result, error) => {
|
|
591
|
+
if (error) {
|
|
592
|
+
log.debug(`In map error: ${JSON.stringify(device)}`);
|
|
593
|
+
return resolve({ name: device, found: false });
|
|
594
|
+
}
|
|
595
|
+
log.debug(`In map: ${JSON.stringify(device)}`);
|
|
596
|
+
return resolve({ name: device, found: true });
|
|
597
|
+
});
|
|
598
|
+
}));
|
|
599
|
+
Promise.all(apiCalls).then((results) => {
|
|
600
|
+
results.forEach((device) => {
|
|
601
|
+
findings[device.name] = device.found;
|
|
602
|
+
});
|
|
603
|
+
log.debug(`FINDINGS: ${JSON.stringify(findings)}`);
|
|
604
|
+
return callback(findings);
|
|
605
|
+
}).catch((errors) => {
|
|
606
|
+
log.error('Unable to do device lookup.');
|
|
607
|
+
return callback(null, { code: 503, message: 'Unable to do device lookup.', error: errors });
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* @summary Get Appliance that match the deviceName
|
|
613
|
+
*
|
|
614
|
+
* @function getDevice
|
|
615
|
+
* @param {String} deviceName - the deviceName to find (required)
|
|
616
|
+
*
|
|
617
|
+
* @param {getCallback} callback - a callback function to return the result
|
|
618
|
+
* (appliance) or the error
|
|
619
|
+
*/
|
|
620
|
+
getDevice(deviceName, callback) {
|
|
621
|
+
const meth = 'adapter-getDevice';
|
|
622
|
+
const origin = `${this.id}-${meth}`;
|
|
623
|
+
log.trace(origin);
|
|
624
|
+
|
|
625
|
+
if (this.suspended && this.suspendMode === 'error') {
|
|
626
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
|
|
627
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
628
|
+
return callback(null, errorObj);
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
/* HERE IS WHERE YOU VALIDATE DATA */
|
|
632
|
+
if (deviceName === undefined || deviceName === null || deviceName === '' || deviceName.length === 0) {
|
|
633
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['deviceName'], null, null, null);
|
|
634
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
635
|
+
return callback(null, errorObj);
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
try {
|
|
639
|
+
// need to get the device so we can convert the deviceName to an id
|
|
640
|
+
// !! if we can do a lookup by name the getDevicesFiltered may not be necessary
|
|
641
|
+
const opts = {
|
|
642
|
+
filter: {
|
|
643
|
+
name: deviceName
|
|
644
|
+
}
|
|
645
|
+
};
|
|
646
|
+
return this.getDevicesFiltered(opts, (devs, ferr) => {
|
|
647
|
+
// if we received an error or their is no response on the results return an error
|
|
648
|
+
if (ferr) {
|
|
649
|
+
return callback(null, ferr);
|
|
650
|
+
}
|
|
651
|
+
if (devs.list.length < 1) {
|
|
652
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, `Did Not Find Device ${deviceName}`, [], null, null, null);
|
|
653
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
654
|
+
return callback(null, errorObj);
|
|
655
|
+
}
|
|
656
|
+
// get the uuid from the device
|
|
657
|
+
const { uuid } = devs.list[0];
|
|
658
|
+
|
|
659
|
+
// !! using Generic makes it easier on the Adapter Builder (just need to change the path)
|
|
660
|
+
// !! you can also replace with a specific call if that is easier
|
|
661
|
+
const uriPath = `/call/toget/device/${uuid}`;
|
|
662
|
+
return this.genericAdapterRequest(uriPath, 'GET', {}, {}, {}, (result, error) => {
|
|
663
|
+
// if we received an error or their is no response on the results return an error
|
|
664
|
+
if (error) {
|
|
665
|
+
return callback(null, error);
|
|
666
|
+
}
|
|
667
|
+
if (!result.response || !result.response.applianceMo) {
|
|
668
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getDevice'], null, null, null);
|
|
669
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
670
|
+
return callback(null, errorObj);
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
// return the response
|
|
674
|
+
// !! format the data we send back
|
|
675
|
+
// !! these fields are config manager fields you need to map to the data we receive
|
|
676
|
+
const thisDevice = result.response;
|
|
677
|
+
thisDevice.name = thisDevice.systemName;
|
|
678
|
+
thisDevice.ostype = `System-${thisDevice.systemType}`;
|
|
679
|
+
thisDevice.port = thisDevice.systemPort;
|
|
680
|
+
thisDevice.ipaddress = thisDevice.systemIP;
|
|
681
|
+
return callback(thisDevice);
|
|
682
|
+
});
|
|
683
|
+
});
|
|
684
|
+
} catch (ex) {
|
|
685
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
|
|
686
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
687
|
+
return callback(null, errorObj);
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
/**
|
|
692
|
+
* @summary Get Appliances that match the filter
|
|
693
|
+
*
|
|
694
|
+
* @function getDevicesFiltered
|
|
695
|
+
* @param {Object} options - the data to use to filter the appliances (optional)
|
|
696
|
+
*
|
|
697
|
+
* @param {getCallback} callback - a callback function to return the result
|
|
698
|
+
* (appliances) or the error
|
|
699
|
+
*/
|
|
700
|
+
getDevicesFiltered(options, callback) {
|
|
701
|
+
const meth = 'adapter-getDevicesFiltered';
|
|
702
|
+
const origin = `${this.id}-${meth}`;
|
|
703
|
+
log.trace(origin);
|
|
704
|
+
|
|
705
|
+
// verify the required fields have been provided
|
|
706
|
+
if (options === undefined || options === null || options === '' || options.length === 0) {
|
|
707
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['options'], null, null, null);
|
|
708
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
709
|
+
return callback(null, errorObj);
|
|
710
|
+
}
|
|
711
|
+
log.debug(`Device Filter Options: ${JSON.stringify(options)}`);
|
|
712
|
+
|
|
713
|
+
// TODO - get pagination working
|
|
714
|
+
// const nextToken = options.start;
|
|
715
|
+
// const maxResults = options.limit;
|
|
716
|
+
|
|
717
|
+
// set up the filter of Device Names
|
|
718
|
+
let filterName = [];
|
|
719
|
+
if (options && options.filter && options.filter.name) {
|
|
720
|
+
// when this hack is removed, remove the lint ignore above
|
|
721
|
+
if (Array.isArray(options.filter.name)) {
|
|
722
|
+
// eslint-disable-next-line prefer-destructuring
|
|
723
|
+
filterName = options.filter.name;
|
|
724
|
+
} else {
|
|
725
|
+
filterName = [options.filter.name];
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
// TODO - get sort and order working
|
|
730
|
+
/*
|
|
731
|
+
if (options && options.sort) {
|
|
732
|
+
reqObj.uriOptions.sort = JSON.stringify(options.sort);
|
|
733
|
+
}
|
|
734
|
+
if (options && options.order) {
|
|
735
|
+
reqObj.uriOptions.order = options.order;
|
|
736
|
+
}
|
|
737
|
+
*/
|
|
738
|
+
try {
|
|
739
|
+
// !! using Generic makes it easier on the Adapter Builder (just need to change the path)
|
|
740
|
+
// !! you can also replace with a specific call if that is easier
|
|
741
|
+
const uriPath = '/call/toget/devices';
|
|
742
|
+
return this.genericAdapterRequest(uriPath, 'GET', {}, {}, {}, (result, error) => {
|
|
743
|
+
// if we received an error or their is no response on the results return an error
|
|
744
|
+
if (error) {
|
|
745
|
+
return callback(null, error);
|
|
746
|
+
}
|
|
747
|
+
if (!result.response) {
|
|
748
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getDevicesFiltered'], null, null, null);
|
|
749
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
750
|
+
return callback(null, errorObj);
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
// !! go through the response - may have to look for sub object
|
|
754
|
+
// handle an array of devices
|
|
755
|
+
if (Array.isArray(result.response)) {
|
|
756
|
+
const myDevices = [];
|
|
757
|
+
|
|
758
|
+
for (let d = 0; d < result.response.length; d += 1) {
|
|
759
|
+
// !! format the data we send back
|
|
760
|
+
// !! these fields are config manager fields you need to map to the data we receive
|
|
761
|
+
const thisDevice = result.response;
|
|
762
|
+
thisDevice.name = thisDevice.systemName;
|
|
763
|
+
thisDevice.ostype = `System-${thisDevice.systemType}`;
|
|
764
|
+
thisDevice.port = thisDevice.systemPort;
|
|
765
|
+
thisDevice.ipaddress = thisDevice.systemIP;
|
|
766
|
+
|
|
767
|
+
// if there is no filter - return the device
|
|
768
|
+
if (filterName.length === 0) {
|
|
769
|
+
myDevices.push(thisDevice);
|
|
770
|
+
} else {
|
|
771
|
+
// if we have to match a filter
|
|
772
|
+
let found = false;
|
|
773
|
+
for (let f = 0; f < filterName.length; f += 1) {
|
|
774
|
+
if (thisDevice.name.indexOf(filterName[f]) >= 0) {
|
|
775
|
+
found = true;
|
|
776
|
+
break;
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
// matching device
|
|
780
|
+
if (found) {
|
|
781
|
+
myDevices.push(thisDevice);
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
log.debug(`${origin}: Found #${myDevices.length} devices.`);
|
|
786
|
+
log.debug(`Devices: ${JSON.stringify(myDevices)}`);
|
|
787
|
+
return callback({ total: myDevices.length, list: myDevices });
|
|
788
|
+
}
|
|
789
|
+
// handle a single device response
|
|
790
|
+
// !! format the data we send back
|
|
791
|
+
// !! these fields are config manager fields you need to map to the data we receive
|
|
792
|
+
const thisDevice = result.response;
|
|
793
|
+
thisDevice.name = thisDevice.systemName;
|
|
794
|
+
thisDevice.ostype = `System-${thisDevice.systemType}`;
|
|
795
|
+
thisDevice.port = thisDevice.systemPort;
|
|
796
|
+
thisDevice.ipaddress = thisDevice.systemIP;
|
|
797
|
+
|
|
798
|
+
// if there is no filter - return the device
|
|
799
|
+
if (filterName.length === 0) {
|
|
800
|
+
log.debug(`${origin}: Found #1 device.`);
|
|
801
|
+
log.debug(`Device: ${JSON.stringify(thisDevice)}`);
|
|
802
|
+
return callback({ total: 1, list: [thisDevice] });
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
// if there is a filter need to check for matching device
|
|
806
|
+
let found = false;
|
|
807
|
+
for (let f = 0; f < filterName.length; f += 1) {
|
|
808
|
+
if (thisDevice.name.indexOf(filterName[f]) >= 0) {
|
|
809
|
+
found = true;
|
|
810
|
+
break;
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
// matching device
|
|
814
|
+
if (found) {
|
|
815
|
+
log.debug(`${origin}: Found #1 device.`);
|
|
816
|
+
log.debug(`Device Found: ${JSON.stringify(thisDevice)}`);
|
|
817
|
+
return callback({ total: 1, list: [thisDevice] });
|
|
818
|
+
}
|
|
819
|
+
// not a matching device
|
|
820
|
+
log.debug(`${origin}: No matching device found.`);
|
|
821
|
+
return callback({ total: 0, list: [] });
|
|
822
|
+
});
|
|
823
|
+
} catch (ex) {
|
|
824
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
|
|
825
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
826
|
+
return callback(null, errorObj);
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* @summary Gets the status for the provided appliance
|
|
832
|
+
*
|
|
833
|
+
* @function isAlive
|
|
834
|
+
* @param {String} deviceName - the deviceName of the appliance. (required)
|
|
835
|
+
*
|
|
836
|
+
* @param {configCallback} callback - callback function to return the result
|
|
837
|
+
* (appliance isAlive) or the error
|
|
838
|
+
*/
|
|
839
|
+
isAlive(deviceName, callback) {
|
|
840
|
+
const meth = 'adapter-isAlive';
|
|
841
|
+
const origin = `${this.id}-${meth}`;
|
|
842
|
+
log.trace(origin);
|
|
843
|
+
|
|
844
|
+
// verify the required fields have been provided
|
|
845
|
+
if (deviceName === undefined || deviceName === null || deviceName === '' || deviceName.length === 0) {
|
|
846
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['deviceName'], null, null, null);
|
|
847
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
848
|
+
return callback(null, errorObj);
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
try {
|
|
852
|
+
// need to get the device so we can convert the deviceName to an id
|
|
853
|
+
// !! if we can do a lookup by name the getDevicesFiltered may not be necessary
|
|
854
|
+
const opts = {
|
|
855
|
+
filter: {
|
|
856
|
+
name: deviceName
|
|
857
|
+
}
|
|
858
|
+
};
|
|
859
|
+
return this.getDevicesFiltered(opts, (devs, ferr) => {
|
|
860
|
+
// if we received an error or their is no response on the results return an error
|
|
861
|
+
if (ferr) {
|
|
862
|
+
return callback(null, ferr);
|
|
863
|
+
}
|
|
864
|
+
if (devs.list.length < 1) {
|
|
865
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, `Did Not Find Device ${deviceName}`, [], null, null, null);
|
|
866
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
867
|
+
return callback(null, errorObj);
|
|
868
|
+
}
|
|
869
|
+
// get the uuid from the device
|
|
870
|
+
const { uuid } = devs.list[0];
|
|
871
|
+
|
|
872
|
+
// !! using Generic makes it easier on the Adapter Builder (just need to change the path)
|
|
873
|
+
// !! you can also replace with a specific call if that is easier
|
|
874
|
+
const uriPath = `/call/toget/status/${uuid}`;
|
|
875
|
+
return this.genericAdapterRequest(uriPath, 'GET', {}, {}, {}, (result, error) => {
|
|
876
|
+
// if we received an error or their is no response on the results return an error
|
|
877
|
+
if (error) {
|
|
878
|
+
return callback(null, error);
|
|
879
|
+
}
|
|
880
|
+
// !! should update this to make sure we are checking for the appropriate object/field
|
|
881
|
+
if (!result.response || !result.response.returnObj || !Object.hasOwnProperty.call(result.response.returnObj, 'statusField')) {
|
|
882
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['isAlive'], null, null, null);
|
|
883
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
884
|
+
return callback(null, errorObj);
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
// !! return the response - Update to the appropriate object/field
|
|
888
|
+
return callback(!result.response.returnObj.statusField);
|
|
889
|
+
});
|
|
890
|
+
});
|
|
891
|
+
} catch (ex) {
|
|
892
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
|
|
893
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
894
|
+
return callback(null, errorObj);
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
/**
|
|
899
|
+
* @summary Gets a config for the provided Appliance
|
|
900
|
+
*
|
|
901
|
+
* @function getConfig
|
|
902
|
+
* @param {String} deviceName - the deviceName of the appliance. (required)
|
|
903
|
+
* @param {String} format - the desired format of the config. (optional)
|
|
904
|
+
*
|
|
905
|
+
* @param {configCallback} callback - callback function to return the result
|
|
906
|
+
* (appliance config) or the error
|
|
907
|
+
*/
|
|
908
|
+
getConfig(deviceName, format, callback) {
|
|
909
|
+
const meth = 'adapter-getConfig';
|
|
910
|
+
const origin = `${this.id}-${meth}`;
|
|
911
|
+
log.trace(origin);
|
|
912
|
+
|
|
913
|
+
// verify the required fields have been provided
|
|
914
|
+
if (deviceName === undefined || deviceName === null || deviceName === '' || deviceName.length === 0) {
|
|
915
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['deviceName'], null, null, null);
|
|
916
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
917
|
+
return callback(null, errorObj);
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
try {
|
|
921
|
+
// need to get the device so we can convert the deviceName to an id
|
|
922
|
+
// !! if we can do a lookup by name the getDevicesFiltered may not be necessary
|
|
923
|
+
const opts = {
|
|
924
|
+
filter: {
|
|
925
|
+
name: deviceName
|
|
926
|
+
}
|
|
927
|
+
};
|
|
928
|
+
return this.getDevicesFiltered(opts, (devs, ferr) => {
|
|
929
|
+
// if we received an error or their is no response on the results return an error
|
|
930
|
+
if (ferr) {
|
|
931
|
+
return callback(null, ferr);
|
|
932
|
+
}
|
|
933
|
+
if (devs.list.length < 1) {
|
|
934
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, `Did Not Find Device ${deviceName}`, [], null, null, null);
|
|
935
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
936
|
+
return callback(null, errorObj);
|
|
937
|
+
}
|
|
938
|
+
// get the uuid from the device
|
|
939
|
+
const { uuid } = devs.list[0];
|
|
940
|
+
|
|
941
|
+
// !! using Generic makes it easier on the Adapter Builder (just need to change the path)
|
|
942
|
+
// !! you can also replace with a specific call if that is easier
|
|
943
|
+
const uriPath = `/call/toget/config/${uuid}`;
|
|
944
|
+
return this.genericAdapterRequest(uriPath, 'GET', {}, {}, {}, (result, error) => {
|
|
945
|
+
// if we received an error or their is no response on the results return an error
|
|
946
|
+
if (error) {
|
|
947
|
+
return callback(null, error);
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
// return the result
|
|
951
|
+
const newResponse = {
|
|
952
|
+
response: JSON.stringify(result.response, null, 2)
|
|
953
|
+
};
|
|
954
|
+
return callback(newResponse);
|
|
955
|
+
});
|
|
956
|
+
});
|
|
957
|
+
} catch (ex) {
|
|
958
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
|
|
959
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
960
|
+
return callback(null, errorObj);
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
/**
|
|
965
|
+
* @summary Gets the device count from the system
|
|
966
|
+
*
|
|
967
|
+
* @function getCount
|
|
968
|
+
*
|
|
969
|
+
* @param {getCallback} callback - callback function to return the result
|
|
970
|
+
* (count) or the error
|
|
971
|
+
*/
|
|
972
|
+
getCount(callback) {
|
|
973
|
+
const meth = 'adapter-getCount';
|
|
974
|
+
const origin = `${this.id}-${meth}`;
|
|
975
|
+
log.trace(origin);
|
|
976
|
+
|
|
977
|
+
// verify the required fields have been provided
|
|
978
|
+
|
|
979
|
+
try {
|
|
980
|
+
// !! using Generic makes it easier on the Adapter Builder (just need to change the path)
|
|
981
|
+
// !! you can also replace with a specific call if that is easier
|
|
982
|
+
const uriPath = '/call/toget/count';
|
|
983
|
+
return this.genericAdapterRequest(uriPath, 'GET', {}, {}, {}, (result, error) => {
|
|
984
|
+
// if we received an error or their is no response on the results return an error
|
|
985
|
+
if (error) {
|
|
986
|
+
return callback(null, error);
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
// return the result
|
|
990
|
+
return callback({ count: result.response });
|
|
991
|
+
});
|
|
992
|
+
} catch (ex) {
|
|
993
|
+
const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
|
|
994
|
+
log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
|
|
995
|
+
return callback(null, errorObj);
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
|
|
530
999
|
/**
|
|
531
1000
|
* @callback healthCallback
|
|
532
1001
|
* @param {Object} result - the result of the get request (contains an id and a status)
|
|
@@ -552,6 +1021,38 @@ class Zscaler extends AdapterBaseCl {
|
|
|
552
1021
|
* @param {String} error - any error that occurred
|
|
553
1022
|
*/
|
|
554
1023
|
|
|
1024
|
+
/**
|
|
1025
|
+
* @summary Gets the obfuscated API Key to be used in the request
|
|
1026
|
+
*
|
|
1027
|
+
* @function getObfuscatedKey
|
|
1028
|
+
* @param {getCallback} callback - a callback function to return the result
|
|
1029
|
+
*/
|
|
1030
|
+
getObfuscatedKey() {
|
|
1031
|
+
const { allProps: { authentication: { apiKey } } } = this;
|
|
1032
|
+
const timestamp = Date.now().toString();
|
|
1033
|
+
if (!apiKey) {
|
|
1034
|
+
return { apiKey: 'missingKey', timestamp };
|
|
1035
|
+
}
|
|
1036
|
+
const high = timestamp.substring(timestamp.length - 6);
|
|
1037
|
+
|
|
1038
|
+
let low = (parseInt(high, 10) >> 1).toString();
|
|
1039
|
+
let obfuscatedApiKey = '';
|
|
1040
|
+
|
|
1041
|
+
while (low.length < 6) {
|
|
1042
|
+
low = `0${low}`;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
for (let i = 0; i < high.length; i += 1) {
|
|
1046
|
+
obfuscatedApiKey += apiKey.charAt(parseInt(high.charAt(i), 10));
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
for (let j = 0; j < low.length; j += 1) {
|
|
1050
|
+
obfuscatedApiKey += apiKey.charAt(parseInt(low.charAt(j), 10) + 2);
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
return { apiKey: obfuscatedApiKey, timestamp };
|
|
1054
|
+
}
|
|
1055
|
+
|
|
555
1056
|
/**
|
|
556
1057
|
* @summary Checks if there is an authenticated session
|
|
557
1058
|
*
|
|
@@ -574,7 +1075,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
574
1075
|
|
|
575
1076
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
576
1077
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
577
|
-
const reqObj =
|
|
1078
|
+
const reqObj = { authData: this.getObfuscatedKey() };
|
|
578
1079
|
|
|
579
1080
|
try {
|
|
580
1081
|
// Make the call -
|
|
@@ -607,7 +1108,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
607
1108
|
* @summary Creates an authenticated session
|
|
608
1109
|
*
|
|
609
1110
|
* @function postAuthenticatedSession
|
|
610
|
-
* @param {object} credentials -
|
|
1111
|
+
* @param {object} credentials - Creates an authenticated session. The response returns a cookie in the header called JSESSIONID that must be used in subsequent requests.
|
|
611
1112
|
* @param {getCallback} callback - a callback function to return the result
|
|
612
1113
|
*/
|
|
613
1114
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -647,7 +1148,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
647
1148
|
const reqObj = {
|
|
648
1149
|
payload: bodyVars,
|
|
649
1150
|
uriPathVars: pathVars,
|
|
650
|
-
uriQuery: queryParams
|
|
1151
|
+
uriQuery: queryParams,
|
|
1152
|
+
authData: this.getObfuscatedKey()
|
|
651
1153
|
};
|
|
652
1154
|
|
|
653
1155
|
try {
|
|
@@ -699,7 +1201,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
699
1201
|
|
|
700
1202
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
701
1203
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
702
|
-
const reqObj =
|
|
1204
|
+
const reqObj = { authData: this.getObfuscatedKey() };
|
|
703
1205
|
|
|
704
1206
|
try {
|
|
705
1207
|
// Make the call -
|
|
@@ -750,7 +1252,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
750
1252
|
|
|
751
1253
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
752
1254
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
753
|
-
const reqObj =
|
|
1255
|
+
const reqObj = { authData: this.getObfuscatedKey() };
|
|
754
1256
|
|
|
755
1257
|
try {
|
|
756
1258
|
// Make the call -
|
|
@@ -801,7 +1303,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
801
1303
|
|
|
802
1304
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
803
1305
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
804
|
-
const reqObj =
|
|
1306
|
+
const reqObj = { authData: this.getObfuscatedKey() };
|
|
805
1307
|
|
|
806
1308
|
try {
|
|
807
1309
|
// Make the call -
|
|
@@ -852,7 +1354,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
852
1354
|
|
|
853
1355
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
854
1356
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
855
|
-
const reqObj =
|
|
1357
|
+
const reqObj = { authData: this.getObfuscatedKey() };
|
|
856
1358
|
|
|
857
1359
|
try {
|
|
858
1360
|
// Make the call -
|
|
@@ -903,7 +1405,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
903
1405
|
|
|
904
1406
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
905
1407
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
906
|
-
const reqObj =
|
|
1408
|
+
const reqObj = { authData: this.getObfuscatedKey() };
|
|
907
1409
|
|
|
908
1410
|
try {
|
|
909
1411
|
// Make the call -
|
|
@@ -954,7 +1456,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
954
1456
|
|
|
955
1457
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
956
1458
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
957
|
-
const reqObj =
|
|
1459
|
+
const reqObj = { authData: this.getObfuscatedKey() };
|
|
958
1460
|
|
|
959
1461
|
try {
|
|
960
1462
|
// Make the call -
|
|
@@ -987,7 +1489,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
987
1489
|
* @summary Creates an audit log report for the specified time period and saves it as a CSV file
|
|
988
1490
|
*
|
|
989
1491
|
* @function postAuditlogEntryReport
|
|
990
|
-
* @param {object} request -
|
|
1492
|
+
* @param {object} request - Creates an audit log report for the specified time period and saves it as a CSV file. The report includes audit information for every call made to the cloud service API during the specified time period. Creating a new audit log report will overwrite a previously-generated report.
|
|
991
1493
|
* @param {getCallback} callback - a callback function to return the result
|
|
992
1494
|
*/
|
|
993
1495
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -1022,7 +1524,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1022
1524
|
const reqObj = {
|
|
1023
1525
|
payload: bodyVars,
|
|
1024
1526
|
uriPathVars: pathVars,
|
|
1025
|
-
uriQuery: queryParams
|
|
1527
|
+
uriQuery: queryParams,
|
|
1528
|
+
authData: this.getObfuscatedKey()
|
|
1026
1529
|
};
|
|
1027
1530
|
|
|
1028
1531
|
try {
|
|
@@ -1074,7 +1577,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1074
1577
|
|
|
1075
1578
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
1076
1579
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
1077
|
-
const reqObj =
|
|
1580
|
+
const reqObj = { authData: this.getObfuscatedKey() };
|
|
1078
1581
|
|
|
1079
1582
|
try {
|
|
1080
1583
|
// Make the call -
|
|
@@ -1125,7 +1628,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1125
1628
|
|
|
1126
1629
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
1127
1630
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
1128
|
-
const reqObj =
|
|
1631
|
+
const reqObj = { authData: this.getObfuscatedKey() };
|
|
1129
1632
|
|
|
1130
1633
|
try {
|
|
1131
1634
|
// Make the call -
|
|
@@ -1176,7 +1679,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1176
1679
|
|
|
1177
1680
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
1178
1681
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
1179
|
-
const reqObj =
|
|
1682
|
+
const reqObj = { authData: this.getObfuscatedKey() };
|
|
1180
1683
|
|
|
1181
1684
|
try {
|
|
1182
1685
|
// Make the call -
|
|
@@ -1209,7 +1712,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1209
1712
|
* @summary Gets the department for the specified ID
|
|
1210
1713
|
*
|
|
1211
1714
|
* @function getDepartmentsid
|
|
1212
|
-
* @param {number} id -
|
|
1715
|
+
* @param {number} id - Gets the department for the specified ID.
|
|
1213
1716
|
* @param {getCallback} callback - a callback function to return the result
|
|
1214
1717
|
*/
|
|
1215
1718
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -1249,7 +1752,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1249
1752
|
const reqObj = {
|
|
1250
1753
|
payload: bodyVars,
|
|
1251
1754
|
uriPathVars: pathVars,
|
|
1252
|
-
uriQuery: queryParams
|
|
1755
|
+
uriQuery: queryParams,
|
|
1756
|
+
authData: this.getObfuscatedKey()
|
|
1253
1757
|
};
|
|
1254
1758
|
|
|
1255
1759
|
try {
|
|
@@ -1283,9 +1787,9 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1283
1787
|
* @summary Gets a list of groups
|
|
1284
1788
|
*
|
|
1285
1789
|
* @function getGroups
|
|
1286
|
-
* @param {string} search -
|
|
1287
|
-
* @param {number} page -
|
|
1288
|
-
* @param {number} pageSize -
|
|
1790
|
+
* @param {string} search - Gets a list of groups. The search parameters find matching values in the "name" and "comments" attributes.
|
|
1791
|
+
* @param {number} page - Gets a list of groups. The search parameters find matching values in the "name" and "comments" attributes.
|
|
1792
|
+
* @param {number} pageSize - Gets a list of groups. The search parameters find matching values in the "name" and "comments" attributes.
|
|
1289
1793
|
* @param {getCallback} callback - a callback function to return the result
|
|
1290
1794
|
*/
|
|
1291
1795
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -1320,7 +1824,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1320
1824
|
const reqObj = {
|
|
1321
1825
|
payload: bodyVars,
|
|
1322
1826
|
uriPathVars: pathVars,
|
|
1323
|
-
uriQuery: queryParams
|
|
1827
|
+
uriQuery: queryParams,
|
|
1828
|
+
authData: this.getObfuscatedKey()
|
|
1324
1829
|
};
|
|
1325
1830
|
|
|
1326
1831
|
try {
|
|
@@ -1354,7 +1859,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1354
1859
|
* @summary Gets the group for the specified ID
|
|
1355
1860
|
*
|
|
1356
1861
|
* @function getGroupsgroupId
|
|
1357
|
-
* @param {number} groupId -
|
|
1862
|
+
* @param {number} groupId - Gets the group for the specified ID.
|
|
1358
1863
|
* @param {getCallback} callback - a callback function to return the result
|
|
1359
1864
|
*/
|
|
1360
1865
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -1394,7 +1899,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1394
1899
|
const reqObj = {
|
|
1395
1900
|
payload: bodyVars,
|
|
1396
1901
|
uriPathVars: pathVars,
|
|
1397
|
-
uriQuery: queryParams
|
|
1902
|
+
uriQuery: queryParams,
|
|
1903
|
+
authData: this.getObfuscatedKey()
|
|
1398
1904
|
};
|
|
1399
1905
|
|
|
1400
1906
|
try {
|
|
@@ -1428,11 +1934,11 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1428
1934
|
* @summary Gets a list of all users and allows user filtering by name, department, or group
|
|
1429
1935
|
*
|
|
1430
1936
|
* @function getUsers
|
|
1431
|
-
* @param {string} name - <p>Gets a list of all users and allows user filtering by name, department, or group. The search parameters, "dept" and "group", perform a 'starts with' match.</p><br/><b>Sample Request (Python) - Get users by page and pageSize</b><pre>import http.client<br/><br/>conn = http.client.HTTPSConnection("HOSTNAME")<br/><br/>headers = {<br/> 'content-type': "application/json",<br/> 'cache-control': "no-cache",<br/> 'cookie': "JSESSIONID=xxxxxxx"<br/> }<br/><br/>conn.request("GET", "/api/v1/users?page=1&pageSize=100", headers=headers)<br/><br/>res = conn.getresponse()<br/>data = res.read()<br/><br/>print(data.decode("utf-8"))</pre><br/><b>Sample Response</b><pre>[<br/> {<br/> "id": 72548,<br/> "name": "test1",<br/> "email": "admin2@antest.com",<br/> "groups": [<br/> {<br/> "id": 75444,<br/> "name": "testgroup"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "comments": "test",<br/> "adminUser": true<br/> },<br/> ...<br/> {<br/> "id": 74959,<br/> "name": "auto-test-user-1317217",<br/> "email": "auto-test-user-1317217@antest.com",<br/> "groups": [<br/> {<br/> "id": 72519,<br/> "name": "Service Admin"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "adminUser": false<br/> } <br/>]</pre><br/><b>Sample Request (Python) - Get users by name</b><pre>import http.client<br/><br/>conn = http.client.HTTPSConnection("HOSTNAME")<br/><br/>headers = {<br/> 'content-type': "application/json",<br/> 'cache-control': "no-cache",<br/> 'cookie': "JSESSIONID=xxxxxxx"<br/> }<br/><br/>conn.request("GET", "/api/v1/users?name=john%20smith", headers=headers)<br/><br/>res = conn.getresponse()<br/>data = res.read()<br/><br/>print(data.decode("utf-8"))</pre><br/><b>Sample Response</b><pre>[<br/> {<br/> "id": 74479,<br/> "name": "john smith",<br/> "email": "auto-test-user-1338349@antest.com",<br/> "groups": [<br/> {<br/> "id": 72519,<br/> "name": "Service Admin"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "adminUser": false<br/> },<br/> ...<br/> {<br/> "id": 73289,<br/> "name": "john smith",<br/> "email": "auto-test-user-1342472@antest.com",<br/> "groups": [<br/> {<br/> "id": 72519,<br/> "name": "Service Admin"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "adminUser": false<br/> }<br/>]</pre><br/><b>Sample Request (Python) - Get users by group</b><pre>import http.client<br/><br/>conn = http.client.HTTPSConnection("HOSTNAME")<br/><br/>headers = {<br/> 'content-type': "application/json",<br/> 'cache-control': "no-cache",<br/> 'cookie': "JSESSIONID=xxxxxxx"<br/> }<br/><br/>conn.request("GET", "/api/v1/users?group=guest-wifi", headers=headers)<br/><br/>res = conn.getresponse()<br/>data = res.read()<br/><br/>print(data.decode("utf-8"))</pre><br/><b>Sample Response</b> <pre>[<br/> {<br/> "id": 75483,<br/> "name": "admin4",<br/> "email": "admin4@antest.com",<br/> "groups": [<br/> {<br/> "id": 75457,<br/> "name": "guest-wifi"<br/> },<br/> {<br/> "id": 72519,<br/> "name": "Service Admin"<br/> },<br/> {<br/> "id": 75481,<br/> "name": "test-sync1"<br/> },<br/> {<br/> "id": 75444,<br/> "name": "testgroup"<br/> },<br/> {<br/> "id": 75446,<br/> "name": "testsuper"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "adminUser": true<br/> },<br/> ...<br/> {<br/> "id": 75617,<br/> "name": "ant1",<br/> "email": "ant1@antest.com",<br/> "groups": [<br/> {<br/> "id": 75457,<br/> "name": "guest-wifi"<br/> }<br/> ],<br/> "department": {<br/> "id": 75458,<br/> "name": "guests"<br/> },<br/> "comments": "guest wi-fi user",<br/> "adminUser": false<br/> }<br/>]</pre><br/><b>Sample Request (Python) - Get users by dept</b><pre>import http.client<br/><br/>conn = http.client.HTTPSConnection("HOSTNAME")<br/><br/>headers = {<br/> 'content-type': "application/json",<br/> 'cache-control': "no-cache",<br/> 'cookie': "JSESSIONID=xxxxxxx"<br/> }<br/><br/>conn.request("GET", "/api/v1/users?dept=guests", headers=headers)<br/><br/>res = conn.getresponse()<br/>data = res.read()<br/><br/>print(data.decode("utf-8"))</pre><br/><b>Sample Response</b><pre>[<br/> {<br/> "id": 82737,<br/> "name": "guest1234",<br/> "email": "guest89808@antest.com",<br/> "groups": [<br/> {<br/> "id": 75457,<br/> "name": "guest-wifi"<br/> }<br/> ],<br/> "department": {<br/> "id": 75458,<br/> "name": "guests"<br/> },<br/> "comments": "guest wi-fi user",<br/> "adminUser": false<br/> },<br/> ...<br/> {<br/> "id": 82738,<br/> "name": "no-pass",<br/> "email": "no-pass@antest.com",<br/> "groups": [<br/> {<br/> "id": 75457,<br/> "name": "guest-wifi"<br/> }<br/> ],<br/> "department": {<br/> "id": 75458,<br/> "name": "guests"<br/> },<br/> "adminUser": false<br/> }<br/>]</pre>
|
|
1432
|
-
* @param {string} dept - <p>Gets a list of all users and allows user filtering by name, department, or group. The search parameters, "dept" and "group", perform a 'starts with' match.</p><br/><b>Sample Request (Python) - Get users by page and pageSize</b><pre>import http.client<br/><br/>conn = http.client.HTTPSConnection("HOSTNAME")<br/><br/>headers = {<br/> 'content-type': "application/json",<br/> 'cache-control': "no-cache",<br/> 'cookie': "JSESSIONID=xxxxxxx"<br/> }<br/><br/>conn.request("GET", "/api/v1/users?page=1&pageSize=100", headers=headers)<br/><br/>res = conn.getresponse()<br/>data = res.read()<br/><br/>print(data.decode("utf-8"))</pre><br/><b>Sample Response</b><pre>[<br/> {<br/> "id": 72548,<br/> "name": "test1",<br/> "email": "admin2@antest.com",<br/> "groups": [<br/> {<br/> "id": 75444,<br/> "name": "testgroup"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "comments": "test",<br/> "adminUser": true<br/> },<br/> ...<br/> {<br/> "id": 74959,<br/> "name": "auto-test-user-1317217",<br/> "email": "auto-test-user-1317217@antest.com",<br/> "groups": [<br/> {<br/> "id": 72519,<br/> "name": "Service Admin"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "adminUser": false<br/> } <br/>]</pre><br/><b>Sample Request (Python) - Get users by name</b><pre>import http.client<br/><br/>conn = http.client.HTTPSConnection("HOSTNAME")<br/><br/>headers = {<br/> 'content-type': "application/json",<br/> 'cache-control': "no-cache",<br/> 'cookie': "JSESSIONID=xxxxxxx"<br/> }<br/><br/>conn.request("GET", "/api/v1/users?name=john%20smith", headers=headers)<br/><br/>res = conn.getresponse()<br/>data = res.read()<br/><br/>print(data.decode("utf-8"))</pre><br/><b>Sample Response</b><pre>[<br/> {<br/> "id": 74479,<br/> "name": "john smith",<br/> "email": "auto-test-user-1338349@antest.com",<br/> "groups": [<br/> {<br/> "id": 72519,<br/> "name": "Service Admin"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "adminUser": false<br/> },<br/> ...<br/> {<br/> "id": 73289,<br/> "name": "john smith",<br/> "email": "auto-test-user-1342472@antest.com",<br/> "groups": [<br/> {<br/> "id": 72519,<br/> "name": "Service Admin"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "adminUser": false<br/> }<br/>]</pre><br/><b>Sample Request (Python) - Get users by group</b><pre>import http.client<br/><br/>conn = http.client.HTTPSConnection("HOSTNAME")<br/><br/>headers = {<br/> 'content-type': "application/json",<br/> 'cache-control': "no-cache",<br/> 'cookie': "JSESSIONID=xxxxxxx"<br/> }<br/><br/>conn.request("GET", "/api/v1/users?group=guest-wifi", headers=headers)<br/><br/>res = conn.getresponse()<br/>data = res.read()<br/><br/>print(data.decode("utf-8"))</pre><br/><b>Sample Response</b> <pre>[<br/> {<br/> "id": 75483,<br/> "name": "admin4",<br/> "email": "admin4@antest.com",<br/> "groups": [<br/> {<br/> "id": 75457,<br/> "name": "guest-wifi"<br/> },<br/> {<br/> "id": 72519,<br/> "name": "Service Admin"<br/> },<br/> {<br/> "id": 75481,<br/> "name": "test-sync1"<br/> },<br/> {<br/> "id": 75444,<br/> "name": "testgroup"<br/> },<br/> {<br/> "id": 75446,<br/> "name": "testsuper"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "adminUser": true<br/> },<br/> ...<br/> {<br/> "id": 75617,<br/> "name": "ant1",<br/> "email": "ant1@antest.com",<br/> "groups": [<br/> {<br/> "id": 75457,<br/> "name": "guest-wifi"<br/> }<br/> ],<br/> "department": {<br/> "id": 75458,<br/> "name": "guests"<br/> },<br/> "comments": "guest wi-fi user",<br/> "adminUser": false<br/> }<br/>]</pre><br/><b>Sample Request (Python) - Get users by dept</b><pre>import http.client<br/><br/>conn = http.client.HTTPSConnection("HOSTNAME")<br/><br/>headers = {<br/> 'content-type': "application/json",<br/> 'cache-control': "no-cache",<br/> 'cookie': "JSESSIONID=xxxxxxx"<br/> }<br/><br/>conn.request("GET", "/api/v1/users?dept=guests", headers=headers)<br/><br/>res = conn.getresponse()<br/>data = res.read()<br/><br/>print(data.decode("utf-8"))</pre><br/><b>Sample Response</b><pre>[<br/> {<br/> "id": 82737,<br/> "name": "guest1234",<br/> "email": "guest89808@antest.com",<br/> "groups": [<br/> {<br/> "id": 75457,<br/> "name": "guest-wifi"<br/> }<br/> ],<br/> "department": {<br/> "id": 75458,<br/> "name": "guests"<br/> },<br/> "comments": "guest wi-fi user",<br/> "adminUser": false<br/> },<br/> ...<br/> {<br/> "id": 82738,<br/> "name": "no-pass",<br/> "email": "no-pass@antest.com",<br/> "groups": [<br/> {<br/> "id": 75457,<br/> "name": "guest-wifi"<br/> }<br/> ],<br/> "department": {<br/> "id": 75458,<br/> "name": "guests"<br/> },<br/> "adminUser": false<br/> }<br/>]</pre>
|
|
1433
|
-
* @param {string} group - <p>Gets a list of all users and allows user filtering by name, department, or group. The search parameters, "dept" and "group", perform a 'starts with' match.</p><br/><b>Sample Request (Python) - Get users by page and pageSize</b><pre>import http.client<br/><br/>conn = http.client.HTTPSConnection("HOSTNAME")<br/><br/>headers = {<br/> 'content-type': "application/json",<br/> 'cache-control': "no-cache",<br/> 'cookie': "JSESSIONID=xxxxxxx"<br/> }<br/><br/>conn.request("GET", "/api/v1/users?page=1&pageSize=100", headers=headers)<br/><br/>res = conn.getresponse()<br/>data = res.read()<br/><br/>print(data.decode("utf-8"))</pre><br/><b>Sample Response</b><pre>[<br/> {<br/> "id": 72548,<br/> "name": "test1",<br/> "email": "admin2@antest.com",<br/> "groups": [<br/> {<br/> "id": 75444,<br/> "name": "testgroup"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "comments": "test",<br/> "adminUser": true<br/> },<br/> ...<br/> {<br/> "id": 74959,<br/> "name": "auto-test-user-1317217",<br/> "email": "auto-test-user-1317217@antest.com",<br/> "groups": [<br/> {<br/> "id": 72519,<br/> "name": "Service Admin"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "adminUser": false<br/> } <br/>]</pre><br/><b>Sample Request (Python) - Get users by name</b><pre>import http.client<br/><br/>conn = http.client.HTTPSConnection("HOSTNAME")<br/><br/>headers = {<br/> 'content-type': "application/json",<br/> 'cache-control': "no-cache",<br/> 'cookie': "JSESSIONID=xxxxxxx"<br/> }<br/><br/>conn.request("GET", "/api/v1/users?name=john%20smith", headers=headers)<br/><br/>res = conn.getresponse()<br/>data = res.read()<br/><br/>print(data.decode("utf-8"))</pre><br/><b>Sample Response</b><pre>[<br/> {<br/> "id": 74479,<br/> "name": "john smith",<br/> "email": "auto-test-user-1338349@antest.com",<br/> "groups": [<br/> {<br/> "id": 72519,<br/> "name": "Service Admin"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "adminUser": false<br/> },<br/> ...<br/> {<br/> "id": 73289,<br/> "name": "john smith",<br/> "email": "auto-test-user-1342472@antest.com",<br/> "groups": [<br/> {<br/> "id": 72519,<br/> "name": "Service Admin"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "adminUser": false<br/> }<br/>]</pre><br/><b>Sample Request (Python) - Get users by group</b><pre>import http.client<br/><br/>conn = http.client.HTTPSConnection("HOSTNAME")<br/><br/>headers = {<br/> 'content-type': "application/json",<br/> 'cache-control': "no-cache",<br/> 'cookie': "JSESSIONID=xxxxxxx"<br/> }<br/><br/>conn.request("GET", "/api/v1/users?group=guest-wifi", headers=headers)<br/><br/>res = conn.getresponse()<br/>data = res.read()<br/><br/>print(data.decode("utf-8"))</pre><br/><b>Sample Response</b> <pre>[<br/> {<br/> "id": 75483,<br/> "name": "admin4",<br/> "email": "admin4@antest.com",<br/> "groups": [<br/> {<br/> "id": 75457,<br/> "name": "guest-wifi"<br/> },<br/> {<br/> "id": 72519,<br/> "name": "Service Admin"<br/> },<br/> {<br/> "id": 75481,<br/> "name": "test-sync1"<br/> },<br/> {<br/> "id": 75444,<br/> "name": "testgroup"<br/> },<br/> {<br/> "id": 75446,<br/> "name": "testsuper"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "adminUser": true<br/> },<br/> ...<br/> {<br/> "id": 75617,<br/> "name": "ant1",<br/> "email": "ant1@antest.com",<br/> "groups": [<br/> {<br/> "id": 75457,<br/> "name": "guest-wifi"<br/> }<br/> ],<br/> "department": {<br/> "id": 75458,<br/> "name": "guests"<br/> },<br/> "comments": "guest wi-fi user",<br/> "adminUser": false<br/> }<br/>]</pre><br/><b>Sample Request (Python) - Get users by dept</b><pre>import http.client<br/><br/>conn = http.client.HTTPSConnection("HOSTNAME")<br/><br/>headers = {<br/> 'content-type': "application/json",<br/> 'cache-control': "no-cache",<br/> 'cookie': "JSESSIONID=xxxxxxx"<br/> }<br/><br/>conn.request("GET", "/api/v1/users?dept=guests", headers=headers)<br/><br/>res = conn.getresponse()<br/>data = res.read()<br/><br/>print(data.decode("utf-8"))</pre><br/><b>Sample Response</b><pre>[<br/> {<br/> "id": 82737,<br/> "name": "guest1234",<br/> "email": "guest89808@antest.com",<br/> "groups": [<br/> {<br/> "id": 75457,<br/> "name": "guest-wifi"<br/> }<br/> ],<br/> "department": {<br/> "id": 75458,<br/> "name": "guests"<br/> },<br/> "comments": "guest wi-fi user",<br/> "adminUser": false<br/> },<br/> ...<br/> {<br/> "id": 82738,<br/> "name": "no-pass",<br/> "email": "no-pass@antest.com",<br/> "groups": [<br/> {<br/> "id": 75457,<br/> "name": "guest-wifi"<br/> }<br/> ],<br/> "department": {<br/> "id": 75458,<br/> "name": "guests"<br/> },<br/> "adminUser": false<br/> }<br/>]</pre>
|
|
1434
|
-
* @param {number} page - <p>Gets a list of all users and allows user filtering by name, department, or group. The search parameters, "dept" and "group", perform a 'starts with' match.</p><br/><b>Sample Request (Python) - Get users by page and pageSize</b><pre>import http.client<br/><br/>conn = http.client.HTTPSConnection("HOSTNAME")<br/><br/>headers = {<br/> 'content-type': "application/json",<br/> 'cache-control': "no-cache",<br/> 'cookie': "JSESSIONID=xxxxxxx"<br/> }<br/><br/>conn.request("GET", "/api/v1/users?page=1&pageSize=100", headers=headers)<br/><br/>res = conn.getresponse()<br/>data = res.read()<br/><br/>print(data.decode("utf-8"))</pre><br/><b>Sample Response</b><pre>[<br/> {<br/> "id": 72548,<br/> "name": "test1",<br/> "email": "admin2@antest.com",<br/> "groups": [<br/> {<br/> "id": 75444,<br/> "name": "testgroup"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "comments": "test",<br/> "adminUser": true<br/> },<br/> ...<br/> {<br/> "id": 74959,<br/> "name": "auto-test-user-1317217",<br/> "email": "auto-test-user-1317217@antest.com",<br/> "groups": [<br/> {<br/> "id": 72519,<br/> "name": "Service Admin"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "adminUser": false<br/> } <br/>]</pre><br/><b>Sample Request (Python) - Get users by name</b><pre>import http.client<br/><br/>conn = http.client.HTTPSConnection("HOSTNAME")<br/><br/>headers = {<br/> 'content-type': "application/json",<br/> 'cache-control': "no-cache",<br/> 'cookie': "JSESSIONID=xxxxxxx"<br/> }<br/><br/>conn.request("GET", "/api/v1/users?name=john%20smith", headers=headers)<br/><br/>res = conn.getresponse()<br/>data = res.read()<br/><br/>print(data.decode("utf-8"))</pre><br/><b>Sample Response</b><pre>[<br/> {<br/> "id": 74479,<br/> "name": "john smith",<br/> "email": "auto-test-user-1338349@antest.com",<br/> "groups": [<br/> {<br/> "id": 72519,<br/> "name": "Service Admin"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "adminUser": false<br/> },<br/> ...<br/> {<br/> "id": 73289,<br/> "name": "john smith",<br/> "email": "auto-test-user-1342472@antest.com",<br/> "groups": [<br/> {<br/> "id": 72519,<br/> "name": "Service Admin"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "adminUser": false<br/> }<br/>]</pre><br/><b>Sample Request (Python) - Get users by group</b><pre>import http.client<br/><br/>conn = http.client.HTTPSConnection("HOSTNAME")<br/><br/>headers = {<br/> 'content-type': "application/json",<br/> 'cache-control': "no-cache",<br/> 'cookie': "JSESSIONID=xxxxxxx"<br/> }<br/><br/>conn.request("GET", "/api/v1/users?group=guest-wifi", headers=headers)<br/><br/>res = conn.getresponse()<br/>data = res.read()<br/><br/>print(data.decode("utf-8"))</pre><br/><b>Sample Response</b> <pre>[<br/> {<br/> "id": 75483,<br/> "name": "admin4",<br/> "email": "admin4@antest.com",<br/> "groups": [<br/> {<br/> "id": 75457,<br/> "name": "guest-wifi"<br/> },<br/> {<br/> "id": 72519,<br/> "name": "Service Admin"<br/> },<br/> {<br/> "id": 75481,<br/> "name": "test-sync1"<br/> },<br/> {<br/> "id": 75444,<br/> "name": "testgroup"<br/> },<br/> {<br/> "id": 75446,<br/> "name": "testsuper"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "adminUser": true<br/> },<br/> ...<br/> {<br/> "id": 75617,<br/> "name": "ant1",<br/> "email": "ant1@antest.com",<br/> "groups": [<br/> {<br/> "id": 75457,<br/> "name": "guest-wifi"<br/> }<br/> ],<br/> "department": {<br/> "id": 75458,<br/> "name": "guests"<br/> },<br/> "comments": "guest wi-fi user",<br/> "adminUser": false<br/> }<br/>]</pre><br/><b>Sample Request (Python) - Get users by dept</b><pre>import http.client<br/><br/>conn = http.client.HTTPSConnection("HOSTNAME")<br/><br/>headers = {<br/> 'content-type': "application/json",<br/> 'cache-control': "no-cache",<br/> 'cookie': "JSESSIONID=xxxxxxx"<br/> }<br/><br/>conn.request("GET", "/api/v1/users?dept=guests", headers=headers)<br/><br/>res = conn.getresponse()<br/>data = res.read()<br/><br/>print(data.decode("utf-8"))</pre><br/><b>Sample Response</b><pre>[<br/> {<br/> "id": 82737,<br/> "name": "guest1234",<br/> "email": "guest89808@antest.com",<br/> "groups": [<br/> {<br/> "id": 75457,<br/> "name": "guest-wifi"<br/> }<br/> ],<br/> "department": {<br/> "id": 75458,<br/> "name": "guests"<br/> },<br/> "comments": "guest wi-fi user",<br/> "adminUser": false<br/> },<br/> ...<br/> {<br/> "id": 82738,<br/> "name": "no-pass",<br/> "email": "no-pass@antest.com",<br/> "groups": [<br/> {<br/> "id": 75457,<br/> "name": "guest-wifi"<br/> }<br/> ],<br/> "department": {<br/> "id": 75458,<br/> "name": "guests"<br/> },<br/> "adminUser": false<br/> }<br/>]</pre>
|
|
1435
|
-
* @param {number} pageSize - <p>Gets a list of all users and allows user filtering by name, department, or group. The search parameters, "dept" and "group", perform a 'starts with' match.</p><br/><b>Sample Request (Python) - Get users by page and pageSize</b><pre>import http.client<br/><br/>conn = http.client.HTTPSConnection("HOSTNAME")<br/><br/>headers = {<br/> 'content-type': "application/json",<br/> 'cache-control': "no-cache",<br/> 'cookie': "JSESSIONID=xxxxxxx"<br/> }<br/><br/>conn.request("GET", "/api/v1/users?page=1&pageSize=100", headers=headers)<br/><br/>res = conn.getresponse()<br/>data = res.read()<br/><br/>print(data.decode("utf-8"))</pre><br/><b>Sample Response</b><pre>[<br/> {<br/> "id": 72548,<br/> "name": "test1",<br/> "email": "admin2@antest.com",<br/> "groups": [<br/> {<br/> "id": 75444,<br/> "name": "testgroup"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "comments": "test",<br/> "adminUser": true<br/> },<br/> ...<br/> {<br/> "id": 74959,<br/> "name": "auto-test-user-1317217",<br/> "email": "auto-test-user-1317217@antest.com",<br/> "groups": [<br/> {<br/> "id": 72519,<br/> "name": "Service Admin"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "adminUser": false<br/> } <br/>]</pre><br/><b>Sample Request (Python) - Get users by name</b><pre>import http.client<br/><br/>conn = http.client.HTTPSConnection("HOSTNAME")<br/><br/>headers = {<br/> 'content-type': "application/json",<br/> 'cache-control': "no-cache",<br/> 'cookie': "JSESSIONID=xxxxxxx"<br/> }<br/><br/>conn.request("GET", "/api/v1/users?name=john%20smith", headers=headers)<br/><br/>res = conn.getresponse()<br/>data = res.read()<br/><br/>print(data.decode("utf-8"))</pre><br/><b>Sample Response</b><pre>[<br/> {<br/> "id": 74479,<br/> "name": "john smith",<br/> "email": "auto-test-user-1338349@antest.com",<br/> "groups": [<br/> {<br/> "id": 72519,<br/> "name": "Service Admin"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "adminUser": false<br/> },<br/> ...<br/> {<br/> "id": 73289,<br/> "name": "john smith",<br/> "email": "auto-test-user-1342472@antest.com",<br/> "groups": [<br/> {<br/> "id": 72519,<br/> "name": "Service Admin"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "adminUser": false<br/> }<br/>]</pre><br/><b>Sample Request (Python) - Get users by group</b><pre>import http.client<br/><br/>conn = http.client.HTTPSConnection("HOSTNAME")<br/><br/>headers = {<br/> 'content-type': "application/json",<br/> 'cache-control': "no-cache",<br/> 'cookie': "JSESSIONID=xxxxxxx"<br/> }<br/><br/>conn.request("GET", "/api/v1/users?group=guest-wifi", headers=headers)<br/><br/>res = conn.getresponse()<br/>data = res.read()<br/><br/>print(data.decode("utf-8"))</pre><br/><b>Sample Response</b> <pre>[<br/> {<br/> "id": 75483,<br/> "name": "admin4",<br/> "email": "admin4@antest.com",<br/> "groups": [<br/> {<br/> "id": 75457,<br/> "name": "guest-wifi"<br/> },<br/> {<br/> "id": 72519,<br/> "name": "Service Admin"<br/> },<br/> {<br/> "id": 75481,<br/> "name": "test-sync1"<br/> },<br/> {<br/> "id": 75444,<br/> "name": "testgroup"<br/> },<br/> {<br/> "id": 75446,<br/> "name": "testsuper"<br/> }<br/> ],<br/> "department": {<br/> "id": 72520,<br/> "name": "Service Admin"<br/> },<br/> "adminUser": true<br/> },<br/> ...<br/> {<br/> "id": 75617,<br/> "name": "ant1",<br/> "email": "ant1@antest.com",<br/> "groups": [<br/> {<br/> "id": 75457,<br/> "name": "guest-wifi"<br/> }<br/> ],<br/> "department": {<br/> "id": 75458,<br/> "name": "guests"<br/> },<br/> "comments": "guest wi-fi user",<br/> "adminUser": false<br/> }<br/>]</pre><br/><b>Sample Request (Python) - Get users by dept</b><pre>import http.client<br/><br/>conn = http.client.HTTPSConnection("HOSTNAME")<br/><br/>headers = {<br/> 'content-type': "application/json",<br/> 'cache-control': "no-cache",<br/> 'cookie': "JSESSIONID=xxxxxxx"<br/> }<br/><br/>conn.request("GET", "/api/v1/users?dept=guests", headers=headers)<br/><br/>res = conn.getresponse()<br/>data = res.read()<br/><br/>print(data.decode("utf-8"))</pre><br/><b>Sample Response</b><pre>[<br/> {<br/> "id": 82737,<br/> "name": "guest1234",<br/> "email": "guest89808@antest.com",<br/> "groups": [<br/> {<br/> "id": 75457,<br/> "name": "guest-wifi"<br/> }<br/> ],<br/> "department": {<br/> "id": 75458,<br/> "name": "guests"<br/> },<br/> "comments": "guest wi-fi user",<br/> "adminUser": false<br/> },<br/> ...<br/> {<br/> "id": 82738,<br/> "name": "no-pass",<br/> "email": "no-pass@antest.com",<br/> "groups": [<br/> {<br/> "id": 75457,<br/> "name": "guest-wifi"<br/> }<br/> ],<br/> "department": {<br/> "id": 75458,<br/> "name": "guests"<br/> },<br/> "adminUser": false<br/> }<br/>]</pre>
|
|
1937
|
+
* @param {string} name - Gets a list of all users and allows user filtering by name, department, or group. The search parameters, "dept" and "group", perform a 'starts with' match.
|
|
1938
|
+
* @param {string} dept - Gets a list of all users and allows user filtering by name, department, or group. The search parameters, "dept" and "group", perform a 'starts with' match.
|
|
1939
|
+
* @param {string} group - Gets a list of all users and allows user filtering by name, department, or group. The search parameters, "dept" and "group", perform a 'starts with' match.
|
|
1940
|
+
* @param {number} page - Gets a list of all users and allows user filtering by name, department, or group. The search parameters, "dept" and "group", perform a 'starts with' match.
|
|
1941
|
+
* @param {number} pageSize - Gets a list of all users and allows user filtering by name, department, or group. The search parameters, "dept" and "group", perform a 'starts with' match.
|
|
1436
1942
|
* @param {getCallback} callback - a callback function to return the result
|
|
1437
1943
|
*/
|
|
1438
1944
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -1467,7 +1973,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1467
1973
|
const reqObj = {
|
|
1468
1974
|
payload: bodyVars,
|
|
1469
1975
|
uriPathVars: pathVars,
|
|
1470
|
-
uriQuery: queryParams
|
|
1976
|
+
uriQuery: queryParams,
|
|
1977
|
+
authData: this.getObfuscatedKey()
|
|
1471
1978
|
};
|
|
1472
1979
|
|
|
1473
1980
|
try {
|
|
@@ -1501,7 +2008,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1501
2008
|
* @summary Adds a new user
|
|
1502
2009
|
*
|
|
1503
2010
|
* @function postUsers
|
|
1504
|
-
* @param {object} user -
|
|
2011
|
+
* @param {object} user - Adds a new user. A user can belong to multiple groups, but can only belong to one department.
|
|
1505
2012
|
* @param {getCallback} callback - a callback function to return the result
|
|
1506
2013
|
*/
|
|
1507
2014
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -1536,7 +2043,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1536
2043
|
const reqObj = {
|
|
1537
2044
|
payload: bodyVars,
|
|
1538
2045
|
uriPathVars: pathVars,
|
|
1539
|
-
uriQuery: queryParams
|
|
2046
|
+
uriQuery: queryParams,
|
|
2047
|
+
authData: this.getObfuscatedKey()
|
|
1540
2048
|
};
|
|
1541
2049
|
|
|
1542
2050
|
try {
|
|
@@ -1570,7 +2078,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1570
2078
|
* @summary Bulk delete users up to a maximum of 500 users per request
|
|
1571
2079
|
*
|
|
1572
2080
|
* @function postUsersbulkDelete
|
|
1573
|
-
* @param {object} userIds -
|
|
2081
|
+
* @param {object} userIds - Bulk delete users up to a maximum of 500 users per request. The response returns the user IDs that were successfully deleted.
|
|
1574
2082
|
* @param {getCallback} callback - a callback function to return the result
|
|
1575
2083
|
*/
|
|
1576
2084
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -1605,7 +2113,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1605
2113
|
const reqObj = {
|
|
1606
2114
|
payload: bodyVars,
|
|
1607
2115
|
uriPathVars: pathVars,
|
|
1608
|
-
uriQuery: queryParams
|
|
2116
|
+
uriQuery: queryParams,
|
|
2117
|
+
authData: this.getObfuscatedKey()
|
|
1609
2118
|
};
|
|
1610
2119
|
|
|
1611
2120
|
try {
|
|
@@ -1639,7 +2148,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1639
2148
|
* @summary Gets the user information for the specified ID
|
|
1640
2149
|
*
|
|
1641
2150
|
* @function getUsersuserId
|
|
1642
|
-
* @param {number} userId -
|
|
2151
|
+
* @param {number} userId - Gets the user information for the specified ID.
|
|
1643
2152
|
* @param {getCallback} callback - a callback function to return the result
|
|
1644
2153
|
*/
|
|
1645
2154
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -1679,7 +2188,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1679
2188
|
const reqObj = {
|
|
1680
2189
|
payload: bodyVars,
|
|
1681
2190
|
uriPathVars: pathVars,
|
|
1682
|
-
uriQuery: queryParams
|
|
2191
|
+
uriQuery: queryParams,
|
|
2192
|
+
authData: this.getObfuscatedKey()
|
|
1683
2193
|
};
|
|
1684
2194
|
|
|
1685
2195
|
try {
|
|
@@ -1713,8 +2223,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1713
2223
|
* @summary Updates the user information for the specified ID
|
|
1714
2224
|
*
|
|
1715
2225
|
* @function putUsersuserId
|
|
1716
|
-
* @param {number} userId -
|
|
1717
|
-
* @param {object} user -
|
|
2226
|
+
* @param {number} userId - Updates the user information for the specified ID. However, the "email" attribute is read-only.
|
|
2227
|
+
* @param {object} user - Updates the user information for the specified ID. However, the "email" attribute is read-only.
|
|
1718
2228
|
* @param {getCallback} callback - a callback function to return the result
|
|
1719
2229
|
*/
|
|
1720
2230
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -1754,7 +2264,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1754
2264
|
const reqObj = {
|
|
1755
2265
|
payload: bodyVars,
|
|
1756
2266
|
uriPathVars: pathVars,
|
|
1757
|
-
uriQuery: queryParams
|
|
2267
|
+
uriQuery: queryParams,
|
|
2268
|
+
authData: this.getObfuscatedKey()
|
|
1758
2269
|
};
|
|
1759
2270
|
|
|
1760
2271
|
try {
|
|
@@ -1788,7 +2299,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1788
2299
|
* @summary Deletes the user for the specified ID
|
|
1789
2300
|
*
|
|
1790
2301
|
* @function deleteUsersuserId
|
|
1791
|
-
* @param {number} userId -
|
|
2302
|
+
* @param {number} userId - Deletes the user for the specified ID.
|
|
1792
2303
|
* @param {getCallback} callback - a callback function to return the result
|
|
1793
2304
|
*/
|
|
1794
2305
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -1828,7 +2339,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1828
2339
|
const reqObj = {
|
|
1829
2340
|
payload: bodyVars,
|
|
1830
2341
|
uriPathVars: pathVars,
|
|
1831
|
-
uriQuery: queryParams
|
|
2342
|
+
uriQuery: queryParams,
|
|
2343
|
+
authData: this.getObfuscatedKey()
|
|
1832
2344
|
};
|
|
1833
2345
|
|
|
1834
2346
|
try {
|
|
@@ -1880,7 +2392,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1880
2392
|
|
|
1881
2393
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
1882
2394
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
1883
|
-
const reqObj =
|
|
2395
|
+
const reqObj = { authData: this.getObfuscatedKey() };
|
|
1884
2396
|
|
|
1885
2397
|
try {
|
|
1886
2398
|
// Make the call -
|
|
@@ -1913,7 +2425,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1913
2425
|
* @summary Updates the list of white-listed URLs
|
|
1914
2426
|
*
|
|
1915
2427
|
* @function putSecurity
|
|
1916
|
-
* @param {object} policy -
|
|
2428
|
+
* @param {object} policy - Updates the list of white-listed URLs. This will overwrite a previously-generated white list. If you need to completely erase the white list, submit an empty list.
|
|
1917
2429
|
* @param {getCallback} callback - a callback function to return the result
|
|
1918
2430
|
*/
|
|
1919
2431
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -1948,7 +2460,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
1948
2460
|
const reqObj = {
|
|
1949
2461
|
payload: bodyVars,
|
|
1950
2462
|
uriPathVars: pathVars,
|
|
1951
|
-
uriQuery: queryParams
|
|
2463
|
+
uriQuery: queryParams,
|
|
2464
|
+
authData: this.getObfuscatedKey()
|
|
1952
2465
|
};
|
|
1953
2466
|
|
|
1954
2467
|
try {
|
|
@@ -2000,7 +2513,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2000
2513
|
|
|
2001
2514
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
2002
2515
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
2003
|
-
const reqObj =
|
|
2516
|
+
const reqObj = { authData: this.getObfuscatedKey() };
|
|
2004
2517
|
|
|
2005
2518
|
try {
|
|
2006
2519
|
// Make the call -
|
|
@@ -2033,7 +2546,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2033
2546
|
* @summary Updates the list of black-listed URLs
|
|
2034
2547
|
*
|
|
2035
2548
|
* @function putSecurityadvanced
|
|
2036
|
-
* @param {object} advSettings -
|
|
2549
|
+
* @param {object} advSettings - Updates the list of black-listed URLs. This will overwrite a previously-generated black list. If you need to completely erase the black list, submit an empty list.
|
|
2037
2550
|
* @param {getCallback} callback - a callback function to return the result
|
|
2038
2551
|
*/
|
|
2039
2552
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -2068,7 +2581,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2068
2581
|
const reqObj = {
|
|
2069
2582
|
payload: bodyVars,
|
|
2070
2583
|
uriPathVars: pathVars,
|
|
2071
|
-
uriQuery: queryParams
|
|
2584
|
+
uriQuery: queryParams,
|
|
2585
|
+
authData: this.getObfuscatedKey()
|
|
2072
2586
|
};
|
|
2073
2587
|
|
|
2074
2588
|
try {
|
|
@@ -2102,7 +2616,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2102
2616
|
* @summary Adds a URL to or removes a URL from the black list
|
|
2103
2617
|
*
|
|
2104
2618
|
* @function postSecurityadvancedblacklistUrls
|
|
2105
|
-
* @param {string} action -
|
|
2619
|
+
* @param {string} action - Adds a URL to or removes a URL from the black list. To add a URL to the black list, set the action parameter to ADD_TO_LIST. To remove a URL, set action to REMOVE_FROM_LIST.
|
|
2106
2620
|
* @param {getCallback} callback - a callback function to return the result
|
|
2107
2621
|
*/
|
|
2108
2622
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -2142,7 +2656,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2142
2656
|
const reqObj = {
|
|
2143
2657
|
payload: bodyVars,
|
|
2144
2658
|
uriPathVars: pathVars,
|
|
2145
|
-
uriQuery: queryParams
|
|
2659
|
+
uriQuery: queryParams,
|
|
2660
|
+
authData: this.getObfuscatedKey()
|
|
2146
2661
|
};
|
|
2147
2662
|
|
|
2148
2663
|
try {
|
|
@@ -2194,7 +2709,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2194
2709
|
|
|
2195
2710
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
2196
2711
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
2197
|
-
const reqObj =
|
|
2712
|
+
const reqObj = { authData: this.getObfuscatedKey() };
|
|
2198
2713
|
|
|
2199
2714
|
try {
|
|
2200
2715
|
// Make the call -
|
|
@@ -2245,7 +2760,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2245
2760
|
|
|
2246
2761
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
2247
2762
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
2248
|
-
const reqObj =
|
|
2763
|
+
const reqObj = { authData: this.getObfuscatedKey() };
|
|
2249
2764
|
|
|
2250
2765
|
try {
|
|
2251
2766
|
// Make the call -
|
|
@@ -2278,7 +2793,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2278
2793
|
* @summary Generates a Certificate Signing Request (CSR)
|
|
2279
2794
|
*
|
|
2280
2795
|
* @function postSslSettingsgeneratecsr
|
|
2281
|
-
* @param {object} cert -
|
|
2796
|
+
* @param {object} cert - Generates a Certificate Signing Request (CSR). If your organization uses a custom intermediate root certificate for SSL inspection, send a GET request to /sslSettings/generatecsr to generate a new CSR, then send the generated CSR to your Certificate Authority (CA) to sign as a subordinate CA certificate. The subordinate CA can be an intermediate or an issuing CA.
|
|
2282
2797
|
* @param {getCallback} callback - a callback function to return the result
|
|
2283
2798
|
*/
|
|
2284
2799
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -2318,7 +2833,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2318
2833
|
const reqObj = {
|
|
2319
2834
|
payload: bodyVars,
|
|
2320
2835
|
uriPathVars: pathVars,
|
|
2321
|
-
uriQuery: queryParams
|
|
2836
|
+
uriQuery: queryParams,
|
|
2837
|
+
authData: this.getObfuscatedKey()
|
|
2322
2838
|
};
|
|
2323
2839
|
|
|
2324
2840
|
try {
|
|
@@ -2370,7 +2886,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2370
2886
|
|
|
2371
2887
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
2372
2888
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
2373
|
-
const reqObj =
|
|
2889
|
+
const reqObj = { authData: this.getObfuscatedKey() };
|
|
2374
2890
|
|
|
2375
2891
|
try {
|
|
2376
2892
|
// Make the call -
|
|
@@ -2403,7 +2919,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2403
2919
|
* @summary Uploads a signed intermediate root certificate for clients that use iframe-based uploads whose content type is text/plain
|
|
2404
2920
|
*
|
|
2405
2921
|
* @function postSslSettingsuploadcerttext
|
|
2406
|
-
* @param {object} fileInputStream -
|
|
2922
|
+
* @param {object} fileInputStream - Uploads a signed intermediate root certificate for clients that use iframe-based uploads whose content type is text/plain. To enable users' browsers to trust this intermediate root certificate and any certificate signed by it, install this root certificate on users' browsers. If you also want to upload a certificate chain, upload the signed intermediate root certificate before uploading the certificate chain.
|
|
2407
2923
|
* @param {getCallback} callback - a callback function to return the result
|
|
2408
2924
|
*/
|
|
2409
2925
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -2438,7 +2954,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2438
2954
|
const reqObj = {
|
|
2439
2955
|
payload: bodyVars,
|
|
2440
2956
|
uriPathVars: pathVars,
|
|
2441
|
-
uriQuery: queryParams
|
|
2957
|
+
uriQuery: queryParams,
|
|
2958
|
+
authData: this.getObfuscatedKey()
|
|
2442
2959
|
};
|
|
2443
2960
|
|
|
2444
2961
|
try {
|
|
@@ -2472,7 +2989,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2472
2989
|
* @summary Uploads the Intermediate Certificate Chain (PEM) for clients that use iframe-based uploads whose content type is text/plain
|
|
2473
2990
|
*
|
|
2474
2991
|
* @function postSslSettingsuploadcertchaintext
|
|
2475
|
-
* @param {object} fileInputStream -
|
|
2992
|
+
* @param {object} fileInputStream - Uploads the Intermediate Certificate Chain (PEM) for clients that use iframe-based uploads whose content type is text/plain. Upload the certificate chain that includes any other intermediate certificates that complete the chain to the intermediate root certificate you want to upload.
|
|
2476
2993
|
* @param {getCallback} callback - a callback function to return the result
|
|
2477
2994
|
*/
|
|
2478
2995
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -2507,7 +3024,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2507
3024
|
const reqObj = {
|
|
2508
3025
|
payload: bodyVars,
|
|
2509
3026
|
uriPathVars: pathVars,
|
|
2510
|
-
uriQuery: queryParams
|
|
3027
|
+
uriQuery: queryParams,
|
|
3028
|
+
authData: this.getObfuscatedKey()
|
|
2511
3029
|
};
|
|
2512
3030
|
|
|
2513
3031
|
try {
|
|
@@ -2541,7 +3059,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2541
3059
|
* @summary Gets information about all or custom URL categories
|
|
2542
3060
|
*
|
|
2543
3061
|
* @function getUrlCategories
|
|
2544
|
-
* @param {boolean} customOnly -
|
|
3062
|
+
* @param {boolean} customOnly - Gets information about all or custom URL categories.
|
|
2545
3063
|
* @param {getCallback} callback - a callback function to return the result
|
|
2546
3064
|
*/
|
|
2547
3065
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -2576,7 +3094,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2576
3094
|
const reqObj = {
|
|
2577
3095
|
payload: bodyVars,
|
|
2578
3096
|
uriPathVars: pathVars,
|
|
2579
|
-
uriQuery: queryParams
|
|
3097
|
+
uriQuery: queryParams,
|
|
3098
|
+
authData: this.getObfuscatedKey()
|
|
2580
3099
|
};
|
|
2581
3100
|
|
|
2582
3101
|
try {
|
|
@@ -2610,7 +3129,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2610
3129
|
* @summary Adds a new custom URL category
|
|
2611
3130
|
*
|
|
2612
3131
|
* @function postUrlCategories
|
|
2613
|
-
* @param {object} customCategory -
|
|
3132
|
+
* @param {object} customCategory - Adds a new custom URL category.
|
|
2614
3133
|
* @param {getCallback} callback - a callback function to return the result
|
|
2615
3134
|
*/
|
|
2616
3135
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -2645,7 +3164,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2645
3164
|
const reqObj = {
|
|
2646
3165
|
payload: bodyVars,
|
|
2647
3166
|
uriPathVars: pathVars,
|
|
2648
|
-
uriQuery: queryParams
|
|
3167
|
+
uriQuery: queryParams,
|
|
3168
|
+
authData: this.getObfuscatedKey()
|
|
2649
3169
|
};
|
|
2650
3170
|
|
|
2651
3171
|
try {
|
|
@@ -2697,7 +3217,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2697
3217
|
|
|
2698
3218
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
2699
3219
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
2700
|
-
const reqObj =
|
|
3220
|
+
const reqObj = { authData: this.getObfuscatedKey() };
|
|
2701
3221
|
|
|
2702
3222
|
try {
|
|
2703
3223
|
// Make the call -
|
|
@@ -2748,7 +3268,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2748
3268
|
|
|
2749
3269
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
2750
3270
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
2751
|
-
const reqObj =
|
|
3271
|
+
const reqObj = { authData: this.getObfuscatedKey() };
|
|
2752
3272
|
|
|
2753
3273
|
try {
|
|
2754
3274
|
// Make the call -
|
|
@@ -2781,7 +3301,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2781
3301
|
* @summary Gets the URL category information for the specified ID
|
|
2782
3302
|
*
|
|
2783
3303
|
* @function getUrlCategoriescategoryId
|
|
2784
|
-
* @param {string} categoryId -
|
|
3304
|
+
* @param {string} categoryId - Gets the URL category information for the specified ID.
|
|
2785
3305
|
* @param {getCallback} callback - a callback function to return the result
|
|
2786
3306
|
*/
|
|
2787
3307
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -2821,7 +3341,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2821
3341
|
const reqObj = {
|
|
2822
3342
|
payload: bodyVars,
|
|
2823
3343
|
uriPathVars: pathVars,
|
|
2824
|
-
uriQuery: queryParams
|
|
3344
|
+
uriQuery: queryParams,
|
|
3345
|
+
authData: this.getObfuscatedKey()
|
|
2825
3346
|
};
|
|
2826
3347
|
|
|
2827
3348
|
try {
|
|
@@ -2855,9 +3376,9 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2855
3376
|
* @summary Updates the URL category for the specified ID
|
|
2856
3377
|
*
|
|
2857
3378
|
* @function putUrlCategoriescategoryId
|
|
2858
|
-
* @param {string} categoryId -
|
|
2859
|
-
* @param {string} action -
|
|
2860
|
-
* @param {object} customCategory -
|
|
3379
|
+
* @param {string} categoryId - Updates the URL category for the specified ID.
|
|
3380
|
+
* @param {string} action - Updates the URL category for the specified ID.
|
|
3381
|
+
* @param {object} customCategory - Updates the URL category for the specified ID.
|
|
2861
3382
|
* @param {getCallback} callback - a callback function to return the result
|
|
2862
3383
|
*/
|
|
2863
3384
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -2897,7 +3418,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2897
3418
|
const reqObj = {
|
|
2898
3419
|
payload: bodyVars,
|
|
2899
3420
|
uriPathVars: pathVars,
|
|
2900
|
-
uriQuery: queryParams
|
|
3421
|
+
uriQuery: queryParams,
|
|
3422
|
+
authData: this.getObfuscatedKey()
|
|
2901
3423
|
};
|
|
2902
3424
|
|
|
2903
3425
|
try {
|
|
@@ -2931,7 +3453,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2931
3453
|
* @summary Deletes the custom URL category for the specified ID
|
|
2932
3454
|
*
|
|
2933
3455
|
* @function deleteUrlCategoriescategoryId
|
|
2934
|
-
* @param {string} categoryId -
|
|
3456
|
+
* @param {string} categoryId - Deletes the custom URL category for the specified ID. You cannot delete a custom category while it is being used by a URL policy or NSS feed. Also, predefined categories cannot be deleted.
|
|
2935
3457
|
* @param {getCallback} callback - a callback function to return the result
|
|
2936
3458
|
*/
|
|
2937
3459
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -2971,7 +3493,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
2971
3493
|
const reqObj = {
|
|
2972
3494
|
payload: bodyVars,
|
|
2973
3495
|
uriPathVars: pathVars,
|
|
2974
|
-
uriQuery: queryParams
|
|
3496
|
+
uriQuery: queryParams,
|
|
3497
|
+
authData: this.getObfuscatedKey()
|
|
2975
3498
|
};
|
|
2976
3499
|
|
|
2977
3500
|
try {
|
|
@@ -3005,7 +3528,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3005
3528
|
* @summary Look up the categorization of the given set of URLs, e.g., ['abc.com', 'xyz.com']
|
|
3006
3529
|
*
|
|
3007
3530
|
* @function postUrlLookup
|
|
3008
|
-
* @param {array} urls -
|
|
3531
|
+
* @param {array} urls - Look up the categorization of the given set of URLs, e.g., ['abc.com', 'xyz.com']. Up to 100 URLs can be looked up per request, and a URL cannot exceed 1024 characters.
|
|
3009
3532
|
* @param {getCallback} callback - a callback function to return the result
|
|
3010
3533
|
*/
|
|
3011
3534
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -3026,7 +3549,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3026
3549
|
const queryParamsAvailable = {};
|
|
3027
3550
|
const queryParams = {};
|
|
3028
3551
|
const pathVars = [];
|
|
3029
|
-
const bodyVars =
|
|
3552
|
+
const bodyVars = urls;
|
|
3030
3553
|
|
|
3031
3554
|
// loop in template. long callback arg name to avoid identifier conflicts
|
|
3032
3555
|
Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
|
|
@@ -3040,7 +3563,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3040
3563
|
const reqObj = {
|
|
3041
3564
|
payload: bodyVars,
|
|
3042
3565
|
uriPathVars: pathVars,
|
|
3043
|
-
uriQuery: queryParams
|
|
3566
|
+
uriQuery: queryParams,
|
|
3567
|
+
authData: this.getObfuscatedKey()
|
|
3044
3568
|
};
|
|
3045
3569
|
|
|
3046
3570
|
try {
|
|
@@ -3074,13 +3598,13 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3074
3598
|
* @summary Gets VPN credentials that can be associated to locations
|
|
3075
3599
|
*
|
|
3076
3600
|
* @function getVpnCredentials
|
|
3077
|
-
* @param {string} search -
|
|
3078
|
-
* @param {string} type -
|
|
3079
|
-
* @param {boolean} includeOnlyWithoutLocation -
|
|
3080
|
-
* @param {number} locationId -
|
|
3081
|
-
* @param {number} managedBy -
|
|
3082
|
-
* @param {number} page -
|
|
3083
|
-
* @param {number} pageSize -
|
|
3601
|
+
* @param {string} search - Gets VPN credentials that can be associated to locations.
|
|
3602
|
+
* @param {string} type - Gets VPN credentials that can be associated to locations.
|
|
3603
|
+
* @param {boolean} includeOnlyWithoutLocation - Gets VPN credentials that can be associated to locations.
|
|
3604
|
+
* @param {number} locationId - Gets VPN credentials that can be associated to locations.
|
|
3605
|
+
* @param {number} managedBy - Gets VPN credentials that can be associated to locations.
|
|
3606
|
+
* @param {number} page - Gets VPN credentials that can be associated to locations.
|
|
3607
|
+
* @param {number} pageSize - Gets VPN credentials that can be associated to locations.
|
|
3084
3608
|
* @param {getCallback} callback - a callback function to return the result
|
|
3085
3609
|
*/
|
|
3086
3610
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -3115,7 +3639,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3115
3639
|
const reqObj = {
|
|
3116
3640
|
payload: bodyVars,
|
|
3117
3641
|
uriPathVars: pathVars,
|
|
3118
|
-
uriQuery: queryParams
|
|
3642
|
+
uriQuery: queryParams,
|
|
3643
|
+
authData: this.getObfuscatedKey()
|
|
3119
3644
|
};
|
|
3120
3645
|
|
|
3121
3646
|
try {
|
|
@@ -3149,7 +3674,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3149
3674
|
* @summary Adds VPN credentials that can be associated to locations
|
|
3150
3675
|
*
|
|
3151
3676
|
* @function postVpnCredentials
|
|
3152
|
-
* @param {object} vpnCred -
|
|
3677
|
+
* @param {object} vpnCred - Adds VPN credentials that can be associated to locations. When invoked with a partner API key, it automatically sets the managedBy attribute to the partner associated with the key.
|
|
3153
3678
|
* @param {getCallback} callback - a callback function to return the result
|
|
3154
3679
|
*/
|
|
3155
3680
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -3184,7 +3709,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3184
3709
|
const reqObj = {
|
|
3185
3710
|
payload: bodyVars,
|
|
3186
3711
|
uriPathVars: pathVars,
|
|
3187
|
-
uriQuery: queryParams
|
|
3712
|
+
uriQuery: queryParams,
|
|
3713
|
+
authData: this.getObfuscatedKey()
|
|
3188
3714
|
};
|
|
3189
3715
|
|
|
3190
3716
|
try {
|
|
@@ -3218,7 +3744,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3218
3744
|
* @summary Bulk delete VPN credentials up to a maximum of 100 credentials per request
|
|
3219
3745
|
*
|
|
3220
3746
|
* @function postVpnCredentialsbulkDelete
|
|
3221
|
-
* @param {object} ids -
|
|
3747
|
+
* @param {object} ids - Bulk delete VPN credentials up to a maximum of 100 credentials per request. The response returns the VPN IDs that were successfully deleted.
|
|
3222
3748
|
* @param {getCallback} callback - a callback function to return the result
|
|
3223
3749
|
*/
|
|
3224
3750
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -3253,7 +3779,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3253
3779
|
const reqObj = {
|
|
3254
3780
|
payload: bodyVars,
|
|
3255
3781
|
uriPathVars: pathVars,
|
|
3256
|
-
uriQuery: queryParams
|
|
3782
|
+
uriQuery: queryParams,
|
|
3783
|
+
authData: this.getObfuscatedKey()
|
|
3257
3784
|
};
|
|
3258
3785
|
|
|
3259
3786
|
try {
|
|
@@ -3287,7 +3814,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3287
3814
|
* @summary Gets the VPN credentials for the specified ID
|
|
3288
3815
|
*
|
|
3289
3816
|
* @function getVpnCredentialsvpnId
|
|
3290
|
-
* @param {number} vpnId -
|
|
3817
|
+
* @param {number} vpnId - Gets the VPN credentials for the specified ID.
|
|
3291
3818
|
* @param {getCallback} callback - a callback function to return the result
|
|
3292
3819
|
*/
|
|
3293
3820
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -3327,7 +3854,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3327
3854
|
const reqObj = {
|
|
3328
3855
|
payload: bodyVars,
|
|
3329
3856
|
uriPathVars: pathVars,
|
|
3330
|
-
uriQuery: queryParams
|
|
3857
|
+
uriQuery: queryParams,
|
|
3858
|
+
authData: this.getObfuscatedKey()
|
|
3331
3859
|
};
|
|
3332
3860
|
|
|
3333
3861
|
try {
|
|
@@ -3361,8 +3889,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3361
3889
|
* @summary Updates the VPN credentials for the specified ID
|
|
3362
3890
|
*
|
|
3363
3891
|
* @function putVpnCredentialsvpnId
|
|
3364
|
-
* @param {number} vpnId -
|
|
3365
|
-
* @param {object} vpnCred -
|
|
3892
|
+
* @param {number} vpnId - Updates the VPN credentials for the specified ID.
|
|
3893
|
+
* @param {object} vpnCred - Updates the VPN credentials for the specified ID.
|
|
3366
3894
|
* @param {getCallback} callback - a callback function to return the result
|
|
3367
3895
|
*/
|
|
3368
3896
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -3402,7 +3930,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3402
3930
|
const reqObj = {
|
|
3403
3931
|
payload: bodyVars,
|
|
3404
3932
|
uriPathVars: pathVars,
|
|
3405
|
-
uriQuery: queryParams
|
|
3933
|
+
uriQuery: queryParams,
|
|
3934
|
+
authData: this.getObfuscatedKey()
|
|
3406
3935
|
};
|
|
3407
3936
|
|
|
3408
3937
|
try {
|
|
@@ -3436,7 +3965,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3436
3965
|
* @summary Deletes the VPN credentials for the specified ID
|
|
3437
3966
|
*
|
|
3438
3967
|
* @function deleteVpnCredentialsvpnId
|
|
3439
|
-
* @param {number} vpnId -
|
|
3968
|
+
* @param {number} vpnId - Deletes the VPN credentials for the specified ID.
|
|
3440
3969
|
* @param {getCallback} callback - a callback function to return the result
|
|
3441
3970
|
*/
|
|
3442
3971
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -3476,7 +4005,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3476
4005
|
const reqObj = {
|
|
3477
4006
|
payload: bodyVars,
|
|
3478
4007
|
uriPathVars: pathVars,
|
|
3479
|
-
uriQuery: queryParams
|
|
4008
|
+
uriQuery: queryParams,
|
|
4009
|
+
authData: this.getObfuscatedKey()
|
|
3480
4010
|
};
|
|
3481
4011
|
|
|
3482
4012
|
try {
|
|
@@ -3510,13 +4040,13 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3510
4040
|
* @summary Gets information on locations
|
|
3511
4041
|
*
|
|
3512
4042
|
* @function getLocations
|
|
3513
|
-
* @param {string} search -
|
|
3514
|
-
* @param {boolean} sslScanEnabled -
|
|
3515
|
-
* @param {boolean} xffEnabled -
|
|
3516
|
-
* @param {boolean} authRequired -
|
|
3517
|
-
* @param {boolean} bwEnforced -
|
|
3518
|
-
* @param {number} page -
|
|
3519
|
-
* @param {number} pageSize -
|
|
4043
|
+
* @param {string} search - Gets locations only, not sub-locations. When a location matches the given search parameter criteria, only its parent location is included in the result set, not its sub-locations.
|
|
4044
|
+
* @param {boolean} sslScanEnabled - Gets locations only, not sub-locations. When a location matches the given search parameter criteria, only its parent location is included in the result set, not its sub-locations.
|
|
4045
|
+
* @param {boolean} xffEnabled - Gets locations only, not sub-locations. When a location matches the given search parameter criteria, only its parent location is included in the result set, not its sub-locations.
|
|
4046
|
+
* @param {boolean} authRequired - Gets locations only, not sub-locations. When a location matches the given search parameter criteria, only its parent location is included in the result set, not its sub-locations.
|
|
4047
|
+
* @param {boolean} bwEnforced - Gets locations only, not sub-locations. When a location matches the given search parameter criteria, only its parent location is included in the result set, not its sub-locations.
|
|
4048
|
+
* @param {number} page - Gets locations only, not sub-locations. When a location matches the given search parameter criteria, only its parent location is included in the result set, not its sub-locations.
|
|
4049
|
+
* @param {number} pageSize - Gets locations only, not sub-locations. When a location matches the given search parameter criteria, only its parent location is included in the result set, not its sub-locations.
|
|
3520
4050
|
* @param {getCallback} callback - a callback function to return the result
|
|
3521
4051
|
*/
|
|
3522
4052
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -3551,7 +4081,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3551
4081
|
const reqObj = {
|
|
3552
4082
|
payload: bodyVars,
|
|
3553
4083
|
uriPathVars: pathVars,
|
|
3554
|
-
uriQuery: queryParams
|
|
4084
|
+
uriQuery: queryParams,
|
|
4085
|
+
authData: this.getObfuscatedKey()
|
|
3555
4086
|
};
|
|
3556
4087
|
|
|
3557
4088
|
try {
|
|
@@ -3585,7 +4116,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3585
4116
|
* @summary Adds a new location
|
|
3586
4117
|
*
|
|
3587
4118
|
* @function postLocations
|
|
3588
|
-
* @param {object} location -
|
|
4119
|
+
* @param {object} location - Adds a new location. When invoked with a partner API key, it automatically sets the managedBy attribute to the partner associated with the key.
|
|
3589
4120
|
* @param {getCallback} callback - a callback function to return the result
|
|
3590
4121
|
*/
|
|
3591
4122
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -3620,7 +4151,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3620
4151
|
const reqObj = {
|
|
3621
4152
|
payload: bodyVars,
|
|
3622
4153
|
uriPathVars: pathVars,
|
|
3623
|
-
uriQuery: queryParams
|
|
4154
|
+
uriQuery: queryParams,
|
|
4155
|
+
authData: this.getObfuscatedKey()
|
|
3624
4156
|
};
|
|
3625
4157
|
|
|
3626
4158
|
try {
|
|
@@ -3654,7 +4186,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3654
4186
|
* @summary Bulk delete locations up to a maximum of 100 locations per request
|
|
3655
4187
|
*
|
|
3656
4188
|
* @function postLocationsbulkDelete
|
|
3657
|
-
* @param {object} LocationIds -
|
|
4189
|
+
* @param {object} LocationIds - Bulk delete locations up to a maximum of 100 users per request. The response returns the location IDs that were successfully deleted.
|
|
3658
4190
|
* @param {getCallback} callback - a callback function to return the result
|
|
3659
4191
|
*/
|
|
3660
4192
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -3689,7 +4221,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3689
4221
|
const reqObj = {
|
|
3690
4222
|
payload: bodyVars,
|
|
3691
4223
|
uriPathVars: pathVars,
|
|
3692
|
-
uriQuery: queryParams
|
|
4224
|
+
uriQuery: queryParams,
|
|
4225
|
+
authData: this.getObfuscatedKey()
|
|
3693
4226
|
};
|
|
3694
4227
|
|
|
3695
4228
|
try {
|
|
@@ -3723,10 +4256,10 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3723
4256
|
* @summary Gets a lightweight list of locations
|
|
3724
4257
|
*
|
|
3725
4258
|
* @function getLocationslite
|
|
3726
|
-
* @param {boolean} sslScanEnabled -
|
|
3727
|
-
* @param {string} search -
|
|
3728
|
-
* @param {number} page -
|
|
3729
|
-
* @param {number} pageSize -
|
|
4259
|
+
* @param {boolean} sslScanEnabled - Gets a lightweight list of locations.
|
|
4260
|
+
* @param {string} search - Gets a lightweight list of locations.
|
|
4261
|
+
* @param {number} page - Gets a lightweight list of locations.
|
|
4262
|
+
* @param {number} pageSize - Gets a lightweight list of locations.
|
|
3730
4263
|
* @param {getCallback} callback - a callback function to return the result
|
|
3731
4264
|
*/
|
|
3732
4265
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -3761,7 +4294,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3761
4294
|
const reqObj = {
|
|
3762
4295
|
payload: bodyVars,
|
|
3763
4296
|
uriPathVars: pathVars,
|
|
3764
|
-
uriQuery: queryParams
|
|
4297
|
+
uriQuery: queryParams,
|
|
4298
|
+
authData: this.getObfuscatedKey()
|
|
3765
4299
|
};
|
|
3766
4300
|
|
|
3767
4301
|
try {
|
|
@@ -3795,7 +4329,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3795
4329
|
* @summary Gets the location information for the specified ID
|
|
3796
4330
|
*
|
|
3797
4331
|
* @function getLocationslocationId
|
|
3798
|
-
* @param {number} locationId -
|
|
4332
|
+
* @param {number} locationId - Gets the location information for the specified ID.
|
|
3799
4333
|
* @param {getCallback} callback - a callback function to return the result
|
|
3800
4334
|
*/
|
|
3801
4335
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -3835,7 +4369,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3835
4369
|
const reqObj = {
|
|
3836
4370
|
payload: bodyVars,
|
|
3837
4371
|
uriPathVars: pathVars,
|
|
3838
|
-
uriQuery: queryParams
|
|
4372
|
+
uriQuery: queryParams,
|
|
4373
|
+
authData: this.getObfuscatedKey()
|
|
3839
4374
|
};
|
|
3840
4375
|
|
|
3841
4376
|
try {
|
|
@@ -3869,8 +4404,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3869
4404
|
* @summary Updates the location information for the specified ID
|
|
3870
4405
|
*
|
|
3871
4406
|
* @function putLocationslocationId
|
|
3872
|
-
* @param {number} locationId -
|
|
3873
|
-
* @param {object} location -
|
|
4407
|
+
* @param {number} locationId - Updates the location information for the specified ID.
|
|
4408
|
+
* @param {object} location - Updates the location information for the specified ID.
|
|
3874
4409
|
* @param {getCallback} callback - a callback function to return the result
|
|
3875
4410
|
*/
|
|
3876
4411
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -3910,7 +4445,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3910
4445
|
const reqObj = {
|
|
3911
4446
|
payload: bodyVars,
|
|
3912
4447
|
uriPathVars: pathVars,
|
|
3913
|
-
uriQuery: queryParams
|
|
4448
|
+
uriQuery: queryParams,
|
|
4449
|
+
authData: this.getObfuscatedKey()
|
|
3914
4450
|
};
|
|
3915
4451
|
|
|
3916
4452
|
try {
|
|
@@ -3944,7 +4480,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3944
4480
|
* @summary Deletes the location for the specified ID
|
|
3945
4481
|
*
|
|
3946
4482
|
* @function deleteLocationslocationId
|
|
3947
|
-
* @param {number} locationId -
|
|
4483
|
+
* @param {number} locationId - Deletes the location for the specified ID.
|
|
3948
4484
|
* @param {getCallback} callback - a callback function to return the result
|
|
3949
4485
|
*/
|
|
3950
4486
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -3984,7 +4520,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
3984
4520
|
const reqObj = {
|
|
3985
4521
|
payload: bodyVars,
|
|
3986
4522
|
uriPathVars: pathVars,
|
|
3987
|
-
uriQuery: queryParams
|
|
4523
|
+
uriQuery: queryParams,
|
|
4524
|
+
authData: this.getObfuscatedKey()
|
|
3988
4525
|
};
|
|
3989
4526
|
|
|
3990
4527
|
try {
|
|
@@ -4036,7 +4573,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
4036
4573
|
|
|
4037
4574
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
4038
4575
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
4039
|
-
const reqObj =
|
|
4576
|
+
const reqObj = { authData: this.getObfuscatedKey() };
|
|
4040
4577
|
|
|
4041
4578
|
try {
|
|
4042
4579
|
// Make the call -
|
|
@@ -4069,8 +4606,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
4069
4606
|
* @summary Gets a full (i.e., complete) or summary detail report for an MD5 hash of a file that was analyzed by Sandbox
|
|
4070
4607
|
*
|
|
4071
4608
|
* @function getSandboxreportmd5Hash
|
|
4072
|
-
* @param {string} md5Hash -
|
|
4073
|
-
* @param {string} details -
|
|
4609
|
+
* @param {string} md5Hash - Get a full (i.e., complete) or summary detail report for an MD5 hash of a file that was analyzed by Sandbox.
|
|
4610
|
+
* @param {string} details - Get a full (i.e., complete) or summary detail report for an MD5 hash of a file that was analyzed by Sandbox.
|
|
4074
4611
|
* @param {getCallback} callback - a callback function to return the result
|
|
4075
4612
|
*/
|
|
4076
4613
|
/* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
|
|
@@ -4110,7 +4647,8 @@ class Zscaler extends AdapterBaseCl {
|
|
|
4110
4647
|
const reqObj = {
|
|
4111
4648
|
payload: bodyVars,
|
|
4112
4649
|
uriPathVars: pathVars,
|
|
4113
|
-
uriQuery: queryParams
|
|
4650
|
+
uriQuery: queryParams,
|
|
4651
|
+
authData: this.getObfuscatedKey()
|
|
4114
4652
|
};
|
|
4115
4653
|
|
|
4116
4654
|
try {
|
|
@@ -4162,7 +4700,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
4162
4700
|
|
|
4163
4701
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
4164
4702
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
4165
|
-
const reqObj =
|
|
4703
|
+
const reqObj = { authData: this.getObfuscatedKey() };
|
|
4166
4704
|
|
|
4167
4705
|
try {
|
|
4168
4706
|
// Make the call -
|
|
@@ -4213,7 +4751,7 @@ class Zscaler extends AdapterBaseCl {
|
|
|
4213
4751
|
|
|
4214
4752
|
/* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
|
|
4215
4753
|
// set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
|
|
4216
|
-
const reqObj =
|
|
4754
|
+
const reqObj = { authData: this.getObfuscatedKey() };
|
|
4217
4755
|
|
|
4218
4756
|
try {
|
|
4219
4757
|
// Make the call -
|