Where can I find the Criterion ID and Levels Ids for a rubric I created?

I have created a rubric with only two levels: Perfect (the photo uploaded in the assignment has content) and Unacceptable (the photo uploaded in the assignment is blank). I used a Holistic rubric because I just wanted to use a single criterion (content or no content) for this type of assignment. This is the code I wrote in the body of the request:

{

    "Score": 100,

    "Feedback": "Great job!",

    "RubricAssessments": [

{

    "RubricId": 1933,

    "OverallScore": 100,

    "OverallFeedback": "Great job!",

    "OverallLevel": {

        "LevelId": <number:D2LID>,

        "Feedback": "Perfect - The photo has content."

    },

    "OverallScoreOverridden": false,

    "OverallFeedbackOverridden": false,

    "CriteriaOutcome": [

        {

            "CriterionId": <number:D2LID>,

            "LevelId": <number:D2LID>|null,

            "Score": 100,

            "ScoreIsOverridden": false,

            "Feedback": "Perfect - The photo has content.",

            "FeedbackIsOverridden": false

        }

    ]

}

],

    "IsGraded": true,

    "GradedSymbol": null

}

As you can see, I still don't have the Levels IDs and the Criterion ID. I don't know yet where to find them. I tried retrieving the rubric with a GET request because I'm 100% sure the outcome has that missing data using {{BrightspaceDomain}}/d2l/api/le/{{leversion}}/{{orgunitid}}/rubrics but I get 404 Not Found. 

Could anyone help me with this, please? Thanks.

Tagged:

Answers

  • Ryan.M.845
    Ryan.M.845 Posts: 1

    Hey Patricia, you're absolutely on the right track but the Rubrics API you mentioned at the end of your post is a little awkward to use - it requires the rubric to be associated with something, and then you can fetch the rubric based on that association. (See https://docs.valence.desire2learn.com/res/assessment.html#get--d2l-api-le-(version)-(orgUnitId)-rubrics for information about this route)

    First, you'll need to have your rubric associated with something - an assignment, a quiz, etc. These will map to the various EVAL_T values shown here: https://docs.valence.desire2learn.com/res/assessment.html#term-EVAL_T . This will be the objectType query parameter you need for the rubrics API.

    You will then also need to know the objectId of the thing it's associated with, so that will be the assignment ID, quiz ID, etc. The easiest way to find this will likely be the API that lists all of the assignments, quizzes, etc. in a course. To use assignments as an example, https://docs.valence.desire2learn.com/res/dropbox.html#get--d2l-api-le-(version)-(orgUnitId)-dropbox-folders- will list all assignments in a course, and then if you find the assignment your rubric is associated with, it will have an Id value. That is the objectId value you will need for the rubrics API.

    You can then call the API you were calling with those values, with a special note that the only version for that API right now is unstable, so your final URL will look something like /d2l/api/le/unstable/<orgUnitId>/rubrics?objectType=Dropbox&objectId=5

    Hope that helps - this is definitely not the easiest API to use!