Skip to Main Content
Cognex 支持中心
LogoLogo

How To Open a Session Via HTTP With In-Sight Vision Suite Cameras

How to open a new session for a user with WebSDK via HTTP

1/01/01

Question

How do I open a session with WebSDK via HTTP?

 

Answer
To edit values and make other changes via WebSDK (API) using HTTP, we need to:

  • Open a session for new user (sessionID)
  • Log in as a privileged user setup via In-Sight Vision Suite
     

To create a new sessionID, we have to connect to the camera via HTTP using additional software. For testing purposes, use Postman.

  1. Send POST command to camera: 
            POST <cameraIP>/cam0/hmi/openSession
  • In reply, we will set SessionID with HTTP status 200 OK
webskd-how-to-open-session-via-http-with-in-sight-vision-suite-cameras-img1

2. Send a POST command to log in as an admin. The SessionID changes every time a new session is opened.
      POST <cameraIP>/cam0/hmi/hs/~c973adfd/login?argsJson=["admin","",false,false]

  • You should get a reply FULL with HTTP 200 OK
webskd-how-to-open-session-via-http-with-in-sight-vision-suite-cameras-img2

相关资源