The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December.
Read our blog post for more info about this change.
Found this content helpful? Log in or sign up to leave a like!
As far as I can tell, there is no way in the API identify which question groups are in a quiz, like you can for questions.
The question api has this:
It returns all of the questions, but this does not return question groups, and there is no correlating question group call in the API. The closest thing is this:
But this is for a single question group and it requires that you know the group ID, which of course you don't because you can't ask a quiz which question groups are in it. I would expect to see something like this, parallel to the question API, to get all the question groups in a quiz:
But making that call returns NULL. Anyone have any suggestions on how to get the question groups in a quiz? Without them there is no way to pull out data for a complete quiz or use the API to tie outcomes to a quiz.
This API endpoint is still in beta. Certain functionalities and limitations like what you are experiencing may occur. I am curious about this endpoint and will look into it more.
Update: While it may seem obvious, a question group must first be added to the quiz, then individual questions need to be added to that group. If a question is added to a quiz outside of a question group, the quiz_group_id will always be null.
Update2: The first call you mentioned may be the closest thing in terms of getting the quiz group ids
Assuming every quiz group created is being used, you can loop through all of the questions and get the distinct quiz group ids. Of course this will require extra data massaging. I hope this helps.
I have the same question. The API call should be.
But it returns NULL.
I found a quiz_group id in the DOM while in Quiz Edit Mode.
Using the id I was able to get the quiz_group object using:
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in