QBOS REST API documentation (session)

(return to Main Document)

Introduction

The session API allows client applications to maintain session data including any part of its demographic record sets.

Audience

This developer's guide is intended for software developers needing a technical reference for using the QBOS REST API. The information you find in this guide is written by software engineering, and is authoritative on how the API behaves.

Additional resources, information about this guide

Occasionally, we make a mistake in this documentation, or unknowingly break a feature that you depend on. If this has happened to you, we apologize! You can help us fix the issue by contacting us. We appreciate your help.

Getting Started

To place any request in QBOS API application from third party application you need to authenticate user account and set/calculate values for the following request headers: x-qbos-id, x-qbos-nonce, x-qbos-date-utc, x-qbos-hash-version, x-qbos-auth

See details in Authentication Documentation.

session properties

Properties prefixed with '_' (underscore) are read-only properties. i.e. POST and PUT processing will ignore these properties.

Name Type Max length Numeric Required
For POST
Filterable Description

id

bigint

 

 

 

Required for GET(by id),PUT,DELETE

parent_id

bigint

 

yes

 

parent_type

nvarchar

50

 

yes

 

type

nvarchar

50

 

 

 

Value is "session"

href_user

varchar

21

 

 

 

name

nvarchar

1024

 

 

 

Name (mnemonic) for user session

login

varchar

120

 

yes

 

Login or _user_shared_key_id.

password

varchar

30

 

yes

 

Password or _user_shared_key. If the value of login is the _user_shared_key_id then the value of password is _user_shared_key

_user_shared_key_id

nvarchar

512

 

 

 

Is the alphanumeric ID used to identify the shared-value hash key. It has no semantic meaning other than identifying the shared key, which is then linked to the underlying user in a many-to-one relation. This key is unique for each user per corporate

_user_shared_key

nvarchar

512

 

 

yes

Is the alphanumeric hash key known only to the client and the API server. This key is unique for each user per corporate

_user_name

nvarchar

144

 

 

 

Name of the user who ownes the session

_corporate_name

nvarchar

80

 

 

 

Name of the corporate this session is bound to

Read session by id:

GET https:/.../v1/o/session/{id}

Response codes:

  • 400 - Client error
  • 500 - Server error
  • 404 - Not found or user does not have permission to access resources of this type.
  • 200 - OK

Response data: GET https:/.../v1/o/session/114351
{ "parent_type" : "corporate", "parent_id" : 506764, "type" : "session", "id" : 114351, "sub_type" : " ", "href_user" : "\/v1\/o\/user\/944278", "name" : "BC140E8A-18CB-46D3-8272-FCF5285E6730::session_name", "login" : "", "password" : "", "_user_shared_key_id" : "01E3E2FC-0974-484E-BB6B-5A503C9F282E", "_user_shared_key" : "0D55E400_9523_4496_BEE7_489C1E6BCA0D", "_user_name" : "Nick Leija", "_corporate_name" : "Crossroads Hospice of OKC", "href" : "" }

Read session from parent:

GET https:/.../v1/o/{parent_type}/{parent_id}/links/session[?{filter}]

Response codes:

  • 400 - Client error
  • 500 - Server error
  • 404 - Not found or user does not have permission to access resources of this type.
  • 200 - OK

GET https:/.../v1/o/corporate/0/links/session
Response data:
{}

Create session:

POST https:/.../v1/o/corporate/0/session

Request data [See properties]:

{"session": [ { "parent_type" : "corporate", "parent_id" : 506764, "property_a" : "value-a", "property" : "See session properties", "property_z" : "value-z" } ] }

Response codes: