GetSessionById
get_session_by_id(public_api_client, session_id)
Expand source code
get_session_by_id(public_api_client, session_id):
"""
Description
-----------
To get the details of a given session.
Args
----
public_api_client: QDC api client object.
session_id: Id of the session.
Returns
-------
string: State of the session. like completed, canceled etc.
None: In case of any failure.
Usages
------
session_id = "1234"
session_by_id = qdc_api.get_session_by_id(public_api_client, session_id)
"""
get_session_details = get_sessions_session_id.sync_detailed(session_id=session_id,
client=_get_client_with_new_trace_header(
public_api_client))
if get_session_details.status_code == 200:
response_data = get_session_details.content.decode('utf-8')
print(f"Session response: {response_data}")
return get_session_details
Description
To get the details of a given session.
Arguments
public_api_client: QDC api client object.
session_id: Id of the session.
Returns
string: State of the session. like completed, canceled etc.
None: In case of any failure.
Usages
session_id = "1234"
session_by_id = qdc_api.get_session_by_id(public_api_client, session_id)