Remote Source Type to Pull CGI Data

I have some thermal camera that can push data through CGI that is similar to REST call.

Wanna ask whether Vantiq can create a source type from CGI Request? This CGI accessible through GET method with Digest Authorization.

For example I have this URI:
http://<server>/cgi-bin/eventManager.cgi?action=attach&codes=%5BAnatomyTempDetect%2CHeatImagingTemper%5D&heartbeat=5

What I already tried is create new source with Source Type = Remote and then fill all required fields like below but when trying with Test Data Receipt it didn’t work:

(This is the config as a JSON)
{
“passwordType”: “string”,
“username”: “<someusername>”,
“password”: “<somepassword>”,
“pollingInterval”: 5,
“uri”: “<server>/cgi-bin/snapManager.cgi?action=attachFileProc&Flags[0]=Event&Events=[AnatomyTempDetect%2CHeatImagingTemper]&heartbeat=5”,
“query”: {
“query”: {
“action”: “attachFileProc”,
“Flags[0]”: “Event”,
“Events”: “[AnatomyTempDetect%2CHeatImagingTemper]”,
“heartbeat”: “5”
},
“headers”: {
“Authorization”: “Digest”
}
},
“requestDefaults”: {
“headers”: {
“Authorization”: “Digest”
},
“query”: {
“action”: “attachFileProc”,
“Flags[0]”: “Event”,
“Events”: “[AnatomyTempDetect%2CHeatImagingTemper]”,
“heartbeat”: “5”
}
}
}

Any idea about this?
Need advice from you.

Thanks.

Posted: August 27, 2020 at 3:57 am
Replies: 2
Aug 28, 2020
Posted by Ken

Hello Fitra,

Can you provide a few more details about your problem?

1. Do you see any output from your source?  Have you created a procedure that does a SELECT on the source?

2. What do you expect the response to be?  What format is the response in? VANTIQ only supports JSON, XML or plain text.

3. How do you authenticate?  With a plain text user name and password?  I see “Digest” in your description.  How is that used?

4. Have you called the same service by using a tool like Postman or ARC (A REST Client)?  What were your results?

Ken

Oct 2, 2020
Posted by Patrick Burma

Try adding a procedure that uses a select on the remote source and if you have issues make sure to add the withFullResponse option at the end of your Rest call to get any additional header errors.

https://internal.vantiq.com/docs/system/sources/remote/index.html#receiving-the-full-response

Just add a asFullresponse=true to your with clause.

Per Kens comment if you can curl the web service or postman it then the Vantiq remote source can most likely connect to it as well.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
© Vantiq 2024 All rights reserved  •  Vantiq Corporation’s Privacy Policy and Cookie Policy