Hi Jerry,
With some help from Infor, here is a sample of what I’m using to call the Global Monitor Webservice.
catch { curl::transfer -url https://intenggmapp01.corp.ad.sentara.com/gmx/rest/views/hci
-verbose 1
-errorbuffer strCurlError
-sslverifypeer 0
-httpheader [list “Authentication: basic [encode :]” “User-Agent: AppName:Interface Engine” “Accept: application/json”]
-bodyvar ::strBody
-headervar ::strHeader
-cookiejar [file join $::HciSiteDir jmcookie.txt]
} strResult
In my case the first call logged in and setup the cookiejar. The encoding of the username and password was a GM requirement.
catch { curl::transfer -url https://intenggmapp01.corp.ad.sentara.com/gmx/rest/view/33
-verbose 1
-errorbuffer strCurlError
-httpheader [list “User-Agent: AppName:Interface Engine” “Accept: application/json”]
-sslverifypeer 0
-bodyvar ::strBody
-cookiefile [file join $::HciSiteDir jmcookie.txt]
} strResult
All calls after use the cookie file to pass the authenticated session info.
catch { curl::transfer -url https://intenggmapp01.corp.ad.sentara.com/gmx/rest/session
-verbose 1
-errorbuffer strCurlError
-httpheader [list “User-Agent: AppName:Interface Engine” “Accept: application/json”]
-sslverifypeer 0
-customrequest DELETE
-cookiefile [file join $::HciSiteDir jmcookie.txt]
} strResult
This final call deletes the session and logs you out. This part will be webservice dependent.
Hopefully, this helps.
John Mercogliano
Sentara Healthcare
Hampton Roads, VA