| PST SDK 6.0.0.0-272350a

CloseImageStream

Close all image streams currently opened through the REST API. This is useful when too many image streams are still opened. At maximum, 2 image streams can be opened through the REST API. When closing the streams like this, some consumers of the event stream, such as the JavaScript EventSource EventListener, will automatically try to reconnect after a timeout period. Be aware that only the first 2 clients attempting to connect will succeed. When closing a stream and opening a new one does not work, check if the old stream was not automatically re-opened.

Note
  If no other image stream is opened (through the PST SDK or The PST Client application) or reopened within 4 seconds, the PST Tracker will automatically disable the image transfer.

Endpoint

      POST /PSTapi/CloseImageStream HTTP/1.1
      Host: address:port

Response

Returns a status message.

Verification table

Status Code | Content Example | Meaning
--- | --- | ---
200 | {"message":"Image streams successfully closed"} | Success message
500 | {"message":"UnhandledError: "} | The server is in an undefined state and should be restarted