Sessions API

List

Resource: /api/v2/sessions

HTTPS Request Method: GET

Description: The list of sessions that match the specified parameters.  If no optional parameters are specified, the full list of sessions associated with the account is returned.

Session list results are limited to 50 records and can be paginated.

 

Required Parameters:

  • api_key

 

Optional Parameters:

  • * page - (integer). The page you want to request. Every page is 50 records long at most. If not present, page 1 is assumed.
  • session[id] - (integer) 
  • session[start_on]  - (date or datetime)
  • session[end_on] - (date or datetime)
  • session[course_id] - (integer) 
  • session[code] - (string)
  • session[is_active] - (boolean)
  • session[name] - (string)
  • session[custom_a] - (string)
  • ...
  • session[custom_j] - (string)
  • session[in_catalog] - (boolean)
  • session[requires_authorization] - (boolean)
  • session[has_waitlist] - (boolean)
  • session[created_on] - (datetime)
  • session[updated_on] - (datetime)
  • course[code] - (string)
  • ... (see all the optional attributes of the Courses API List endpoint)

Dates and datetimes should be in YYYY-MM-DD or YYYY-MM-DD HH:MM:SS format and can be given as ranges if separated by a comma. 

Example Request

curl -X GET -d '{"api_key": "123456", "session": {"start_on": "2010-04-19 00:00:00,2015-04-19 23:59:59"}, "course": {"code": "abc123"}}' -H "Content-type: application/json" -H "Accept: application/json" https://YOURSUBDOMAIN.exceedlms.com/api/v2/sessions


Example Response:


[
{
"end_on": "2015-03-12T19:00:00-05:00",
"id": 25,
"name": "asfd",
"primary_instructor": "",
"primary_location": "",
"start_on": "2015-03-12T18:00:00-05:00",
"events": [
{
"description": "",
"dtend": "2015-03-12T19:00:00-05:00",
"dtstart": "2015-03-12T18:00:00-05:00",
"location": ""
}
],
"course": {
"code": "abc123",
"name": "chaos theroy"
}
}
]

 

Delete

Resource: /api/v2/sessions/{id}

HTTPS Request Method: DELETE

Description: Delete a session based on the activity id.

Example Request:

curl -i -X DELETE -H "Content-type: application/json" -H "Accept: application/json" https://YOURSUBDOMAIN.exceedlms.com/api/v2/sessions/5?api_key=123456

Optional Parameters:

  • session[code] - lookup the session using the code. When this param is used the id parameter is ignored

Response:

  • On successful deletion returns a 200 HTTP response code with the deleted session data in the body

 

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.