Upload data via Postman
- Last UpdatedSep 11, 2023
- 2 minute read
Through the API, you can upload data using a tool such as Postman. The following sections detail how to obtain the authentication token, upload your data using Postman, and then check the status of your upload job. Once a job has been accepted and processed, added tags will be visible from the AVEVA Insight search field and available to use.
For guidelines on preparing your files for upload, see About CSV and JSON data files.
To upload data via Postman
-
Obtain the upload endpoint URL and upload token.
-
In AVEVA Insight, navigate to the Administrative panel and open Data Sources.
-
Add a new data source. See Define a CSV/JSON data source for more information on this process.
-
Copy the Upload endpoint and Token.
More information on the upload endpoint and token can be found in Upload endpoint and token.
-
-
In Postman, create a new POST request and populate it with the endpoint and token obtained in the previous step.
-
Paste the contents of your data file into the body of the POST request using the raw body type.
-
Send the request.
On a successful upload, a 202 status code indicating an accepted upload will be returned, as well as a Job ID. Once an upload has been accepted, it will be queued for processing. You can check on the status of your job through either:
-
The Data Sources administrative panel. See View data source upload history for more information.
-
The API. The Job ID returned can be used in subsequent calls to check on the status of an upload. For more information, see below.
Note: The Data Sources administrative panel method only returns the status for the most recent 600 upload jobs. In specific data upload scenarios involving a high number of concurrent file uploads, you must use the API to check on the status of your uploads.
After processing, you'll be able to see the tags you've added in the AVEVA Insight search field.
-
Use the Data Source Services API to query pending processing jobs
To query the status of pending upload jobs, create a new GET request using the following endpoint. Replace YourJobID with the ID returned by the data upload call.
https://online.wonderware.com/apis/DataSourceServices/HistoryByJobId?JobId=YourJobID
The authentication method uses the same token as the one used for data upload.
The return for this call will include details on your processing job, including the upload status, the completion time, and an error message in case of upload failure.