Eric Williams | Here you go. First you need to login and get yoru cookie via the API with the curl commands below (which assumes HTTP communication): $ cat aaa.sh #!/bin/bash curl -H "Content-Type: text/xml" -N -s -d "<aaaLogin inName="admin" inPassword="abc123" />" http://1.2.3.4/nuova $ ./aaa.sh <aaaLogin cookie="" response="yes" outCookie="1354316387/74eed11a-35d2-48a1-b569-f75c25ed1482" outRefreshPeriod="600" outPriv="admin,read-only" outDomains="org-root" outChannel="noencssl" outEvtChannel="noencssl" outSessionId="" outVersion="2.1(1a)"> </aaaLogin> Then take the cookie and use it with the following script as illustrated below: $ cat topsys.sh #!/bin/bash COOKIE=$1 curl -H "Content-Type: text/xml" -N -s -d '<configResolveClass cookie="$COOKIE" classId="topSystem" inHierarchical="true" />' http://1.2.3.4/nuova $ ./topsys.sh "1354316387/74eed11a-35d2-48a1-b569-f75c25ed1482" > topsys.out As you can see the file I was returned was 1.9 MB: $ ls -alh topsys.out -rw-r--r-- 1 ericwill staff 1.9M Dec 5 12:56 topsys.out |
| Please sign in to flag this as inappropriate. |