API Documentation

Bowen Masco edited this page Jul 13, 2014 · 29 revisions

Base URI: http://www.openassessments.com/api

SSL Base URI: https://oea.herokuapp.com/api

Authentication: Requests that require authentication must include an auth_token parameter. An auth token is created for each user.

Formats: JSON and XML are supported. CSV can be requested from the results endpoints.

When launching a quiz there are various flags and values that can be set as query params for the quiz url

enable_start: "A user must click a start button to initiate the quiz. other wise the first question is presented"

confidence_levels: "Rather than showing a check answer button, display three buttons for a user to submit their confidence in the accuracy of their answer.

example - https://oea.herokuapp.com/assessments/load?src_url=https://oea.herokuapp.com/api/assessments/55.xml&results_end_point=https://oea.herokuapp.com/api&assessment_id=55&confidence_levels=true&eid=ch15

/assessments.:format

  • GET: returns a list of assessments returning up to 100 results at a time

    example url - http://www.openassessments.com/api/assessments.xml

    • Parameters

      • :format

        • required

        • value: json, xml

        • description: "Format for results"

      • page

        • optional

        • value: integer

        • description: "The paginated page of assessments."

        • default: 1

      • q

        • optional

        • value: string

        • description: "The search term for assessments. Searches the title and description of the assessment."

    • success: 200

    • error: 406 When a format is not specified.

  • POST: creates an assessment

    example url - http://www.openassessments.com/api/assessments.xml?auth_token=keinn82ndsi3n3idkd

    • Parameters

      • auth_token

        • required

        • value: string

        • description: "The auth token of the user."

    • Body

      • required

      • a QTI XML formatted question

    • success: 200:

/assessments/:id.:format

  • GET: returns the XML QTI of an assessment

    example url - http://www.openassessments.com/api/assessments/6.xml

    • Parameters

      • :id

        • required

        • value: integer

        • description: "The id of the assessment."

      • :format

        • required

        • value: json, xml

        • description: "If you request an assessment in the XML format the QTI backing the assessment will be returned."

    • success: 200

/item_results.:format

  • GET: returns the XML QTI of an assessment

    example url - http://www.openassessments.com/api/item_results

    • Parameters

      • type

        • optional

        • value: summary, raw

        • description: "If summary is specified then summarized stats of the results will be given. Otherwise the raw results will be returned."

        • default: raw

      • external_user_id

        • optional

        • value: string

        • description: "Item results with the given external_user_id will be returned."

      • src_url

        • optional

        • value: string

        • description: "Item results with the given src_url will be returned."

      • keyword

        • optional

        • value: string

        • description: "Item results with the given keyword will be returned."

      • objectives

      • identifier

        • optional

        • value: string

        • description: "Will filter by the QTI identifier in the assessment."

      • eid

      • url

        • optional

        • value: a url

        • description: "Item results with a referrer that matches the url will be returned."

      • :format

        • required

        • value: json, xml, csv

        • description: "Sets the format for the results"

    • success: 200

oEmbed

OEA supports oembed for assessments. The oEmbed endpoint is located at '/oembed.json'. Pass the url of an assessment to get it's oEmbed representation.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.