Upload files

Enables the upload of one or more files to IBM® Prescriptive Quality for Manufacturing Private. The upload file information must be provided directly in the request. The upload result and file_id information are included in the response directly.

URL

/ibm/pq/service/uploadFile

Method
The request type POST
URL parameters

Username: <String>. Used to identify tenant and user.

Headers

Content-Type: application/json

APIKEY: <encrypted key>. The API key.

Note: The system uses the APIKEY to check with the provisioning console to do authentication. You must provide an APIKEY in the request header.
Data parameters
None
Success response
{"file_id":{"<userfilename>":"<file_id>"},
"error_message":{"<userfilename>":"<error message content. >"}}
Response items

file_id: <JSONObject>. Contains the file identification information for each uploaded file.

error_message: <JSONObject>. Contains the error message for each file that failed to upload.

Sample call
curl -k -X POST -H "APIKEY:<encrypted key>" 
-H "Accept-Language:en-US,en;q=0.5" -H "Content-Type:multipart/form-data" 
-H "Connection:keep-alive" -F "data=@<userfilename>" 
"https://<serverhost>/ibm/pq/service/uploadFile?Username=<username>"