Web API: Importfile: Difference between revisions

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 6: Line 6:
Url: POST /api/importfile?param1=value1&param2=value2&param3=value3
Url: POST /api/importfile?param1=value1&param2=value2&param3=value3
Content-Type: multipart/form-data
Content-Type: multipart/form-data
Authorization: Bearer <access token>
Body: <file contents>
Body: <file contents>
</pre>
</pre>

Revision as of 17:39, 13 August 2020

The importfile operation imports data from a file to QPR ProcessAnalyzer datatable.

HTTP request header Authorization with value Bearer <access token> needs to be in place to identify the session.

Url: POST /api/importfile?param1=value1&param2=value2&param3=value3
Content-Type: multipart/form-data
Body: <file contents>

Following parameters can be defined:

  • fileType (string): Defines content format of the imported file. Options are csv, pacm and xes.
  • importMode (string): Defines what kind of data is imported. Options are datatable, events and cases. Needed when fileType=csv.
  • projectId (string): Project id. Needed when creating a new model or a new datatable.
  • newObjectName (string): Model or datatable name. Needed when creating a new model or a new datatable.
  • objectId (integer): Model or datatable id. Needed when importing data to an existing model or a datatable.
  • csvDelimiter (string): Column delimiter character for the csv format.
  • csvQualifier (string): Character used to enclose strings for the csv format.
  • csvTimeFormat (string): Date format to use when interpreting date values for the csv format.
  • csvStartImportFromLine (integer): The column name row in the csv file.
  • append (boolean): When true, the possible previous data in the destination datatable is preserved. When false, previous data is removed and also datatable columns are deleted.
  • isCompressed (boolean): When true, the file is compressed using gzip format. Only csv and xes files can be provided as compressed (pacm file is already a gzip file).