Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Insight

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

  1. 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.

  2. Define a file header. See the "File header elements" section for details.

  3. Get the HTTPS endpoint for your data source:

    1. From the Data sources page, select 3dots_gray to the right of the data source name, and then select Upload data or metadata.

      The Upload dialog box displays.

      The Upload dialog

    2. Under Upload endpoint, select copy icon gray to copy the displayed endpoint to the Clipboard.

    3. Paste it into your post query.

  4. Get the bearer token for your data source:

    1. Go to the Upload dialog box.

    2. Under Token, select copy icon gray to copy the displayed bearer token to the Clipboard.

    3. Paste it into your post query.

  5. 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:

  • text/csv -- Use for a CSV file.

  • application/json -- Use for a JSON file.

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:

  • gzip -- Must have this header if the content being sent is compressed using gzip encoding.

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:

    An exemple with Overwrite set to "True"

  • 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.

In This Topic
TitleResults for “How to create a CRG?”Also Available in