Skip to content

Doubtfire API

List of Doubtfire

API: Stats

tutorials : Operations about tutorials This markdown document provides detailed documentation for the “Stats” API endpoints, including their URLs, methods, parameters (if any), responses, and example requests using curl.

This “Units” API has the following operations.

  • GET /api/units/{id}/stats/task_completion_stats
  • GET /api/units/{id}/stats/task_status_pct
  • GET /api/units/{id}/stats/student_target_grade

GET /api/units/{id}/stats/task_completion_stats

  • URL: /api/units/{id}/stats/task_completion_stats

  • Method: GET

  • Parameter:

    ParameterDescriptionParameter TypeData TypeMandatory
    UsernameUsernameheaderstringYes
    Auth_TokenAuthentication tokenheaderstringYes
    idThe project idpathintegerYes
  • Response: 200 OK

  • Example Request:

    Terminal window
    curl -X GET --header 'Accept: application/json' --header 'Username: aadmin' --header 'Auth_Token: Say13yA497H8wSFFXZxh' 'http://localhost:3000/api/units/1/stats/task_completion_stats'
  • Response Body:

    {
    "unit": {
    "median": 13,
    "lower": 12,
    "upper": 17,
    "min": 2,
    "max": 19
    },
    "tutorial": {
    "1": {
    "median": 11,
    "lower": 2,
    "upper": 13,
    "min": 2,
    "max": 13
    },
    "3": {
    "median": 16,
    "lower": 13,
    "upper": 17,
    "min": 12,
    "max": 17
    }
    },
    "grade": {
    "0": {
    "median": 11,
    "lower": 8,
    "upper": 11,
    "min": 8,
    "max": 11
    },
    "1": {
    "median": 17,
    "lower": 13,
    "upper": 17,
    "min": 13,
    "max": 17
    },
    "2": {
    "median": 7.5,
    "lower": 2,
    "upper": 13,
    "min": 2,
    "max": 13
    },
    "3": {
    "median": 13,
    "lower": 13,
    "upper": 17,
    "min": 2,
    "max": 19
    }
    }
    }

GET /api/units/{id}/stats/task_status_pct

  • URL: /api/units/{id}/stats/task_status_pct

  • Method: GET

  • Parameter:

    ParameterDescriptionParameter TypeData TypeMandatory
    UsernameUsernameheaderstringYes
    Auth_TokenAuthentication tokenheaderstringYes
    idThe project idpathintegerYes
  • Response: 200 OK

  • Example Request:

    Terminal window
    curl -X GET --header 'Accept: application/json' --header 'Username: aadmin' --header 'Auth_Token: Say13yA497H8wSFFXZxh' 'http://localhost:3000/api/units/1/stats/task_status_pct'
  • Response Body:

    {
    "1": {
    "1": [
    {
    "tutorial_stream_id": null,
    "status": "complete",
    "num": 4
    },
    {
    "tutorial_stream_id": null,
    "status": "redo",
    "num": 1
    },
    {
    "tutorial_stream_id": null,
    "status": "demonstrate",
    "num": 1
    }
    ]
    }
    }

GET /api/units/{id}/stats/student_target_grade

  • URL: /api/units/{id}/stats/student_target_grade

  • Method: GET

  • Parameter:

    ParameterDescriptionParameter TypeData TypeMandatory
    UsernameUsernameheaderstringYes
    Auth_TokenAuthentication tokenheaderstringYes
    idThe project idpathintegerYes
  • Response: 200 OK

  • Example Request:

    Terminal window
    curl -X GET --header 'Accept: application/json' --header 'Username: aadmin' --header 'Auth_Token: Say13yA497H8wSFFXZxh' 'http://localhost:3000/api/units/1/stats/student_target_grade'
  • Response Body:

    [
    {
    "tutorial_id": null,
    "tutorial_stream_id": null,
    "grade": 0,
    "num": 1
    },
    {
    "tutorial_id": null,
    "tutorial_stream_id": null,
    "grade": 1,
    "num": 1
    },
    {
    "tutorial_id": null,
    "tutorial_stream_id": null,
    "grade": 2,
    "num": 1
    },
    {
    "tutorial_id": null,
    "tutorial_stream_id": null,
    "grade": 3,
    "num": 3
    },
    {
    "tutorial_id": 1,
    "tutorial_stream_id": 4,
    "grade": 0,
    "num": 2
    },
    {
    "tutorial_id": 1,
    "tutorial_stream_id": 4,
    "grade": 1,
    "num": 1
    },
    {
    "tutorial_id": 1,
    "tutorial_stream_id": 4,
    "grade": 2,
    "num": 1
    },
    {
    "tutorial_id": 1,
    "tutorial_stream_id": 4,
    "grade": 3,
    "num": 2
    },
    {
    "tutorial_id": 3,
    "tutorial_stream_id": 3,
    "grade": 0,
    "num": 1
    },
    {
    "tutorial_id": 3,
    "tutorial_stream_id": 3,
    "grade": 1,
    "num": 1
    },
    {
    "tutorial_id": 3,
    "tutorial_stream_id": 3,
    "grade": 3,
    "num": 4
    }
    ]