Skip to main content

Unable to Upload Feed File to SIS via CURL Command

SaaS: Attempting to upload SIS feed file via CURL causes error message.

Description

Attempting to upload SIS feed file via CURL causes error message.

Steps to Replicate

  1. Log in as Administrator

  2. Create SIS integration

  3. Create SIS feed file

  4. Attempt to upload feed file via CURL.

Expected Behavior:
Feed file uploads and integration performed.
Observed Behavior:
Jun 28, 2016 01:35:56 PM - Error while parsing Snapshot Feed File - java.lang.NullPointerException
at blackboard.dataintegration.flatfile.parser.FlatFileParser.parse(FlatFileParser.java:112)
at blackboard.dataintegration.flatfile.queue.FlatFileMessageQueueHandler.onMessage(FlatFileMessageQueueHandler.java:179)
at blackboard.platform.messagequeue.impl.activemq.ActiveMQMessageQueueConsumer$ConsumerThread.run(ActiveMQMessageQueueConsumer.java:189)

Target Release

Will Not Fix

Information

There's two problems with the curl command.
1. If you don't set the content-type using the -H flag, curl uploads the file as "Content-Type: application/x-www-form-urlencoded" which is the cause of the error you see. To fix that add this to the command:

-H "Content-Type:text/plain"

2. The data binary flag needs an @ symbol to tell it to find and upload the file specified, otherwise it assumes the string that follows is what you want uploaded. When Bb gets a POST that only contains the string "temp_test_courses_snapshot", it will throw an error saying your feed doesn't have the required headers.
Here is an example of a qualified curl command:

curl -k -u f5d3098b-7edd-4a2d-aec4-0bdf16091ea2:wackawacka -H "Content-Type:text/plain" --url https://abcsaas.blackboard.com/webapps/bb-data-integration-flatfile-BB57599c24afc52/endpoint/course/store --data-bin @temp_test_courses_snapshot

Did this answer your question?