Skip to content

Retrieve group or individual reports

David Alejandro Molano Vásquez edited this page May 8, 2020 · 2 revisions

Retrieve group or individual reports

To retrieve a group or individual reports a POST request most be send to this endpoint. The endpoint needs as URL parameter the base map id. The body of the request must provide the following fields.

  • Query: Specifies whether the requests is for group or individual report.
  • Student id: The id of the student which report is requested. (Only in the case of requesting for an individual report)
URL /api/reports/retrieve/baseId
Method POST
URL Params baseId
Data Params
{  "query": [string],  "student_id": [string]}
Success Response
Code: 200
{"report_object":[report_object]}
Error Response
Code: 404
{"Error": "Not found"}
Error Response
Code: 500
{"Error": "Something went wrong"}

In the case of requesting a group report, the body must ONLY provide the "query" parameter with value "group" In the case of requesting an individual report, the body must provide "query" parameter with value "student" and the "student_id" with the value of the student id which report is being requested.

Group Report object

{
    "_id": {
      "$oid": string
    },
    "baseId": {
      "$oid": string
    },
    "similarity_values": [array],
    "num_concepts_values": [array],
    "time_used_values": [array],
    "topics": [
      {
        "topic": integer,
        "words": [array],
        "importances": [array],
        "counts": [array]
      },
    ],
    "topic_doc_count": {
      "topic": [array],
      "student_count": [array]
    }
  }

Individual report object

{
   "_id":{
      "$oid": string
   },
   "uid":{
      "$oid": string
   },
   "baseId":{
      "$oid": string
   },
   "similarity": double,
   "num_concepts": integer,
   "topic_distribution":{
      "importances":[array],
      "topic":[array]
   },
   "time_used": double
}
Clone this wiki locally