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!
Using WordPress and built-in wp_remote_get function:
$get_webinars = wp_remote_get('https://myurl.instructure.com/api/v1/accounts/6/courses?per_page=100&include[]=syllabus_body', array(
'headers' => array(
'Authorization' => 'Bearer ' . $token
)
));The above code returns the syllabus_body as an optional include. When I try to add public_description as well:
$get_webinars = wp_remote_get('https://myurl.instructure.com/api/v1/accounts/6/courses?per_page=100&include[]=syllabus_body,public_description', array(
'headers' => array(
'Authorization' => 'Bearer ' . $token
)
));I don't get the syllabus_body or public_description.
Doesn't the include[] parameter mean it can support an array of values?
Solved! Go to Solution.
You probably need to repeat the include[]:
&include[]=syllabus_body&include[]=public_description
You probably need to repeat the include[]:
&include[]=syllabus_body&include[]=public_description
Yep, that's what's worked for me with calls to other endpoints.
Perfect, thanks Peter!
This works, but it really seems like the `includes[]` is indicative of being able to pass an array of values as parameters - ie, `&include=syllabus_body,public_description` or `&include=[syllabus_body,public_description]`.
The working format is not intuitive and bare minimum should be included in an example with the documentation.
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