I was able to create a course navigation link without any issues, so the
endpoint seems to be working. I was using my /docs/api/live page. For a
one-off creation process, that seems fairly foolproof.
I'm a little confused about the data you are sending. I'm pasting in the
return I got from my successful create. The only fields I posted were url,
consumer_key, consumer_secret, name, privacy_level, and the
course_navigation stuff. The rest is all null or default values. I included
the course nav fields because that seemed like the easiest type to test for
once created. I did visit the course, and sure enough the nav item is
there.
Anyway, I POSTed all that to
https://udel.test.instructure.com:443/api/v1/courses/[courseid]/external_tools.
So, I'm thinking that your data has an extra level to it, which I don't
understand. You've got your name, etc nested inside an externaltool array,
whereas I'm just posting to the externaltools endpoint.
HTH
{
"id": 80521,
"domain": null,
"url": "https://apps.ats.udel.edu/canvas/index.html",
"consumer_key": "none",
"name": "Test",
"description": null,
"created_at": "2015-12-09T19:31:56Z",
"updated_at": "2015-12-09T19:31:56Z",
"privacy_level": "anonymous",
"custom_fields": null,
"workflow_state": "anonymous",
"vendor_help_link": null,
"user_navigation": null,
"course_navigation": {
"default": "true",
"enabled": true,
"text": "Our Apps",
"url": "https://apps.ats.udel.edu/canvas/index.html",
"visibility": "members",
"label": "Our Apps",
"selection_width": 800,
"selection_height": 400
},
"account_navigation": null,
"resource_selection": null,
"editor_button": null,
"homework_submission": null,
"migration_selection": null,
"course_home_sub_navigation": null,
"course_settings_sub_navigation": null,
"global_navigation": null,
"assignment_menu": null,
"file_menu": null,
"discussion_topic_menu": null,
"module_menu": null,
"quiz_menu": null,
"wiki_page_menu": null,
"tool_configuration": null,
"link_selection": null,
"assignment_selection": null,
"post_grades": null,
"not_selectable": true
}
Response Code
Becky Kinney
Academic Technology Services
Project Blog <http://sites.udel.edu/bkinney/>
On Wed, Dec 9, 2015 at 11:36 AM, wbk2@psu.edu <instructure@jiveon.com>