API Calls - GoREACT/widgets-js-api GitHub Wiki

GET /v1/get-media/:id/myfile.mp4

Redirects to a playable media file. Endpoint expects: api_key and signature in order to resolve. Optionally, you can add expires to secure the request against replay attacks.

GET /v1/get-thumbnail/:id/myfile.jpg

Redirects to a displayable image file. This file may be in jpg or png format. Endpoint expects: api_key and signature in order to resolve. Optionally, you can add expires to secure the request against replay attacks.

Reports

POST /v1/report

Retrieves data set based on the requested POST parameters.

Available URL Parameters

  • api_key - Required
  • signature - Required
  • expires - Optional

Available POST Parameters

  • report - String. Required
  • users - Array. Required (unless using groups for the getUserFeedbackGiven report)
  • groups - Array. Optional. Only available to the getUserFeedbackGiven report
  • goreact_id - String. Optional. Only available to the getSessionFeedback report

Available Reports and Examples

URL Example:

/v1/report?api_key=abc123&signature=QvuwabcFh0%2BBDL7aWO123hkD9OA=
Report: getUserVideoCount

POST Example:

{
  "report": "getUserVideoCount",
  "users": [
    "abc123",
    "def456"
  ]
}

Return Example:

[{
  "user_id": "abc123",
  "data": {
    "total": "20",
    "user_created": "19",
    "external": "1"
  }
}]
Report: getUserVideoViews

POST Example:

{
  "report": "getUserVideoViews",
  "users": [
    "dev654",
    "34b2bfdf",
    "abc123456"
  ]
}

Return Example:

[{
  "user_id": "dev654",
  "data": {
    "total_views": 0,
    "unique_session_views": 0
  }
}]
Report: getUserFeedbackGiven

If user IDs are passed, feedback counts are given for every group the user has given feedback in.

POST Example with Users:

{
  "report": "getUserFeedbackGiven",
  "users": [
    "dev654",
    "34b2bfdf",
    "abc123456"
  ]
}

If group IDs are supplied, feedback counts are given for users of the supplied groups, broken out per group. Limited by passed in group IDs.

POST Example with Groups:

{
  "report": "getUserFeedbackGiven",
  "groups": [
    "dev654",
    "34b2bfdf",
    "abc123456"
  ]
}

Return Example:

[{
  "user_id": "01234567891011",
  "data": [{
    "group_id": "335",
    "comments": "11"
  }]
},
{
  "user_id": "1010341",
  "data": [ ]
}]
Report: getUserFeedbackRec

POST Example:

{
  "report": "getUserFeedbackRec",
  "users": [
    "dev654",
    "34b2bfdf",
    "abc123456"
  ]
}

Return Example:

[{
  "user_id": "abc123",
  "data": {
    "comments": "0"
  }
}]
Report: getSessionFeedback

POST Example:

{
  "report": "getSessionFeedback",
  "goreact_ids": [
    "abc123"
  ],
  "filter": [{
    "type": "text"
  }]
}

Return Example:

[{
  "session_id": "546fa5ca074c4d1b30e5560d",
  "comments": [{
    "user_id": "01234567891011",
    "date": "2014-11-21 20:51:31",
    "time_marker": "231",
    "feedback": "test1",
    "type": "text"
  }]
}]

Delete Session

DELETE /v1/delete-session

Removes the specified session.

Available URL Parameters

  • api_key - Required
  • signature - Required
  • session_id - Required
  • expires - Optional

<< Insert Adding Media Doc here >>