Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

This API is intended for internal use only at this time.

We will probably open it up for 3rd party access in the future, after we’ve finished internal evaluation.

Table of Contents

Overview

The Workflow Import Queue is a Workflow-enabled bulk import tool that lets users upload CSV files through the web UI to import/update data.

...

The end result is the same: in both cases, a WORKFLOW_IMPORT_QUEUE_BATCH is created with one row per imported data record and is then processed on a background queue.

...

Supported features

This is an alternative way of getting data into the import queue, but once the data is in the queue it supports the full set of Workflow Import Queue functionality.

...

There is no “prompt for confirmation” element to this API call; the posted data is added directly to the processing queue.

Using the API

Calling this API requires an API Key with the BeginWorkflowImportProcess permission.

...

Code Block
Authorization: apikey xxxxxxxxxxxxxxxxx

HTTP Request

Info

For implementation reasons, this API endpoint uses querystring parameters AND a request body.

The querystring parameters provide some control data, and the request body contains the data to be imported.

...

Code Block
POST /API/WorkflowImportQueue/CreateBatch
?fileName={filename}
&importProcessId={id}
&creationPath={string}
&sendSuccessEmailTo={email}
&sendFailureEmailTo={email}processId}

[Request body]
-----------------
{ JSON data row 1, on single line }
{ JSON data row 2, on single line }
  • fileName - displayed in the “Recent Imports” part of the UI; provide a human-readable description of this particular import, such as “ACME Process {yyyy/mm/dd}”

  • importProcessId - the ID of the /wiki/spaces/DOCS/pages/1569915157 to use;

  • creationPath - a string, up to 15 characters in length, consisting only of upper case letters, numbers, and underscores. See below for explanation.

  • sendSuccessEmailTo - (optional) an email address to notify of a successful import process

  • sendFailureEmailTo - (optional) an email address to notify if any records fail to process

...

Note

In order to support large number of records in an API call, the request body must use the JSON Lines format or the request will fail.

Purpose of “creationPath”

The purpose of the creationPath argument is to identify which Import Queue Batches were created from which external integrations.

...

For example, the Learning Hub integration passes creationPath=LH. Therefore, all import queue batches created by the Learning Hub integration can be found by searching for “IMPORT_QUEUE_API:LH”.

HTTP Response

The HTTP response contains the WORKFLOW_IMPORT_QUEUE_BATCH_ID that can be used to locate it in the system, as well as a hyperlink to the results in the UI.

Code Block
languagejson
{
  queueBatchId: "abc-def-123",
  queueBatchDetails: "https://www.someLB.com/Admin/Whatever?batchId=abc-def-123"
}

Error messages

Error

Reason / How to fix