Data Export API

All interaction data stored in Watershed takes the form of xAPI statements. This includes both data from native xAPI sources and also data translated from imported CSV files. The Data Export API enables you to pull those interaction statements via API with the full flexibility of Watershed filters. This is considerably more powerful than the Statements API defined by the xAPI specification (which Watershed also supports).

Please note: the Data Export API returns the underlying xAPI data for a filter. If you want to pull aggregated data instead, you should use the Aggregation API.

Request URL: /api/organizations/[org-id]/query/export

Method: GET

Expected response code: 200 OK

Request parameters

Parameter

Details

type

The type of file to return, either ‘json’ or ‘csv’.

filter

A urlencoded filter object with the same properties as can be used in card and measure filters. If you copy this from a card’s advanced configuration, remember to strip out the white space before url encoding the filter string.

cardId

The id of a card to use the filter from.

The type parameters is required along with either filters or cardId parameters. If both cardId and filters are specified, only cardId will be used and filters will be ignored.

Response

A successful response will return either a json or csv document containing the xAPI statements. If the type is json, then the json file will contain valid xAPI statements. If the type is csv, the csv file will contain most or all of the date from the statements in tabular format with one statement on each row.

Examples

For readability, line breaks have been added and data has not been urlencoded.

GET https://sandbox.watershedlrs.com/api/organizations/1234/query/export?
filter={"activityIds":{"ids":["https://example.com/some-activity"]}}
&type=json
GET https://sandbox.watershedlrs.com/api/organizations/1234/query/export?cardId=1234&type=csv
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.

If you can't find what you need or you want to ask a real person a question, please contact customer support.