Import & Update
Description¶
The PUT/api/metadata/dataset/{id}/update
endpoint is used for uploading time series data from a file and update a time series dataset data.
Example¶
This request to /api/metadata/dataset/{id}/update
{
"readerName": "CsvZipReader",
"writerName": "TSUpdater",
"originalFileName": "dataarchive.zip",
"uploadUrl": "https://dbstortest.blob.core.windows.net/data/dataarchive.zip?sp=r&st=2022-02-11T14:02:33Z&se=2022-02-11T22:02:33Z&spr=https&sv=2020-08-04&sr=b&sig=HIRX7FpRK7Z6RgkZRIy24t5eDMa3pnoGLGy5IhvMKCk%3D",
"readerParameters": [],
"writerParameters": [],
"transformations": []
}
will import time series from an archive with CSV files.
Click to show example shell script
projectid="<replacewithprojectid>" datasetid="<replacewithdatasetid>" openapikey="<replacewithopenapikey>" reader="CsvZipReader" writer="TSUpdater" filename="dataarchive.zip" sourceurl="<source-file-url>" curl -L -X PUT "https://api.mike-cloud-test.com/api/metadata/dataset/{$datasetid}/update" \ -H 'Content-Type: application/json' \ -H "dhi-open-api-key: $openapikey" \ --data-raw "{ \"readerName\": \"$reader\", \"writerName\": \"$writer\", \"originalFileName\": \"$filename\", \"uploadUrl\": \"$sourceurl\", \"readerParameters\": [], \"writerParameters\": [], \"transformations\": [] }"