Upload data using token authentication
- Last UpdatedAug 16, 2022
- 3 minute read
You can upload CSV or JSON data or metadata to a existing CSV/JSON data source via a specific HTTPS endpoint using token authentication.
To upload a CSV or JSON data or metadata file using a bearer token
-
Create the data file or metadata file you want to use.
Note: Uploading tag metadata is not a required step. When you import data values, the tags are automatically created at that time. You can change metadata later if necessary, but excessive updates to metadata may affect retrieval performance.
-
Define a file header. See the "File header elements" section for details.
-
Get the HTTPS endpoint for your data source:
-
From the Data sources page, select
to the right of the data source name, and then select Upload data or metadata.
The Upload dialog box displays.

-
Under Upload endpoint, select
to copy the displayed endpoint to the Clipboard.
-
Paste it into your post query.
-
-
Get the bearer token for your data source:
-
Go to the Upload dialog box.
-
Under Token, select
to copy the displayed bearer token to the Clipboard.
-
Paste it into your post query.
-
-
Use these in your POST request to upload your data or metadata file.
File header elements
When using the HTTPS endpoint, you must specify the following header in your file:
|
Header element |
Description |
|
Content-Type |
Can be one of the following:
|
|
x-filename (optional) |
This name is displayed in the upload history, and can be used to supply some metadata which may be useful in diagnostics and troubleshooting. If not specified, the name is automatically generated. |
|
content-encoding (optional) |
Can be the following:
|
Optional headers
You may opt to use the following headers as appropriate:
-
Overwrite set to True
When you upload data using the Data Source page to drag and drop a data file, AVEVA Insight automatically sets overwrite to True. (This is the default.) When using the data upload endpoint directly, you can add an "Overwrite" header with the value set to "True".
For example:

-
StorageMode set to Forced
When you upload data using the Data Source page to drag and drop a data file, AVEVA Insight automatically sets StorageMode to Forced. When using the data upload endpoint directly, you can add an "StorageMode" header with the value set to "Delta".
When StorageMode=Forced, all values provided, including duplicates and non-changed values, are stored. This is the default
When StorageMode=Delta, only changed values are stored.