Skip to content

Submit API with CSV

Pradeeban Kathiravelu edited this page Jul 10, 2018 · 2 revisions

"Submit API: csv" ensures that the documents created with the CSV payload adhere to the provided header. Provide the CSV Column Header information in the form. As shown below in the screenshot below, this information is optional. If not specified the first line of the CSV file is assumed as the header.

Once the header is defined for the CSV, it is time to submit multiple documents to a Mongo collection using the "Try Me!!" option.

As can be seen from the screenshot, each mongo document takes a separate line. Each entry in a document is separated by a comma.

If the format of any of the documents in the csv does not match the header, an error similar to the below will be thrown: "{"errorDescription":"Execution of the Submit API failed","suggestedAction":"Check the input data","detailedMessage":"providerId=[edu.emory.cci.bindaas.datasource.provider.mongodb.MongoDBProvider] version=[1] : java.lang.ArrayIndexOutOfBoundsException: 2"}"

Clone this wiki locally