I am trying to connect to an API and need some help
Using RHEL 7 and Universe 11.3.4
The curl example they provided works in RHEL.
curl -X 'GET'
'https://stagingapi.vagustracker.com/CoreVagusAPI/trip/AvailableTrips?vagusAPIKey=1A2B3C-1533-CMBD-8537-123456789'
-H 'accept: text/plain'
This is my BASIC Code
URL = "https://stagingapi.vagustracker.com/CoreVagusAPI/trip/AvailableTrips"
KEY = '1A2B3C-1533-CMBD-8537-123456789'
X = addAuthenticationRule(X.CONTEXT,2, "VerificationStrength", "generous")
X.DEPTH = 2
X.SERVER.OR.CLIENT = 2 ; * CLIENT
X.RTN.CODE = setAuthenticationDepth(X.CONTEXT, X.DEPTH, X.SERVER.OR.CLIENT)
X.RTN.CODE = addAuthenticationRule(X.CONTEXT, 2, "ServerName", "stagingapi.vagustracker.com")
HTTP.METHOD="GET"
X.RTN.CODE = createSecureRequest(URL,HTTP.METHOD,X.HANDLE,X.CONTEXT)
*X.RTN.CODE = setRequestHeader(X.HANDLE, "Content-Type", "application/json")
X.RTN.CODE = setRequestHeader(X.HANDLE, "Content-Type", "text/plain")
X.RTN.CODE = setRequestHeader(X.HANDLE, "vagusAPIKey",KEY)
X.RTN.CODE = submitRequest(X.HANDLE,'','',X.RESPONSE.HEADERS,X.RESPONSE.DATA,X.HTTP.STATUS)
When I added the ServerName I could see I was connecting with the service but I think it does not like my key configuration.
Jon Card
Combined Transport Inc




