@PaulAmoruso1
The New Quizzes API, to the extent that it exists and is documented, is done through GraphQL.
The most definitive documentation (in the series of blog posts) is from Tamas Bologh.
There is a page on GraphQL as part of the REST API documentation. It mentions that all Canvas services with public-facing APIs are moving (slowly) towards federating their APIs through a single GraphQL gateway. The explanation of why is given at From the Engineering Deck: Instructure & GraphQL (2021-08-17).
I'll write this assuming that your production Canvas instance is at <instance>.instructure.com
On the GraphQL page, it explains how to connect to the API gateway. You will need to use your Canvas REST API token to get a Canvas InstAccessToken by making a POST to <instance>/api/v1/inst_access_token
Then you take the token from there and go to your API Gateway. The interactive tool for the GraphQL Gateway is at <instance>.api.instructure.com/graphql
So, you want to know what is available and you run an IntrospectionQuery. I cannot remember at this point whether it was there or I found it somewhere. But it turns out it doesn't work.
You will need to go to the bottom where it has HTTP Headers and put in the InstAccessToken you got from the REST API. It looks like this: {"Authorization": "Bearer <InstAccessToken>"}
Now you get a different error. It's that "GraphQL introspection is not allowed by Apollo Server, but the query contained __schema or __type. To enable introspection, pass introspection: true to ApolloServer in production".
WTH you ask? It turns out that Apollo (makers of the GraphQL library Canvas uses) recommends disabling Introspection in Production.
At this point, you can switch over to your beta or test instance, where introspection is not disabled. That's at <instance>.api.beta.instructure.com or <instance>.api.test.instructure.com (it will not work if you put beta or test first, the api must come before the beta or test).
When you get here, it doesn't have the introspection query (again, mine may have just been remembering it from the last time I was there), it just has a note to write your query or mutation here.
So, you start to wise up. You go back to the production gateway and copy/paste the IntrospectionQuery that Canvas gave you and copy it over to the beta gateway and paste it in and it doesn't work.
You realize from reading the message that it's because you don't have the right InstAccessToken. You go back to your production gateway and copy/paste the Authorization from the HTTP Headers. And it still doesn't work.
That's because the InstAccessToken you have is for production, not for beta. So you go back to your REST client and get an InstAccessToken from <instance>.beta.instructure.com.
Then you find out that Introspection is not allowed on test or beta either.
You finally notice the DOCS and SCHEMA objects on the right side. So you decide to click on them and you get nothing except a spinning icon.
You go to the network tab on your developer tools and see that there is a graphql query that failed. This is the IntrospectionQuery that I was referring to earlier -- I finally remembered where I found it.
So, no DOCS or SCHEMA on production, beta, or test kind of makes it worthless. When I had last looked at this, it worked on beta and test but not production.
However, by this point, you can go through and do a simple query of what you could do from the regular Canvas graphiql interface. Replace the 1 with your account ID and you should get the name of your account.
query MyQuery {
account(id: "1") {
name
}
}
This is where the New Quizzes API should end up. Except right now, it's really, really hard to find anything unless you already know what it is. Canvas needs to disable the introspection on beta and/or test so that we can get to the schema and documentation.