Skip to content
Dhruv Thakker edited this page Jul 4, 2017 · 3 revisions

Welcome to the organization_dashboard_api wiki!

Organization API


Organizaion Summary and Details

Fetching Courses based on their Organization.

  • URL

    /api/organization/v1/summary/{<organization_name>}<optional>

    /api/organization/v1/details/{<organization_name>}<optional>

  • Method: GET

  • URL Params

    None

  • Success Response:

    • Code: 200 SUCCESS

      Content:

    [
        {
            "organization_name": "IIMB",
            "organization_course_list": [
                {
                    "course_id": "course-v1:IIMB+BS101+2017_BS1",
                    "course_display_name": "Bussiness Studies",
                    "course_start": "2017-01-01T00:00:00",
                    "course_end": null,
                    "course_registration_start": null,
                    "course_registration_end": null,
                    "course_status": "undefined",
                    "course_team": {
                        "course_instructors": [
                            {
                                "username": "teacher_the_first",
                                "email": "teacher@example.com"
                            },
                            {
                                "username": "Ayp2",
                                "email": "ayp2@example.com"
                            }
                        ],
                        "course_members": [
                            {
                                "username": "teacher_the_first",
                                "email": "teacher@example.com"
                            },
                            {
                                "username": "Ayp1",
                                "email": "ayp1@example.com"
                            }
                        ]
                    },
                    "course_student_count": "9",
                    "course_grading_policy": {
                        "grader": [
                            {
                                "min_count": 4,
                                "weight": 0.3,
                                "type": "Homework",
                                "drop_count": 1,
                                "short_label": "HW"
                            },
                            {
                                "min_count": 1,
                                "weight": 0.3,
                                "type": "Midterm Exam",
                                "drop_count": 0,
                                "short_label": "Midterm"
                            },
                            {
                                "min_count": 1,
                                "weight": 0.4,
                                "type": "Final Exam",
                                "drop_count": 0,
                                "short_label": "Final"
                            }
                        ],
                        "grade_cutoffs": {
                            "Pass": 0.5
                        }
                    }
                }
            ]
        },
        {
            "organization_name": "IISC-Blr",
            "organization_course_list": [
                {
                    "course_id": "course-v1:IISC-Blr+ACC101+2017",
                    "course_display_name": "Accounting For Dummies",
                    "course_start": "2017-01-01T00:00:00",
                    "course_end": null,
                    "course_registration_start": null,
                    "course_registration_end": null,
                    "course_status": "undefined",
                    "course_team": {
                        "course_instructors": [
                            {
                                "username": "teacher_the_first",
                                "email": "teacher@example.com"
                            }
                        ],
                        "course_members": [
                            {
                                "username": "teacher_the_first",
                                "email": "teacher@example.com"
                            }
                        ]
                    },
                    "course_student_count": "3",
                    "course_grading_policy": {
                        "grader": [],
                        "grade_cutoffs": {}
                    }
                }
            ]
        },
        {
            "organization_name": "IITB",
            "organization_course_list": [
                {
                    "course_id": "course-v1:IITB+CSE101+2017",
                    "course_display_name": "Introduction to Programming",
                    "course_start": "2017-06-20T00:00:00",
                    "course_end": "2017-06-21T12:00:00",
                    "course_registration_start": "2017-06-20T00:00:00",
                    "course_registration_end": "2017-06-21T12:00:00",
                    "course_status": "archived",
                    "course_team": {
                        "course_instructors": [
                            {
                                "username": "admin",
                                "email": "admin@example.com"
                            }
                        ],
                        "course_members": [
                            {
                                "username": "admin",
                                "email": "admin@example.com"
                            }
                        ]
                    },
                    "course_student_count": "2",
                    "course_grading_policy": {
                        "grader": [
                            {
                                "min_count": 1,
                                "weight": 1.0,
                                "type": "Homework",
                                "drop_count": 0,
                                "short_label": "HW"
                            }
                        ],
                        "grade_cutoffs": {
                            "Pass": 0.5
                        }
                    }
                },
                {
                    "course_id": "course-v1:IITB+CSE005+2017",
                    "course_display_name": "AdminXBlock",
                    "course_start": "2017-07-01T00:00:00",
                    "course_end": "2017-07-30T23:30:00",
                    "course_registration_start": "2017-07-01T00:00:00",
                    "course_registration_end": "2017-07-30T23:30:00",
                    "course_status": "ongoing",
                    "course_team": {
                        "course_instructors": [
                            {
                                "username": "admin",
                                "email": "admin@example.com"
                            }
                        ],
                        "course_members": [
                            {
                                "username": "admin",
                                "email": "admin@example.com"
                            }
                        ]
                    },
                    "course_student_count": "2",
                    "course_grading_policy": {
                        "grader": [],
                        "grade_cutoffs": {}
                    }
                }
            ]
        },
        {
            "organization_name": "IITBombay",
            "organization_course_list": [
                {
                    "course_id": "course-v1:IITBombay+CS007+2017_T1",
                    "course_display_name": "EPROCTORING COURSE",
                    "course_start": "2017-01-01T00:00:00",
                    "course_end": null,
                    "course_registration_start": null,
                    "course_registration_end": null,
                    "course_status": "undefined",
                    "course_team": {
                        "course_instructors": [
                            {
                                "username": "admin",
                                "email": "admin@example.com"
                            },
                            {
                                "username": "Ayp1",
                                "email": "ayp1@example.com"
                            },
                            {
                                "username": "dhruv1",
                                "email": "dhruv1@e.com"
                            }
                        ],
                        "course_members": [
                            {
                                "username": "admin",
                                "email": "admin@example.com"
                            }
                        ]
                    },
                    "course_student_count": "10",
                    "course_grading_policy": {
                        "grader": [],
                        "grade_cutoffs": {}
                    }
                }
            ]
        },
        {
            "organization_name": "IITBombayX",
            "organization_course_list": [
                {
                    "course_id": "course-v1:IITBombayX+API101+2017_T1",
                    "course_display_name": "API Dashboards",
                    "course_start": "2030-01-01T00:00:00",
                    "course_end": null,
                    "course_registration_start": null,
                    "course_registration_end": null,
                    "course_status": "undefined",
                    "course_team": {
                        "course_instructors": [
                            {
                                "username": "staff2",
                                "email": "staff2@example.com"
                            }
                        ],
                        "course_members": [
                            {
                                "username": "staff2",
                                "email": "staff2@example.com"
                            }
                        ]
                    },
                    "course_student_count": "1",
                    "course_grading_policy": {
                        "grader": [],
                        "grade_cutoffs": {}
                    }
                }
            ]
        }
    ]
  • Error Response:

    • Code: 403 FORBIDDEN

      Content:

      { "detail": "Authentication credentials were not provided." }
    • Code: 404 NOT FOUND

      Content:

      { "detail": "Not Found" }
  • Sample Call:

     curl -H 'Accept:application/json; indent=4' <edx host>/api/organizations/v1/summary/ -u <username>:<password>
    curl -H 'Authorization: Bearer <Access Token>' <edx host>/api/organization/v1/details/
  • Notes:

    Last Update - 04/07/2017

Certificate

Fetching organization with all its courses and count of certificates.

  • URL

    api/organizations/v1/certificate/

    api/organizations/v1/certificate/{<organization_name>}/

  • Method:

    GET

  • URL Params

    Optional:

    {<organization_name>}

  • Success Response:

    • Code: 200 SUCCESS

      Content:

      {
              "organization": "IITB",
              "courses": [
                  {
                      "course_id": "course-v1:IITB+CSE005+2017",
                      "course_name": "CSE005",
                      "course_run": "2017",
                      "course_organization": "IITB",
                      "certificate_count": 0
                  },
                  {
                      "course_id": "course-v1:IITB+CSE101+2017",
                      "course_name": "CSE101",
                      "course_run": "2017",
                      "course_organization": "IITB",
                      "certificate_count": 1
                  }
              ]
          }
  • Error Response:

    • Code: 401 UNAUTHORIZED

      Content:

      { "detail": "Authentication credentials were not provided." }
    • Code: 403 FORBIDDEN

      Content:

      { "detail": "You do not have permission to perform this action." }
    • Code: 403 FORBIDDEN

      Content:

      { "detail": "Authentication credentials were not provided." }
    • Code: 404 NOT FOUND

      Content:

      { "detail": "Not Found" }
  • Sample Call:

    http GET <edx host>api/organizations/v1/certificate/IITB/ 'Authorization:Bearer <Access Token>'
    
    curl -H 'Accept:application/json; indent=4' <edx host>api/organizations/v1/certificate/IITB/ -u <username>:<password>
    curl -H 'Authorization: Bearer <Access Token>' <edx host>api/organizations/v1/certificate/IITB/
  • Notes:

    Last Update - 04/07/2017

Grades

Fetching organization with all its courses and students.

  • URL

    /api/organizations/v1/grade/

    /api/organizations/v1/grade/{<organization_name>}

  • Method:

    GET

  • URL Params

    Optional:

    {<organization_name>}

  • Success Response:

    • Code: 200 SUCCESS

      Content:

       {
              "organization": "IITB",
              "courses": [
                  {
                      "course_name": "CSE005",
                      "course_organization": "IITB",
                      "course_run": "2017",
                      "students": [
                          {
                              "id": 6,
                              "name": "admin",
                              "email": "admin@example.com",
                              "total_score": null,
                              "grade": "",
                              "is_active": 1,
                              "last_login": "2017-07-04T17:34:23.718327"
                          },
                          {
                              "id": 8,
                              "name": "amol",
                              "email": "amol@example.com",
                              "total_score": null,
                              "grade": "",
                              "is_active": 1,
                              "last_login": "2017-07-04T16:25:56.203004"
                          }
                      ]
                  },
                  {
                      "course_name": "CSE101",
                      "course_organization": "IITB",
                      "course_run": "2017",
                      "students": [
                          {
                              "id": 6,
                              "name": "admin",
                              "email": "admin@example.com",
                              "total_score": "0.00",
                              "grade": "Fail",
                              "is_active": 1,
                              "last_login": "2017-07-04T17:34:23.718327"
                          },
                          {
                              "id": 8,
                              "name": "amol",
                              "email": "amol@example.com",
                              "total_score": "1.00",
                              "grade": "Pass",
                              "is_active": 1,
                              "last_login": "2017-07-04T16:25:56.203004"
                          }
                      ]
                  }
              ]
          }
  • Error Response:

    • Code: 401 UNAUTHORIZED

      Content:

      { "detail": "Authentication credentials were not provided." }
    • Code: 403 FORBIDDEN

      Content:

      { "detail": "You do not have permission to perform this action." }
    • Code: 403 FORBIDDEN Content:

      { "detail": "Authentication credentials were not provided." }
    • Code: 404 NOT FOUND Content:

      { "detail": "Not Found" }
  • Sample Call:

    http GET <edx host>/api/organizations/v1/grade/IITB/ 'Authorization:Bearer <Access Token>'
    
    curl -H 'Accept:application/json; indent=4' <edx host>/api/organizations/v1/grade/IITB/ -u <username>:<password>
    curl -H 'Authorization: Bearer <Access Token>' <edx host>/api/organizations/v1/grade/IITB/
  • Notes:

    Last Update - 04/07/2017