Data Stores

Access Data Stores (built-in key-value store).

get
Get All Stores

https://api.appmixer.com/stores
Get all key-value stores. curl "https://api.appmixer.com/stores" -H "Authorization: Bearer [ACCESS_TOKEN]"
Request
Response
200: OK
Cake successfully retrieved.
[{
"name": "My Store 1",
"storeId": "5c6fc9932ff3ff000747ead4"
}, {
"name": "My Store 2",
"storeId": "2a3fc9512bb3fca23747lai2"
}]

get
Get One Store metadata

https://api.appmixer.com/stores/:id
Get name of a store. curl "https://api.appmixer.com/stores/5c6fc9932ff3ff000747ead4" -H "Authorization: Bearer [ACCESS_TOKEN]"
Request
Response
Path Parameters
id
required
string
Store ID.
200: OK
{
"name": "My Store 1",
"storeId": "5c6fc9932ff3ff000747ead4"
}

get
Get Number of Records in a Store

https://api.appmixer.com/store/count
Get number of records in a store. curl "https://api.appmixer.com/store/count?storeId=5c6fc9932ff3ff000747ead4" -H "Authorization: Bearer [ACCESS_TOKEN]"
Request
Response
Path Parameters
storeId
required
string
Store ID.
200: OK
{
"count": 681
}

get
Get Store Records

https://api.appmixer.com/store
Get records. Supports search and pagination. curl "https://api.appmixer.com/store?storeId=5b213e0ef90a6200113abfd4&offset=0&limit=30&sort=updatedAt:-1" -H "Authorization: Bearer [ACCESS_TOKEN]"
Request
Response
Query Parameters
storeId
required
string
Store ID.
sort
optional
string
Store record parameter to sort by. Followed by ":" and the sort order -1 (descending) or 1 (ascending).
offset
optional
number
Index of the first record returned.
limit
optional
number
Maximum number of records returned.
200: OK
[{
"key":"Box 8RE1",
"storeId":"5b214ba6f90a6200113abfd8",
"userId":"583c06511afb7b0016ef120b",
"updatedAt":"2019-03-06T10:02:20.419Z",
"value":"321",
"createdAt":"2019-03-06T10:02:20.419Z"
},{
"key":"T-shirt T41B",
"storeId":"5b214ba6f90a6200113abfd8",
"userId":"583c06511afb7b0016ef120b",
"updatedAt":"2019-03-06T10:01:59.360Z",
"value":"18",
"createdAt":"2019-03-06T10:01:59.360Z"
},{
"key":"T-shirt A12C",
"storeId":"5b214ba6f90a6200113abfd8",
"userId":"583c06511afb7b0016ef120b",
"updatedAt":"2019-03-06T10:01:45.204Z",
"value":"12",
"createdAt":"2019-03-06T10:01:45.204Z"
}]

post
Create a new Store

https://api.appmixer.com/stores
Create a new key-value store. Returns the newly created Store ID. curl -XPOST "https://api.appmixer.com/stores" -H "Authorization: Bearer [ACCESS_TOKEN]" -H "Content-Type: application/json" -d '{ "name": "My Store" }'
Request
Response
Body Parameters
name
required
string
Name of the store.
200: OK
"5c7f9bfe51dbaf0007f08db0"

delete
Delete a Store

https://api.appmixer.com/stores/:id
Delete a store and all the records in the store. curl -XDELETE "https://api.appmixer.com/stores/5c7f9bfe51dbaf0007f08db0" -H "Authorization: Bearer [ACCESS_TOKEN]"
Request
Response
Path Parameters
id
required
string
Store ID.
200: OK

put
Rename a Store

https://api.appmixer.com/stores/:id
Rename an existing store. curl -XPUT "https://api.appmixer.com/stores/5c7f9bfe51dbaf0007f08db0" -H "Authorization: Bearer [ACCESS_TOKEN]" -H "Content-Type: application/json" -d '{ "name": "My New Name" }'
Request
Response
Path Parameters
id
required
string
Store ID.
Body Parameters
name
required
string
New name of the store.
200: OK
{
"oldName":"My Old Store Name",
"storeId":"5c7f9bfe51dbaf0007f08db0"
}

post
Create a new Store Item

https://api.appmixer.com/stores/:id/:key
Create a new value in the store under a key. curl -XPOST "https://api.appmixer.com/stores/5c7f9bfe51dbaf0007f08db0/mykey" -H "Authorization: Bearer [ACCESS_TOKEN]" -H "Content-Type: text/plain" -d "my value"
Request
Response
Path Parameters
key
required
string
Key under which the posted value will be stored.
id
required
string
Store ID.
Body Parameters
optional
string
Value to store under the key.
200: OK
{
"key":"mykey",
"value":"myvalue",
"createdAt":"2019-03-06T10:17:58.796Z",
"updatedAt":"2019-03-06T10:17:58.796Z"
}

delete
Delete Store Items

https://api.appmixer.com/store
Delete one or multiple items from a store. curl -XDELETE "https://api.appmixer.com/store" -H "Authorization: Bearer [ACCESS_TOKEN]" -H "Content-Type: application/json" -d '[{ key: "mykey", storeId: "5c7f9bfe51dbaf0007f08db0" }, { "key": "mykey2", "storeId": "5c7f9bfe51dbaf0007f08db0" }]'
Request
Response
Body Parameters
items
required
array
Array of items to delete. Each item is an object of the form { key, storeId }.
200: OK
{
"deletedCount": 1
}