ICS/ IPS Configurations Using REST APIs
session management getting active sessions to get details of up to 200 active users to fetch next set of 200 active users use 'https //\<ics ip>/api/v1/system/active users?number=200\&start=201' by default, the gateway retrieves a maximum of 200 users per request the field is last recordcan be used in script to get the list of all the active users in a loop is last record set to false, if there are more users it sets to true, when the gateway returned the last list of users request curl x 'get' \\ 'https //\<ics ip>/api/v1/system/active users?number=200\&start=0' \\ \ header 'authorization basic dmt5m3zjzmnpcwzqejd0zct1ewsvexrjylm4vkizk0kwdhhlvupzugryrt06' h 'accept application/json' response { "active users" { "active user records" { "active user record" \[ { "active secondary user name" null, "active user name" "admindb", "agent type" "mozilla/5 0 (macintosh; intel mac os x 10 15; rv 109 0) gecko/20100101 firefox/118 0", "authentication realm" "admin users", "browser id" "2b420cd0c4fee298c621793205950c9c", "device id" null, "endpoint security status" "not applicable\npassed policies \nfailed policies \neliminated roles ", "events" 0, "hc failed reasons" null, "login node" "localhost2", "mac address" null, "network connect ip" null, "network connect ipv6" null, "network connect transport mode" null, "ngp session id" "8a1a7a0a7e", "primary auth server name" "administrators", "primary auth server type" "local authentication", "pulse client version" null, "secondary auth server name" null, "secondary auth server type" null, "session id" "sid1d84203295b2db0f880820e5435de02e775c2cab00000000", "sign in time micro" "1699317427 743783", "source ip" "10 97 4 153", "user roles" " administrators", "user sign in time" "2023/11/07 06 07 09" }, { "active secondary user name" null, "active user name" "user1", "agent type" "mozilla/5 0 (windows nt 10 0; win64; x64) applewebkit/537 36 (khtml, like gecko) chrome/117 0 0 0 safari/537 36", "authentication realm" "users", "browser id" "c02a789746114cb426183cae3ade8513", "device id" null, "endpoint security status" "not applicable\npassed policies \nfailed policies \neliminated roles ", "events" 0, "hc failed reasons" null, "login node" "localhost2", "mac address" null, "network connect ip" null, "network connect ipv6" null, "network connect transport mode" null, "ngp session id" "173a229e9a", "primary auth server name" "system local", "primary auth server type" "local authentication", "pulse client version" null, "secondary auth server name" null, "secondary auth server type" null, "session id" "sid8d40db34996df948e870fb097b2b07c20555e8dc00000000", "sign in time micro" "1699327095 643966", "source ip" "10 96 224 53", "user roles" "users", "user sign in time" "2023/11/07 08 48 15" } ] }, "total matched record number" 2, "total returned record number" 2, "user login permission" true } } getting particular active session details request curl k u \<api key> https //\<ics ip>/api/v1/system/active users?name=user2 example curl k u k7z7xa54aknv1++kcviamcciurebgmsp+shkar4ecky= https //\<ip address>/api/v1/system/active users?name=user2 response content type application/json { "active users" { "active user records" { "active user record" \[ { "active user name" "user2", "agent type" "windows 7 google chrome", "authentication realm" "localrealm", "endpoint security status" "not applicable\npassed policies \nfailed policies \neliminated roles ", "events" 0, "login node" "localhost2", "network connect ip" null, "network connect transport mode" null, "session id" "sid68377b6249d24784edfdd07edfe61ee9934b556100000000", "user roles" "localrealm", "user sign in time" "2018/08/23 11 46 15" } ] }, "total matched record number" 1, "total returned record number" 1, "user login permission" true } } deleting a particular active session request curl k u \<api key> https //\<ics ip>/api/v1/system/active users/session/sid6dc167193b66fef812ef3fdba62729e53f8499f0c25df3be x delete example curl k u k7z7xa54aknv1++kcviamcciurebgmsp+shkar4ecky= https //\<ip address>/api/v1/system/active users/session/sid6dc167193b66fef812ef3fdba62729e53f8499f0c25df3be x delete response http/1 1 204 no content content length 0 content type application/json deleting all active sessions request curl k u \<api key> https //\<ics ip>/api/v1/system/active users?all x delete example curl k u k7z7xa54aknv1++kcviamcciurebgmsp+shkar4ecky= https //\<ip address>/api/v1/system/active users?all x delete response http/1 1 204 no content content length 0 content type application/json license management querying set of leased licenses in the license server system request get /api/v1/license/license server lease information http/1 1 host \<ip address> authorization basic c2czwujmc1lyujcwn2dasfh6rhdqme1ysnnhddzmcxlaovzknfnsdstazz06 content type application/json response http/1 1 200 ok content length 2210 content type application/json { "leased license counts" { "features" { "feature" \[ { "clients" { "client info" \[ { "leased count" 0, "name" "client1" } ] }, "name" "advanced mobile license onboarding", "total count" 0 }, { "clients" { "client info" \[ { "leased count" 0, "name" "client1" } ] }, "name" "cloud secure feature", "total count" 0 }, { "clients" { "client info" \[ { "leased count" 0, "name" "client1" } ] }, "name" "concurrent meeting users", "total count" 0 }, { "clients" { "client info" \[ { "leased count" 200, "name" "client1" }, { "leased count" 0, "name" "client2" } ] ], "name" "concurrent users", "total count" 200 }, { "clients" { "client info" \[ { "leased count" 0, "name" "client1" } ] }, "name" "named users", "total count" 0 }, { "clients" { "client info" \[ { "leased count" 0, "name" "client1" } ] }, "name" "premier java remote desktop applet", "total count" 0 } ] }, "machine id" "vaspmvkit1njnfpps", "query summary" {}, "release info" { "build number" "10124", "version" "9 0" }, "serial number" null, "signature" "hmx/w0vhdaabaaaapob/usuycwjslk7hexvmxk6+ksiptrjnjxrucijeef2ekwyqgbdgoxhzyagdl6ye29oow2krqlycm/hrpipuja==", "time stamp" "fri aug 24 14 43 00 2018" } } pulling state from a license server on a license client request put /api/v1/license/license client lease state http/1 1 host \<ip address> authorization basic owzbcvnkukrccedjsevqy3a0adz2unfwdjhxbexiyzuxrs91tvu1vnbnmd06 content type application/json { } while using above url (i e , license client lease state) by put operation, we provide empty json body as input, because put operation expects json body response http/1 1 200 ok content length 86 content type application/json { "result" { "info" \[ { "message" "success" } ] } } certificate management configuring certificates based on csr workflow request post /api/v1/system/certificates/device certificates http/1 1 host \<ip address> authorization basic awzum2vmzvztru9ynvzkvvz3efpiywdob3vctndxzekyaexubucyvu5ibz06 content type application/json { "cert" "miinzgibazccdyogcsqgsib3dqehaaccdxsegg13miinczccbgqgcsqgsib3dqehaaccbfueggxxmiif7tccbekgcyqgsib3dqemcgecoiie9jccbpiwhaykkozihvcnaqwbazaobajpygwuojoweaicb9aeggtqfjak4t3ftslkdoiotc/xvhsfrrkezsl09tn6tqyuvywfquzkpuig4v2pu1zovfotpplnovcmeil2hx7ozulpalcnsvgmaq61i+y5dbwmmxmo+bs8su36p6ys4d9bq3vimecahwzc/30hpf+gaaoysqimula34cnnefxpfxmlh0sxi1qeqalatmno5amqw1/nhsayjpwa5owrj5mkfhkh4kog893diywo1mliqlp7qseza4+uoswathih/jac1idmlb03kjr+oqaukxfq19ejvyrmmhcjhozarqwmgej6i+jpdjpuxvwvytq20nj4lndrnab5sp1oai0u5an49afy6krjnukueukemrpmumnjjufkdkkx1eqyoboqq50k1w9qfheoaolivgqa1ijznyc+bbs2tmw8rjwdsa7tvjhqkbcvjtiosfzsvjywjei9vzb+iubi+xchyrqp0w6el6hwg2b31inhmid5lt2gwqozt6iuvnlszfoofyfxszby0jc6nsbvzvmrnbgxe2fefa/qiga8gn5e9zciqibnxxw0jaoa+m3d+krr49xaoajgzpj3erqlvz1l/ngtix9w3h4mshd9xx43h6pbz0tgmu6l9nnwp/52y6/tmqqb5v0rhe0klj+ux00zuezmmeyeapx+sobqrmqmnvtgwapf7fzulcvaihomq184mjzarnnhopo1aqgesaa6tabtk2yzpbm+g5sagnjwxh0ijef/kwapqttiyc1tm3qq9espkqbpaqna4qetirli3r6gvntbng/g9m9mqh2mtnvonsolpjds+ttloo+bty9j2xsmk0wtxyonb67xjtrrsc1u1favp4rdyhpmm4jo3+vw1f4n8vzl+ryrrj0skja/jhm1elzvhxjhbwemfdsvfiqavfqgqky1ijwsjalneo2tepvjof2o+tofnydq4hk0tabvdwlrfmn3byi91+xioiolputegg8ztoadlpkag/lkbnwa37z3ehnfqc9qwu8dconbqo/hfxupj482jqa7lug3fp7apm4cudqegjwyns4/z+5+zeqq9q+/w9ke5y/a/5ukep9hrs3xpeee56qb98qpx3dxssdgxtd1l6r48dl+4isymlel0yfwxtj3vuyk5niujmzsui1tnlqoxim5z6nuz5/7g04mg/bzax3qt74mlrzvda7uzdjpyjlytgutidn562hvynrgto9p+08oh6c2dp4eognqcrhpp51zhd9vno0nyqtzmz0e4ohn4g7ud+6fwivasf9gpw1itwaf5122dr1llae3zfps5bzv7jrfy7lguth+l003mshmtyzaiw8nm1odm4hstqssxhwvb+wk4uiorvhq2cplj+71rgqi/kcm8hdzjouyzsrnqxqun/rs1o0w9vap88sg9mjiqynox4+bkytnn4xe4d3tefuygd2rmg2gdegbjoehh/kemrxk2z9olen7cadezqcp/7wgddlfb/nakmyio6dwkpzzdazgdsdd0grtky4ldtyjptkeadn+wxvjh6tutjgwghehi3xnvman1/rzzv80sgpbqwfeclck158yupryqvrn2cmjcilovbuaay6vq9jahkikt3lxzu6ukntkxqo3rhad9stfxcrqlryxgd8wewyjkozihvcnaqkvmqyebaeaaaawxqyjkozihvcnaqkumvaetgbsagualqa2agmanqa0aguamabjadqalqayagyanqbkac0anabjagyamaatageaywbiagualqbhadaaygbjaguazga4agiayga4ageamzbpbgkrbgeeayi3eqexxb5aae0aaqbjahiabwbzag8azgb0acaaugbtaeeaiabtaemaaabhag4abgblagwaiabdahiaeqbwahqabwbnahiayqbwaggaaqbjacaauabyag8adgbpagqazqbymiihzwyjkozihvcnaqcgoiihwdccb1qcaqawggdnbgkqhkig9w0bbwewhaykkozihvcnaqwbbjaobagqoob7+spclqicb9caggcgkohimremuqpog8xr59tfv0hodvnlfzxi7am6pnagwpimsxa6e69kz/dcey5v5xzkfw+nyazvgguzw26olgvz14t/j0z3kytkcn1mx+gvj5coadwfr21hirvwyndexkj6w1yh4omk/x4891afgvkizeeoewczigmwcqqh81hugir8aaflu2nekxclogofhqnn5k/ssksbtuubq80zgixh+48xs4ctze8veydxyqqe09sqxodtwtw7u5cv8qxwpgy+fsb4c/y/rcggtqmcl+nwsmcvhegfksq9zwjvniepsq1mhzk/e4zrqh/c+encccv/6zr5onnbz0fpvtgdccg0z9705zzgur5z83cgy53fchs2fdoqp6kqps7vekbym2nbbt6tx9zd4ue988eqwkm0dw/7/9resv6vnl+t9prjjq7pepkyl8octstpbinssj8f6z+r01/cxonpyz3pe2kwnec0xvuetcsfip5debofgacy4omjstlx57z5gqrvfso1v21njy6i0ev7e2agyn+kq2zcrtbzijqpoa0djljafodkbvpwrokxcejscfv/yjurtsgvcv1f1k/oyvf3edctxzjtoeuvklrysbanzatcche7tmljdvldv4la5nudd1plgqkwp911lom5aiekmguasflcq0rntho61afteeocgk1udortac+ttgzrayqgpuwq/j/cfzy2yhqzsg2+nofda4d2i2bw3symvaw45ntppynoply9j0irpfsouzbhquli8pvryicy3ehiv7mvzg812tmd1wovzzanonsb4plj+rq+al6yhl5o3/aq5v/n3b/ebrkdsstyroc1nvfxxwf+nltmecpumafb8jwdamovsumyd8j8b6cge2fmsr6yzzmmtcdispye1r+at4hd7v57k2jkctkffs23zu9qz6w30+sosr4dkhxvkofny8pgzkga5dd5ksytkjgkjhm5z6yrij8cc0wwprqk9jzvfxq0+t8rafua1qrbm6nnwf4g6z2vmdetuytnnxiziwe5e6yj1mxzn26dfat2anm8melpsnvaxvqhoczazodrmhyxg4ut+4rmazbxj7txtcnsqd/sw4wpop9jzroanfhxk2ukkfrs62216u6hcovcmj5d7ujb/4s80nziwa67ciky/89t4vezbwvs0dlq2cmiqveeufto4hq32ravrphijql0mh/fymivsfqeomuny/d/26rknivvp9xzdyd2zkmv5nnftbwc6uhhq76pwkrg5gsoudjuxhzy0dxigtcsuzwueudnm0iyvz2lvcrpytwaiur0nepcn1nvcehlxddqgsu1awsqmoodmmwymtm6mdkavlnn8qjpl742btihkmxtuvonxrgt4i+0jwgwlgny6sx3jaxiyzv85xt+cv5kdvmf822w6ctus5l8lwvbdac6wd+wmnqzgsqvsbj9jllkfxotlys863dddtendziytrckjeknloy8x0fln1fczguz8ssba6xwq4hjgwanpjbsvrejzcwogufqyuxtzub/miuszynsifwco4cwa4vqe4p1pjl56jnidpqwgqaljhtm7wsceibgdbfyjp75/vjr/a4pajcszmffiaynwm/zepfhzp0udxrnoptzfsf4xspgzepbhyxmfqg7f8sfaqq0iqlh0kpabd3vutrudgoffbvfrjim8uxunhkpysgy3gwehxadrohsoz0yj0a/ay5wwny7rjazo00ucmlgrvfxyjj9rqvcpphejnvmhlnqlt3dqeczh3tptr4xiluoxc6sqkvibhv7dep0nvza6juzcgonymcwi7/n6+bd1xhc6dg76igiuhhijz0jqhfioxqaak+72iv706qtvmyi+cpe4flrqhonujphat7+5eoq2wqwxb+kxk5/wh7/cio6pzsaueau0elddz/mex2oufigyvtywfpbo0fwztqkwvp7pl8e5wudkl9q+jyonzvaapchtdjf9/oove1g0rrq5nxzkqrrtbtekzsj5j66p107ux2r+q7mprsmwt8ergw8cexphoaikawsbpwat6ogh1mlethik++shxsira3nbdjrwku8q0e9wlcuyafxnqv4ptqaghadf/j2f2fombaw2jgh1kp9ugb54k+klrjoifceuqqh+j42bh2/c0jappjtwngn2jfqzuk2i3e0mvvnoepjmevpdxm1dzzhfnxel8d+lfmn1b4zntdnge0aruospr72rm0rx43ocu0w/nkl6dckhvizdco4psllxjebw/fbc2ws04/qxekwregwcr3fm17x4hztcrjosvj0bg6jap3f30os55bjqanfubm9yfzrc6rgnkshyiuifutmpwzbuiwcwqp29tnlsjwk91c0jb2oy6/2o9o7u78grlvgllsyynqehn8tlxp9mdswhzahbgurdgmcggqu9xdxdbt/logehzu/de0xaa6823yeffmeifaiptilvxcdnudn0ru1xc24agih0a==", "password" \<certifcicate password>, "internal interfaces" { "internal interface" \["\<internal port>", "vport1"] }, "external interfaces" { "external interface" \["\<external port>"] }, "management interface" true } response http/1 1 201 created content length 112 content type application/json { "result" { "info" \[ { "message" "operation successfully completed " } ] } } creating a csr for a device certificate request post /api/v1/system/certificates/device certificate csrs http/1 1 host \<ip address> authorization basic awzum2vmzvztru9ynvzkvvz3efpiywdob3vctndxzekyaexubucyvu5ibz06 content type application/json { "subject common name" "qa pcs company com", "key type" "ecdsa", "ecc curve" "p 384" } response http/1 1 201 ok content length 266 content type application/json { "result" { "info" \[ { "message" "created csr 'csr 164' successfully" }, { "message" "use post /api/v1/system/certificates/device certificate csrs/csr 164/certificate to upload the signed certificate" } ] } } deleting device certificate by its subject name request delete /api/v1/system/certificates/device certificates/srikrsa test saqacertserv com http/1 1 host \<ip address> authorization basic awzum2vmzvztru9ynvzkvvz3efpiywdob3vctndxzekyaexubucyvu5ibz06 content type application/json response http/1 1 204 no content content length 0 content type application/json system information and operations getting system information request get /api/v1/system/system information http/1 1 host \<ip address> authorization basic awzum2vmzvztru9ynvzkvvz3efpiywdob3vctndxzekyaexubucyvu5ibz06 content type application/json response http/1 1 200 ok content length 193 content type application/json { "rollback partition information" { "build" "2330", "os name" "ive sa", "os version" "9 1r2" }, "software inventory" { "software" { "build" "4520", "name" "ive os", "type" "operating system", "version" "9 1r4" } }, "system information" { "hardware model" "isa4000 v", "host name" "localhost2", "os name" "ive sa", "os version" "9 1r4", "serial number" "vasphjpeg824r1u0s" } } retrieving serial number and machine id request get /api/v1/system/system information http/1 1 host \<ip address> authorization basic czm3mzvdtfvybnfobfr5nhdnstfes3pisdhrmtvwr0plv2gwotlmymxhyz06 content type application/json response http/1 1 200 ok content length 193 content type application/json { "rollback partition information" { "build" "5801", "os name" "ive sa", "os version" "9 1r6" }, "software inventory" { "software" { "build" "6087", "name" "ive os", "type" "operating system", "version" "9 1r7" } }, "system information" { "cluster node" {}, "hardware model" "isa 4000", "host name" "node1", "machine id" "0312mb24a0ez504vs", "os name" "ive sa", "os version" "9 1r7", "serial number" "0312022017100103" } } getting health check status request get /api/v1/system/healthcheck host \<ip address> content type application/json response http/1 1 200 ok content type application/json { "message" "security gateway is accessible " } request get /api/v1/system/healthcheck?status=all http/1 1 host \<ip address> content type application/json response content type application/json { "cpu utilization4" 8, "ssl connection count" 0, "max licensed users reached" "no", "swap utilization" 1, "disk utilization" 1, "user count" 0, "vpn tunnel count" 0 } request get /api/v1/system/healthcheck?status=sbr http/1 1 host \<ip address> content type application/json response content type application/json { "sbr available" 1 } user realms realm based administrator user using administrator local authentication server request post /api/v1/realm auth http/1 1 host \<ip address> authorization basic ywrtaw4xomrhbmexmjm= content type application/json { "realm" "\<realm name>" } response http/1 1 200 ok content type application/json { "api key" "mjuwogqynzayowu3mwq2mznimtm2njg2mzawndg3mju=" } realm based administrator user using ad authentication server request post /api/v1/realm auth http/1 1 host \<ip address> authorization basic bmf6zwvyolbzzwn1cmuxmjmk content type application/json { "realm" "adminadrealm" } response http/1 1 200 ok content type application/json { "api key" "odrjotcxoty5ztlmytcwy2qwyzk1zdbjmwq5n2rmn2q=" } realm based administrator user using ldap authentication server request post /api/v1/realm auth http/1 1 host \<ip address> authorization basic bmf6zwvyolbzzwn1cmuxmjmk content type application/json { "realm" "ldaprealm" } response http/1 1 200 ok content type application/json { "api key" "ztqxntixotjhnmuwmjg3mwi5mjzkyme1mgm0mzdimdi=" } realm based administrator user using radius authentication server request post /api/v1/realm auth http/1 1 host \<ip address> authorization basic amfjazpqdw5pcgvy content type application/json { "realm" "radiusadminrealm" } response http/1 1 200 ok content type application/json { "api key" "mgmzzjjkzdzlymrlyzg0mde5nzkwyze1zgm5mmqyytq=" } realm based administrator user from a particular source ip request put /api/v1/configuration/administrators/admin realms/realm/adminlocalauthrealm/authentication policy/source ip/customized http/1 1 host \<ip address> authorization basic t1dfm056vtbpvel5t0dfeu16wxpoaku0wvrfek9ewxhoamrotvdvnfpqyz06 content type application/json { "customized" "selected ip" } response http/1 1 200 ok content length 124 content type →application/json { "result" { "info" \[ { "message" "operation succeeded without warning or error!" } ] } } request post /api/v1/configuration/administrators/admin realms/realm/adminlocalauthrealm/authentication policy/source ip/ips/ip http/1 1 host \<ip address> authorization basic t1dfm056vtbpvel5t0dfeu16wxpoaku0wvrfek9ewxhoamrotvdvnfpqyz06 content type application/json { "access" "allow", "address" "\<ip address>", "netmask" "255 255 255 255" } response http/1 1 201 created content length 124 content type application/json { "result" { "info" \[ { "message" "operation succeeded without warning or error!" } ] } } realm based administrator authorization role mapping to administrator role request put /api/v1/configuration/administrators/admin realms/realm/adminadrealm/role mapping rules http/1 1 host \<ip address> authorization basic tldvnfl6tmtovezqtkrfek1euxdpvgrotlrrmk9uwtbar0l3tkrnm1ptst06 content type application/json { "user selects role" "false", "rule" \[ { "roles" \[ " administrators" ], "stop rules processing" "true", "group" { "group names" \[ "pcs qa/systems" ] }, "name" "adminadrolemapping" } ], "user selects roleset" "false" } response http/1 1 200 okcontent length 124content type application/json { "result" { "info" \[ { "message" "operation succeeded without warning or error!" } ] } } specifying session validity for rest admin session request put /api/v1/configuration/administrators/admin roles/admin role/%2eadministrators/general/session options http/1 1 host \<ip address> authorization basic tldvnfl6tmtovezqtkrfek1euxdpvgrotlrrmk9uwtbar0l3tkrnm1ptst06 content type application/json { "idle timeout" "5" } response http/1 1 200 ok content length 124 content type application/json { "result" { "info" \[ { "message" "operation succeeded without warning or error!" } ] } } auth servers getting active directory search groups request get /api/v1/configuration/authentication/auth servers/auth server/adserver/ad/server catalog/groups http/1 1 host \<ip address> authorization basic ru9jahywdmlqvnjibdbqee9obtlyzdvodhhvs2fmesttvzbql1pkuxh6bz06 content type application/json response http/1 1 200 ok content length 294 content type application/json { "ad group" \[ { "group" "ics qa/core", "name" "ics qa/core", "sid" "s 1 5 21 3875260349 1888520165 453808128 1112" }, { "group" "ics qa/systems", "name" "ics qa/systems", "sid" "s 1 5 21 3875260349 1888520165 453808128 1108" } ] } adding search group to active directory request put /api/v1/configuration/authentication/auth servers/auth server/adserver/ad/server catalog/groups http/1 1 host \<ip address> authorization basic ru9jahywdmlqvnjibdbqee9obtlyzdvodhhvs2fmesttvzbql1pkuxh6bz06 content type application/json { "ad group" \[ { "group" "ics qa/systems", "name" "ics qa/systems" }, { "group" "ics qa/core", "name" "ics qa/core" } ] } response http/1 1 200 ok content length 124 content type application/json { "result" { "info" \[ { "message" "operation succeeded without warning or error!" } ] } } updating active directory group to update a group, first get already available list using get operation and append new group to it before put request put /api/v1/configuration/authentication/auth servers/auth server/adserver/ad/server catalog/groups http/1 1 host \<ip address> authorization basic ru9jahywdmlqvnjibdbqee9obtlyzdvodhhvs2fmesttvzbql1pkuxh6bz06 content type application/json { "ad group" \[ { "group" "ics qa/core", "name" "ics qa/core", "sid" "s 1 5 21 3875260349 1888520165 453808128 1112" }, { "group" "ics qa/systems", "name" "ics qa/systems", "sid" "s 1 5 21 3875260349 1888520165 453808128 1108" }, { "group" "pcs qa/client", "name" "pcs qa/client", "sid" "s 1 5 21 3875260349 1888520165 453808128 1113" } ] } response http/1 1 200 ok content length 124 content type application/json { "result" { "info" \[ { "message" "operation succeeded without warning or error!" } ] } } deleting active directory groups request put /api/v1/configuration/authentication/auth servers/auth server/adserver/ad/server catalog/groups http/1 1 host \<ip address> authorization basic ru9jahywdmlqvnjibdbqee9obtlyzdvodhhvs2fmesttvzbql1pkuxh6bz06 content type application/json { "ad group" \[ ] } response http/1 1 200 ok content length 124 content type application/json { "result" { "info" \[ { "message" "operation succeeded without warning or error!" } ] } } getting all ldap group list request get /api/v1/configuration/authentication/auth servers/auth server/ldapserver/ldap/server catalog/groups http/1 1 host \<ip address> authorization basic ru9jahywdmlqvnjibdbqee9obtlyzdvodhhvs2fmesttvzbql1pkuxh6bz06 content type application/json adding groups to ldap request put /api/v1/configuration/authentication/auth servers/auth server/ldapserver/ldap/server catalog/groups http/1 1 host \<ip address> authorization basic ru9jahywdmlqvnjibdbqee9obtlyzdvodhhvs2fmesttvzbql1pkuxh6bz06 content type application/json { "user group" \[ { "dn" "cn=administrators,cn=builtin,dc=pcs qa,dc=blrlab,dc=net", "group type" "static", "name" "administrators" }, { "dn" "cn=users,cn=builtin,dc=pcs qa,dc=blrlab,dc=net", "group type" "static", "name" "users" } ] } response http/1 1 200 ok content length 124 content type application/json { "result" { "info" \[ { "message" "operation succeeded without warning or error!" } ] } } updating ldap source group to update a group, first get already available list using get operation and append new group to it and then perform put operation request put /api/v1/configuration/authentication/auth servers/auth server/ldapserver/ldap/server catalog/groups http/1 1 host \<ip address> authorization basic ru9jahywdmlqvnjibdbqee9obtlyzdvodhhvs2fmesttvzbql1pkuxh6bz06 content type application/json { "user group" \[ { "dn" "cn=administrators,cn=builtin,dc=pcs qa,dc=blrlab,dc=net", "group type" "static", "name" "administrators" }, { "dn" "cn=users,cn=builtin,dc=pcs qa,dc=blrlab,dc=net", "group type" "static", "name" "users" }, { "dn" "cn=guests,cn=builtin,dc=pcs qa,dc=blrlab,dc=net", "group type" "static", "name" "guests" } ] } response http/1 1 200 ok content length 124 content type application/json { "result" { "info" \[ { "message" "operation succeeded without warning or error!" } ] } } deleting ldap source group request put /api/v1/configuration/authentication/auth servers/auth server/ldapserver/ldap/server catalog/groups http/1 1 host \<ip address> authorization basic ru9jahywdmlqvnjibdbqee9obtlyzdvodhhvs2fmesttvzbql1pkuxh6bz06 content type application/json { "user group" \[ ] } response http/1 1 200 ok content length 124 content type application/json { "result" { "info" \[ { "message" "operation succeeded without warning or error!" } ] } } clustering and high availability creating a cluster request put /api/v1/cluster http/1 1 host \<ip address> authorization basic tldvnfl6tmtovezqtkrfek1euxdpvgrotlrrmk9uwtbar0l3tkrnm1ptst06 content type application/json { "cluster name" "cluster1", "cluster password" "dana123", "member name" "nodea", "action" "create" } response http/1 1 200 ok content length 118 content type application/json { "result" { "info" \[ { "message" "created cluster 'cluster1' successfully" } ] } } adding a member to cluster request post /api/v1/cluster/members http/1 1 host \<ip address> authorization basic thi5bmxreu50ue04mwj6ohrhbjhfmw1pytvuv3v5mg5xn0oynmnwctrhbz06 content type application/json { "member name" "node225", "member ip" "\<ip address>", "member netmask" "\<ip address>", "member gateway" "\<ip address>", "member external ip" "\<ip address>", "member external netmask" "\<ip address>", "member external gateway" "\<ip address>" } response http/1 1 200 ok content length 125 content type application/json { "result" { "info" \[ { "message" "added member 'node225' to cluster successfully" } ] } } getting cluster status request get /api/v1/cluster http/1 1 host 10 209 114 228 authorization basic twn2cuezbfryqxcysjbsbgpkwtazdk1oa2ritdfluvjdujnndlq0ulrjdz06 content type application/json response http/1 1 200 ok content length 619 content type application/json { "members" \[ { "enabled" true, "external ip" "", "external network" "", "internal ip" "\<ip address>", "internal netmask" "\<ip address>", "name" "node225", "notes" "enabled, unreachable", "status code" "0x18" }, { "enabled" true, "external ip" "\<ip address>", "external network" "\<ip address>", "internal ip" "\<ip address>", "internal netmask" "\<ip address>", "name" "nodea", "notes" "leader", "status code" "0x19004" } ], "mode" "active/active", "name" "cluster1" } { "external vip ipv4" "\<ip address>", "external vip owner" "node 51 39", "internal vip ipv4" "\<ip address>", "internal vip owner" "node 51 39", "members" \[ { "enabled" true, "external ip" "\<ip address>", "external netmask" "\<ip address>", "internal ip" "\<ip address>", "internal netmask" "\<ip address>", "name" "node 51 39", "notes" "leader", "status code" "0x1b004" }, { "enabled" true, "external ip" "\<ip address>", "external netmask" "\<ip address>", "internal ip" "\<ip address>", "internal netmask" "\<ip address>", "name" "node something", "notes" "enabled, unreachable", "status code" "0x18" } ], "mode" "active/passive", "name" "test cluster" } deleting cluster member request delete /api/v1/cluster/members/node225 http/1 1 host \<ip address> authorization basic twn2cuezbfryqxcysjbsbgpkwtazdk1oa2ritdfluvjdujnndlq0ulrjdz06 content type application/json response http/1 1 200 ok content length 129 content type application/json { "result" { "info" \[ { "message" "removed member 'node225' from cluster successfully" } ] } } joining a cluster request put /api/v1/cluster http/1 1 host \<ip address> authorization basic skuyv1bavjrjcgxleelrmnnizxpyaje2devium9oa05wwddrwhh3mmpjzz06 content type application/json { "cluster name" "cluster", "cluster password" "xxxxx", "member address" "\<ip address>", "action" "join" } response http/1 1 200 ok content length 116 content type application/json { "result" { "info" \[ { "message" "joined cluster 'cluster' successfully" } ] } } vip failover request put /api/v1/cluster host \<ip address> authorization basic skuyv1bavjrjcgxleelrmnnizxpyaje2devium9oa05wwddrwhh3mmpjzz06 content type application/json { "action" "vip failover" } response in case of active passive cluster { "result" { "info" \[ { "message" "vip fail over initiated" } ] } } in case of active active cluster { "result" { "info" \[ { "message" "node not part of an active passive cluster invalid operation " } ] } } config management import xml configuration imports an xml configuration file into the ivanti connect secure (ics) system the import xml rest api follows the same validation and processing workflow as the import xml operation in the ics admin ui starting from ics 25 1 3 1 version this api is used for importing the xml config behavior differs when a second import request is submitted while another import is in progress rest api behavior the second request is queued and waits until the first import operation completes after the first import finishes, the second import begins automatically admin ui behavior the second import request is rejected and an error is displayed indicating that an import operation is already in progress request curl x 'post' \\ \ location 'https //\<ics ip>/api/v1/system/maintenance/import xml' \\ \ header 'authorization basic \<credentials>' \\ \ form 'file=@"/path/config xml"' \\ \ form 'password="\<password>"' response { "result" { "info" \[ { "message" "operation succeeded without warning or error!" } ] } } backing up binary configuration exports system and user configurations into one file as shown in the code snippet to export them individually use the following, password is optional get method for this api is no longer supported please use post instead to export only system config use post api/v1/system/binary configuration?export=system config\&password=\<password> to export only user config use post api/v1/system/binary configuration?export=user config\&password=\<password> request post api/v1/system/binary configuration?export=system config { password "xxxxx" } host \<ip address> authorization basic ds9uourjrwswzzvymtdieujqvnhaqnexzupttw9ndctidgzzmnczmmlzrt06 response http/1 1 200 ok content type text/html; charset=utf 8 content length 50753630 uesdbbqaaaaiae9vmu4j1asqz3cdakx3awakabwac3lzdgvtlmnmz1vucqadvuhb xl1bwvx1easaaqqaaaaabaaaaaaac4d0fwntma1olv2xgacodwmainefp2auivxv b1fhtptlc259gynpt7wwhtqkbp2y2+d1h1mtflqis8wbhytxp19d+sm+amx5ukeo gduggxgbreqmxmwosv8ybrvxibshmgo5bvqfuemvdnk3ob+s/g8+lipg5i2c3lvm w8hy3plq9cjhmrfsbftgytx2at85mgcsupxd2goqq9e138kri2hboywdzcjirusu restoring binary configuration (import=normal) the import normal mode will import the binary configuration excluding the ip, network configurations and cluster configuration the normal mode is similar to default option in binary import request put /api/v1/system/binary configuration?import=normal http/1 1 or put /api/v1/system/binary configuration http/1 1 host \<ip address> authorization basic ds9uourjrwswzzvymtdieujqvnhaqnexzupttw9ndctidgzzmnczmmlzrt06 content type text/html; charset=utf 8 response http/1 1 200 ok { "result" { "info" \[ { "message" "operation successfully completed " } ] } } error cases import mode specified is incorrect (other than normal or full) content length 100 content type application/json { "result" { "errors" \[ { "message" "invalid import mode" } ] } } content type is not a base 64 encoded binary configuration string content length 126 content type application/json { "result" { "errors" \[ { "message" "error failed to extract configuration files" } ] } } restoring binary configuration (import=full) the import full mode will import everything from the binary configuration provided in the body this is similar to full binary import request put /api/v1/system/binary configuration?import=full http/1 1 host \<ip address> authorization basic ds9uourjrwswzzvymtdieujqvnhaqnexzupttw9ndctidgzzmnczmmlzrt06 content type text/html; charset=utf 8 body data base64 configuration string as received in get request) uesdbbqaaaaiae9vmu4j1asqz3cdakx3awakabwac3lzdgvtlmnmz1vucqadvuhb xl1bwvx1easaaqqaaaaabaaaaaaac4d0fwntma1olv2xgacodwmainefp2auivxv b1fhtptlc259gynpt7wwhtqkbp2y2+d1h1mtflqis8wbhytxp19d+sm+amx5ukeo gduggxgbreqmxmwosv8ybrvxibshmgo5bvqfuemvdnk3ob+s/g8+lipg5i2c3lvm …… response http/1 1 200 ok content length 112 content type application/json { "result" { "info" \[ { "message" "operation successfully completed " } "errors" \[ ] } } error cases import mode specified is incorrect (other than normal or full) content length 100 content type application/json { "result" { { "message" "invalid import mode" } ] } } content type is not a base 64 encoded binary configuration string content length 126 content type application/json { "result" { "errors" \[ { "message" "error failed to extract configuration files" } ] } } getting config without ivanti packages (esap and client packages) request get /api/v1/configuration/authentication/endpoint/host checker/esaps?expand&\&excludepulsepackages http/1 1 host \<ip address> authorization basic ds9uourjrwswzzvymtdieujqvnhaqnexzupttw9ndctidgzzmnczmmlzrt06 content type application/json response http/1 1 200 ok content length 561 content type application/json { "active version" "3 3 5", "default version" "3 3 5", "esap" \[ { "esap version" "3 3 5", "last activated time" "sun 17 mar 2019 23 54 12 pdt", "upload time" "sun 17 mar 2019 23 53 35 pdt" }, { "esap version" "3 3 6", "last activated time" "never", "upload time" "mon 18 mar 2019 21 45 31 pdt" }, { "esap version" "3 3 7", "last activated time" "never", "upload time" "mon 18 mar 2019 21 46 12 pdt" } ], "force same esap" "false", "opswat sdk version" "4" } get apis to delete named users get /api/v1/license/named users gives two separate lists of ics named users on license server named users list on license client or independent ics get /api/v1/license/named users/\<pcs> gives list of ics named users on license server as required example of get api to fetch users list on independent ics requestget https //\<ip address>/api/v1/license/named users http/1 1 authorization basic content type application/json response http/1 1 200 ok content length 933 content type application/json { "named users" \[ { "ip" "x x x x", "last agent type" "secure/8 3 4 0 (windows) ivanti/10 0 4 1", "last role" \[ "users" ], "last sign in" "2021 07 16 19 05 51", "user" "dev1" }, { "ip" " x x x x ", "last agent type" "secure/8 3 4 0 (windows) ivanti/10 0 4 1", "last role" \[ "users" ], "last sign in" "2021 07 16 19 05 51", "user" "dev4" }, { "ip" " x x x x ", "last agent type" "ivanti/8 3 4 0 (windows) ivanti/10 0 4 1", "last role" \[ "users" ], "last sign in" "2021 07 16 19 05 51", "user" "dev3" }, { "ip" " x x x x", "last agent type" "ivanti/8 3 4 0 (windows) ivanti/10 0 4 1", "last role" \[ "users" ], "last sign in" "2021 07 16 19 05 51", "user" "dev2" } ] } example of get api to fetch users list on license server which gives two separate lists of ics named users request get https //\<ip address>/api/v1/license/named users http/1 1 authorization basic content type application/json response http/1 1 200 ok content length 1604 content type application/json { "pcs" { "named users" \[ { "appliance" "ics 5", "last login ip" " x x x x", "last login time" "2021 07 16 19 20 13", "login realm" "users", "role" "users", "user" "dev1", "user agent" "ivanti/8 3 4 0 (windows) ivanti/10 0 4 1" }, { "appliance" "ics 5", "last login ip" " x x x x", "last login time" "2021 07 16 19 20 13", "login realm" "users", "role" "users", "user" "dev2", "user agent" "ivanti/8 3 4 0 (windows) ivanti/10 0 4 1" }, { "appliance" "ics 5", "last login ip" " x x x x", "last login time" "2021 07 16 19 20 13", "login realm" "users", "role" "users", "user" "dev3", "user agent" "ivanti/8 3 4 0 (windows) ivanti/10 0 4 1" }, { "appliance" "ics 5", "last login ip" " x x x x", "last login time" "2021 07 16 19 20 13", "login realm" "users", "role" "users", "user" "dev4", "user agent" "ivanti/8 3 4 0 (windows) ivanti/10 0 4 1" } ] }, "pps" { "named users" \[ { "appliance" "ips 149", "last login ip" " x x x x", "last login time" "2021 07 17 05 26 48", "login realm" "users", "role" "users", "user" "test1", "user agent" "mozilla/5 0 (windows nt 10 0; win64; x64) applewebkit/537 36 (khtml, like gecko) chrome/91 0 4472 124 safari/537 36" } ] } } put apis to delete single/ multiple user put /api/v1/license/named users/\<ics> not applicable to license client or independent ics delete list of ics named users on license server as required content type json { "action" "remove", "users" "\<list of users>" } put /api/v1/license/named users not applicable on license server delete named users list on license client or independent ics content type json { "action" "remove", "delete active sessions" "true|false" "users" "\<list of users>" } put apis to remove all users put /api/v1/license/named users/\<ics> not applicable to license client or independent ics delete list of ics named users on license server as required content type json { "action" "remove all" } put /api/v1/license/named users not applicable on license server delete named users list on license client or independent ics content type json { "action" "remove all", "delete active sessions" "true|false" } delete active sessions is an optional argument in put apis in case it is not specified, it will be considered as false for action remove all, even if the list of users is given, it is ignored and not processed example of put api to delete named users list on independent ics requestput https //\<ip address>/api/v1/license/named users http/1 1 authorization basic content type application/json { "action" "remove", "delete active sessions" "true", "users" \["dev1", "dev2"] } response http/1 1 200 ok content length 128 content type application/json { "result" { "info" \[ { "message" "deleted user(s) and corresponding active sessions" } ] } } example of put api to delete named users list of ics client from license server request put https //\<ip address>/api/v1/license/named users/pcs http/1 1 authorization basic content type application/json { "action" "remove", "users" \["dev1", "dev3"] } response http/1 1 200 ok content length 94 content type application/json { "result" { "info" \[ { "message" "deleted user(s)" } ] } } example of put api to delete all named users list on independent ics request put https //\<ip address>/api/v1/license/named users http/1 1 authorization basic content type application/json { "action" "remove all", "delete active sessions" "false" } response http/1 1 200 ok content length 98 content type application/json { "result" { "info" \[ { "message" "deleted all user(s)" } ] } }
