The Add Datastore API

Using the Add Datastore API, you can create a data store in a Historian server.
METHOD POST
URI
https://<historianservername>/historian-rest-api/v1/datastoretostorage
SAMPLE PATH PARAM GET URI
https://<historianservername>/historian-rest-api/v1/datastoretostorage

Payload

{

"dataStoreName": "abc",

"storageName": "storage1",

"description": "test",

"isDefault": true

}
SAMPLE RESPONSE
{

    "ErrorCode": 0,

    "ErrorMessage": null

}
SAMPLE cURL COMMAND
curl -i -H "Accept: application/json" -i -H "Content-Type: application/json"
-H "Authorization: Bearer <TOKEN>” -d “{ \”dataStoreName \”:\”name\”,\" storageName \": \"sname\",\"description 
\":\" des\",\" isDefault \":false}” 
-X POST https://<historianservername>/historian-rest-api/v1/datastoretostorage

Query Parameters

Parameter Description Required? Values
Payload Contains the details of the data store in the JSON format. Yes Multiple

Response Parameters

Parameter Data Type Required? Description
ErrorCode Integer Yes For example, ErrorCode = 0 implies the operation was successful.
ErrorMessage String Yes For example, NULL.