How can we help?

Home > Integrations > Learning Tools Interoperability (LTI) > LTI FAQ > How To Do Server-To-Server Submissions

How To Do Server-To-Server Submissions

Table of contents
No headers

Server-to-server submissions require that you have a publicly accessible file on your server, along with a valid class, assignment and enrolled student.

 

You need to send a POST request to the following URL:

/api/lti/1p0/upload/submit/[ASSIGNMENT-ID]

Providing these extra parameters with your request:

custom_xmlresponse => 1 
Required to do server-to-server submissions
custom_submission_url =>  http://file.com/file_name.pdf 
File must be publicly accessible, provide url to above parameter and Turnitin will download it and match it.
custom_submission_filename => file_name.pdf 
Also required for Turnitin (MUST INCLUDE FILE EXTENSION) 
custom_submission_title => Submission Title 
Custom submission title 

 

Example POST request for server-to-server submissions:

POST /api/lti/1p0/upload/submit/<ASSIGNMENT-ID> HTTP/1.1
Host: sandbox.turnitin.com
Content-Type: application/x-www-form-urlencoded

 

context_id=22&context_label=SI182&context_title=Just+for+Demo&context_type=CourseSection&custom_submission_filename=test2.pdf&custom_submission_title=Test+Filename
&custom_submission_url=https%3A%2F%2Fmyfile.file.com%2FGetting_Started.pdf&custom_xmlresponse=1
&launch_presentation_document_target=iframe&launch_presentation_height=240&launch_presentation_locale=en-US&launch_presentation_width=320&lis_person_contact_email_primary=email%40gmail.com&lis_person_name_family=Smith
&lis_person_name_full=John+Smith&lis_person_name_given=John<i_message_type=basic-lti-launch-request<i_version=LTI-1p0&oauth_consumer_key=<KEY>
&oauth_nonce=IWSt51qBqGw&oauth_signature=<SIGNATURE>&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1414494308&oauth_version=1.0&roles=Learner&user_id=2051

 

Upon successful submission you should see an XML response returned, which should look something like this:

 


<response>
   <status>fullsuccess</status>
   <lis_result_sourcedid>200488142</lis_result_sourcedid>
   <submission_data_extract>
   Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus blandit ex interdum convallis vestibulum. Praesent auctor sed dolor at aliquet. Etiam sed ligula efficitur nibh cursus luctus at id ex. Fusce lorem odio, imperdiet et sodales vitae, scelerisque a dolor. Curabitur interdum nunc sagittis felis vulputate venenatis. Sed venenatis dui bibendum sapien lacinia vestibulum. Vestibulum non lorem eu mi interdum rhoncus. Curabitur dictum orci purus, sed efficitur nulla cursus pellentesque. Ut ipsum ligula, aliquet a volutpat sed, vestibulum vitae ante. Suspendisse tincidunt dolor accumsan, fringilla lacus et, semper orci.
   </submission_data_extract>
   <message>Your file has been saved successfully.</message>
</response>

Last modified

Tags

Classifications

(not set)