API - Session Status

Support Center > API Integration

Published 01/20/2017 at 6:25am UTC

Page viewed 37033 times

Details

How can I determine whether a session is currently active? (Applicable to customers using Zoom integration only.)

Answer

Session Status API vs Webhook

There are two methods you can use to determine the status of a session:

  • Webhook (have status pushed to you)
  • Status API (pull status via an API call)

The proper method to use will depend on your use case, but most use cases will involve your taking some action when a session starts or ends; in these cases, you should use the webhook if possible. To use the webhook, see the article Webhooks - Session Status.

These methods work only with our Zoom videoconferencing platform. 

 

Session Status API

GET https://api.securevideo.com/status/12345 (where 12345 is the Session ID); or,

GET https://api.securevideo.com/status/0?externalSessionId=YYYYY (where YYYYY is the ExternalSessionId of a Session in your EHR/PM system)

Gets the current status of any session. This will either be one whose SecureVideo Session ID you have previously gathered from the Session API, or the external Session ID that you passed in previously via the Session API.

The returned status will be in JSON, for example:

{
"SessionID": 12345,
"SessionStatus": "STARTED"
}

The possible values for SessionStatus are:

  • NOT_STARTED: The session has never been started. Note that if any session host tests a session prior to its start time, even if that session host is the only one to connect to the session at that time(e.g., she quickly tests her camera and then disconnects), the SessionStatus thereafter will be "STARTED" or "ENDED". The status of "NOT_STARTED" means there has been no successful connection to the session by any participant, at any time.
  • STARTED: The session has been started and is ongoing. There is at least one active connection to the session.
  • ENDED: The session has been started and is no longer ongoing. There are no active connections to the session. Note that even if a session is ended, it can be restarted and then ended again later. This is not uncommon, and can happen in the event of a dropped connection, or participants deciding to have a quick follow-up session using the same session they used previously.

 

Accuracy of Session Status API

Session status is accurate the vast majority of the time, but is not guaranteed to be real-time in all cases. Occasionally, networking and/or endpoint conditions can cause a delay in our reporting status to you.

 

 

This article was last reviewed by our Support team on June 8, 2021.