Description
The CreateStore API allows the Account Owner to create Stores.
Default Store
When you register for apstrata, a store called "DefaultStore " will be created for you.
In all services that require you to specify a store or, in case you have NOT sent the apsdb.store parameter, the request store will be considered the default store.
Note that if you deleted the DefaultStore, and requested a service that requires a store, an error will be thrown.
Specific Request Parameters
(Refer to Common Request Parameters)
Name | Description | Required | Default | Possible Values |
---|---|---|---|---|
apsdb.store | The store name of the store to be created. It must be unique. | Yes |
|
|
apsdb.saveDocumentACL | Sets the users or groups who have access to the SaveDocument service.The ACL are applied per store sent in the [storeName] attribute.Each new value will replace the existing one. | No |
| ACL predefined identifiers ("nobody”, “anonymous", "authenticated-users") or users or groups |
apsdb.deleteDocumentACL | Sets the users or groups who have access to the DeleteDocument service.The ACL are applied per store sent in the [storeName] attribute.Each new value will replace the existing one. | No |
| ACL predefined identifiers ("nobody”, “anonymous", "authenticated-users") or users or groups |
apsdb.getFileACL | Sets the users or groups who have access to the GetFile service.The ACL are applied per store sent in the [storeName] attribute.Each new value will replace the existing one. | No |
| ACL predefined identifiers ("nobody”, “anonymous", "authenticated-users") or users or groups |
apsdb.queryACL | Sets the users or groups who have access to the Query service.The ACL are applied per store sent in the [storeName] attribute.Each new value will replace the existing one. | No |
| ACL predefined identifiers ("nobody”, “anonymous", "authenticated-users") or users or groups |
Specific Response Elements
(Refer to Common Response Elements)
Specific Logical Errors
(Refer to Common Logical Error Codes)
Error | Message | Status Code |
---|---|---|
INVALID_STORE_NAME | Store name is invalid. Please refer to the online documentation for a detailed list of acceptable values | 400 |
DUPLICATE_STORE_NAME | Store already exists, please choose another name | 400 |
STORE_NOT_FOUND | The store was not found | 404 |
NOT_ENOUGH_SPACE | Not enough space in your current plan to create a new store | 409 |
MAX_STORES_EXCEEDED | The maximum number of allowed stores has been exceeded. | 400 |
PARAMETER_REQUIRED |
| 400 |
Examples
Sample Request
Request URL: http://sandbox.apstrata.com/apsdb/rest/[authenticationkey]/CreateStore?apsws.time=[timestamp]&apsws.authSig=[signature]
POST parameters:
apsdb.store=ClevelandMain
Sample XML Response
Success XML:
<response xmlns="http://www.apstrata.com/services/schemas/apstrata_database_response.xsd"> <metadata> <requestId>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</requestId> <status>success</status> </metadata> </response>
Failure XML:
<response xmlns="http://www.apstrata.com/services/schemas/apstrata_database_response.xsd"> <metadata <requestId>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</requestId> <status>failure</status> <errorCode>[errorCode]</errorCode> <errorDetail>[failMsg]</errorDetail> </metadata> </response>
Sample JSON Response
{"response": { "metadata": { "requestId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "status": "sucess" } }}