cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Surveyor

Environments for LTI configuration - via API calls?

Jump to solution

I've created a Turnitin LTI tool for my canvas site via a post to the external tools API 

We have an account on the Sandbox Turnitin system that we want to point at from our beta and test Canvas environments.

I've seen from documentation that it's possible to specify different URLs for different environments for external tools via the Extended Tool configurations documented at

Importing Extended Tool Configurations - Canvas LMS REST API Documentation 

and this is discussed in a recent post here:

Question about environments in LTI configuration 

My question is - can I define a different URL for our test and beta environment via a call to the external tool API, or do I have to do it via XML as in the documents cited above?

Many thanks for any pointers on how to do this

Labels (1)
1 Solution

Accepted Solutions
Highlighted
Surveyor

I have found an answer to my own question:

In the External Tool API there are parameters that allow XML configuration information to be passed via the API call.

config_type allows you to specify that you are providing some XML configuration for the tool, and specifies where this XML will be provided, either "by_url" or "by_XML"

config_xml allows you to provide the XML tool configuration

Please note that this will override any tool settings you provide via the custom_fields array.

View solution in original post

2 Replies
Highlighted
Surveyor

I have found an answer to my own question:

In the External Tool API there are parameters that allow XML configuration information to be passed via the API call.

config_type allows you to specify that you are providing some XML configuration for the tool, and specifies where this XML will be provided, either "by_url" or "by_XML"

config_xml allows you to provide the XML tool configuration

Please note that this will override any tool settings you provide via the custom_fields array.

View solution in original post

Highlighted
Community Member

carols@sussex.ac.uk‌,

Were you able to get the environments working as expected?

I have tried configuring by url to an xml configuration but it does not seem to work as expected regarding the environments. The rest of the configuration works. Also, when pulling the configuration from the API I do not receive the environments config so I think I am doing something wrong. 

I have found it helpful to use PostMan to put LTI edits while we develop are own app for editing the LTI's but it seems like you need to pass everything each request or it wipes out the settings that you do not pass. So for example, if you do not want to wipe out the custom_fields array when editing via the API then you should pass those as well.