The Default Data Store Update API

Using the Default Data Store Update API, you can change the default data store.
METHOD PUT
URI
https://<historianservername>/historian-rest-api/v1/storage/<location name>
SAMPLE URI
https://<historianservername>/historian-rest-api/v1/storage/NPI212611749M1

Payload

{

            "StorageName": "NPI212611749M1",

            "StorageType": 0,

            "NumberOfDataStores": 5,

            "NumberOfArchivers": 1,

            "DataStores": [

                "User",

                "testDS1",

                "ScadaBuffer",

                "testDS2",

                "DHSSystem"

            ],

            "Id": "9CD06AFB-1566-4CE6-99D4-B2F65857F33A",

            "IsDefault": true,

            "LastModifiedUser": null,

            "LastModifiedTime": "1970-01-01T00:00:00.000Z",

            "ArchiverServices": [                

             "DataArchiver_NPI212611749M1", "DataArchiver_distamchine1"

            ]

        }

}
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 “{ \”StorageName\”:\”name\”,\"StorageType\": 0,
\”NumberOfDataStores\”:5,\” NumberOfArchivers\”:1,

\”IsDefault\”:true,\”ArchiverServices\”: [\"DataArchiver_NPI212611749M1\", 
\"DataArchiver_distamchine1"\"]}” -X PUT 
https://<historianservername>/historian-rest-api/v1/storage/NPI212611749M1

Query Parameters

Parameter Description Required? Values
Payload Contains the values of the attributes of the default data store that you want to change. 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.