|
<< Click to Display Table of Contents >> Raynet One Data Hub > 2026.2 > Administration and User Guide > Advanced Topics > Data API Pushing Data to Container Tasks |
The POST /v1/Tasks/{taskId}/data endpoint allows external systems, scripts, and automation workflows to push data directly into a container task's result table. This endpoint is the programmatic counterpart to the manual file import wizard and supports both a full-refresh (replace) and an incremental (append) write mode.
This endpoint is only available for tasks of the type Container. Requests targeting tasks of any other type are rejected with an HTTP 400 error.
POST
http://[host]:[port]/v1/Tasks/{taskId}/data
Parameter |
Required |
Description |
|---|---|---|
taskId |
Yes |
The unique identifier (GUID) of the target container task. The task ID can be obtained from the task details view or by querying the Tasks API. |
Parameter |
Required |
Description |
|---|---|---|
mode |
No (default: replace) |
Controls how the uploaded data is written to the result table. Accepted values: •replace — All existing rows in the result table are deleted and replaced with the uploaded data. •append — The uploaded rows are added to the existing data in the result table. |
Header |
Required |
Description |
|---|---|---|
X-Api-Key |
Yes |
API key used to authenticate the request. The key must have access to the result table of the target container task. See Granular API Key Access Control for details on configuring table-level access. An API key scoped to the task's result table can also be generated directly from the Data Ingestion tab. |
Content-Type |
Yes |
Specifies the submission method. Accepted values: •multipart/form-data — File upload (CSV, JSON, or XLSX) •application/json — Raw JSON body |
The request body must contain the data file to upload. The endpoint supports two submission methods:
•Multipart file upload — Send the file as a multipart/form-data request. The file field name in the form must be file. This method supports CSV, JSON, and XLSX files.
•Raw JSON body upload — Send a JSON array directly in the request body with the Content-Type: application/json header. This method is suitable for JSON payloads only.
The maximum accepted file size is 20 GB per request.
Status Code |
Description |
|---|---|
200 OK |
The data was successfully uploaded and written to the result table. The response body contains the number of rows processed. |
400 Bad Request |
The request is invalid. Common causes: the specified task is not a container task, the mode parameter value is not replace or append, no file was provided, or the task has no associated result table. |
401 Unauthorized |
The X-Api-Key header is missing or the provided API key is invalid. |
403 Forbidden |
The API key does not have permission to write to the result table of the specified container task. |
404 Not Found |
No task with the specified taskId was found. |
•Granular API Key Access Control
•Authentication and Authorization