Child pages
  • ListStores
Skip to end of metadata
Go to start of metadata

Description

The ListStores API allows the Account Owner to retrieve a list of all the Stores that were previously created. 

 

In apstrata, data & digital assets are persisted in a database container called a Store. Individual data items persisted in a Store are called Documents

All Documents saved in an apstrata Store are secured individually with ACLs (from wikipedia: Access Control Lists), allowing developers to specify the Users and/or Groups that can view, update or delete a Document, or more granularly individual fields within that Document. In addition, apstrata provides a "gate" ACL system per Store, allowing a developer to decide the Users and/or Groups that are permitted globally to create, read, update or delete documents on that Store.

A developer can create any number of Stores (limited only by his apstrata account type) to persist different types of data from his application, this would be dictated by security, scalability or application partitioning reasons. As an example the developer might create a Store called PO for his purchase orders repository and another one called Catalog for his inventory description and images.

Apstrata Stores are transactional, allowing the developer to run reliably Atomic bundles of persistant operations (Create, Read, Update, Delete) that will succeed or fail together.

Upon creation, apstrata accounts are configured with a store named "DefaultStore". An account owner can delete this store and create others if needed. 

As described above, ACL settings on each store specify who can invoke each of the SaveDocument, DeleteDocument, GetFile, and Query services in general. For more specific details about Store configuration parameters, please check the SaveConfiguration API.

 

Note that when a trial account is first created, you will see the DefaultStore listed automatically. The trial account is limited to a single store however the DefaultStore can be deleted and another store created with a different name if desired.

Specific Request Parameters

(Refer to Common Request Parameters)

Specific Response Elements

(Refer to Common Response Elements)

The following specific "result" element is a child of the common root element "response" and a sibling of the common "metadata" element:

{
	"result": {
		"stores": [{"name": "name of a store"},{"name": "name of another store"}]
	}
}

 

Specific Logical Errors

(Refer to Common Logical Error Codes)

Examples

Sample Request

Request URL: http://sandbox.apstrata.com/apsdb/rest/[authenticationkey]/ListStores?apsws.time=[timestamp]&apsws.authSig=[signature] 


POST parameters: [None]

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>
    <result>
        <stores>
            <store name="store1"></store>
            <store name="store2"></store>
        </stores>
    </result>
<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": "success"
  },
  "result": {
    "stores": [
      {
        "name": "store1"
      },
      {
        "name": "store2"
      }
    ]
  }
}} 
  • No labels