07-04-2018 10:55 PM - edited 03-01-2019 01:37 PM
Hi,
I'm testing creating datastore api on HX.
I got the expected result other APIs like get datastore summary.
But I can't create datastore via api.
I'm using restexplorer with the datastore parameters
{
"name": "string",
"size": 100,
"id": "string",
"dataBlockSize": 0
}
I got the follwoing output as the result
{ "message": "Datastore not found", "messageId": 401 }
What is the problem?
Solved! Go to Solution.
08-08-2018 07:48 AM
Hi,
In order to create the datastore, I beleive you need to remove the "id" parameter from the body. So to create a new datstore called "mynewdatstore" with a size of "50G" with a blocksize of "8K" you would use the following body in your API call:
{
"name": "mynewdatastore,
"size": 50000000000,
"dataBlockSize": 8192
}
After the datstore is created, the system will return the datastore "id", which can then be used with the same API call to update (resize) the datstore. So to create datastore, leave out "id" parameter, to update datstore, you will need the "id" of an existing datastore.
Hope that helps!
Thanks
Mike
08-08-2018 07:48 AM
Hi,
In order to create the datastore, I beleive you need to remove the "id" parameter from the body. So to create a new datstore called "mynewdatstore" with a size of "50G" with a blocksize of "8K" you would use the following body in your API call:
{
"name": "mynewdatastore,
"size": 50000000000,
"dataBlockSize": 8192
}
After the datstore is created, the system will return the datastore "id", which can then be used with the same API call to update (resize) the datstore. So to create datastore, leave out "id" parameter, to update datstore, you will need the "id" of an existing datastore.
Hope that helps!
Thanks
Mike
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide