Skip to main content

API Request Queue

When creating a Data Connection of the type API, the process for importing data is reversed; rather than a scheduled pull from a remote SFTP or HTTPS server, you can POST data on-demand and as needed. The API Request Queue receives these requests and launches a configured Data Import which then processes the data.

The benefit of using an API Data Connection is that you control the timing of when data is imported into SimplyWork, yet can leverage the tools available in the Data Imports app for processing the data, managing formats, and interacting with other data sources within the system.

POSTing To The Queue

Once you have generated the unique API Endpoint token, you can start POSTing data to the endpoint prior to creating an import service. This allows you to post data in whatever format you desire, then utilize the Data Import tools to manipulate the data into the desired target format.

Payloads which arrive in the Request Queue are held when no data import app is assigned to the queue. In this way you can test the sending side of the API before setting up the consumer side in SimplyWork.

Dataconnections Api Queue

View posted data using the Request Queue action card on the right side of the Data Connections app

Use a third part tool, such as the Chrome extension Talend, or tools that you create to POST data to your new endpoint. Data can be posted in CSV, JSON or XML format, then manipulated into the desired target format using the Data Import app.

Below is an example of using Talend to POST CSV to a virtual Data Connection API endpoint:

Dataconnections Talend

The following are examples of Employee information being posted to an API Data Connection in a variety of formats. In each case this is the raw data posted by the external application is unmodified. You can view these in the Data Connection's Request Queue action card by tapping on any row within the Pending Requests list.

Dataconnections Api Queue Csv

info

CSV Upload; first line optionally contains column names. The import tools will parse this into the target data

Dataconnections Api Queue Json Simple

info

JSON simple employee object; in this case a single employee object

Dataconnections Api Queue Jsonarray

info

JSON containing an array with multiple employee records; same as above but wrapped in an array such that multiple records can be uploaded in one POST

Dataconnections Api Queue Json Multi

info

JSON containing an array behind a data tag; same as above but the array of records is nested behind the Employees attribute

Dataconnections Api Queue Xml

info

XML Employees; the import tools will look for the Employee attribute and extract one or more records using the sub attributes. In the above often Company would be Employees to denote a list.

Managing the API Queue

As test payloads will endup in the API Request Queue which are not needed, you can remove queue jobs by clicking the X to the left of any queue entry. Those not removed will remain in the queue and returned in in a FIFO fashion by a subsequent Data Import app. So you will want to purge the queue when all testing has been completed.