sessions/{id}

Returns basic information about a given session, specified by an opaque, random session ID, which is unique only until the session expires.

Resource URL

https://api.bibliocommons.com/v1/sessions/{id}

Request Parameters

Parameter Type Description Default Required?
id String The session ID. N/A Yes

Response Fields

Response Field Type Description Returned
id String The user ID. Always
name String The user's screen name. Always
borrowers Hash/Object For each account associated with the user, returns the borrower (ILS) id by sub-domain Always, might be empty
  key String The BC sub-domain associated with that account (sometimes varies from library_id) Always
  value String The borrower ID for the account associated with this session. Always

Example Request

GET https://api.bibliocommons.com/v1/sessions/a123b4cd-5e67-8901-f234-g56h78901ij2?api_key={key}

Response:

{
  "user": {
    "id": "2412321",
    "name": "exampleuser",
    "borrowers": {"examplepl": "123456"}
  }
}

404 Not Found Response:

{
  "error": {
    "message": "No session '999999' found.",
    "request": "/sessions/999999?api_key={key}"
  }
}