AnsweredAssumed Answered

Does the include parameter allow multiple values?

Question asked by Eric Kornmeyer on Aug 30, 2018
Latest reply on Aug 30, 2018 by Eric Kornmeyer

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?

Outcomes