This component is used to write data to a key-value store and retrieve data from that store.
When data is written, an id is assigned to it, with the help of which access to this data will be possible.
It will connect to the cassandra database via the datastax driver and provide the ability to write and retrieve the data stored there using REST API.
http://localhost:8080/getById
- returns an object from collection by id
Accepts following query parameters:
collection
- text, name of collection from which object requestedid
- text, id of requested objectuserId
- text, uuid-formatted string, identified user from whose part of storage data will be receivedtimestamp
- number, unix-format time when object was written (optional)
http://localhost:8080/getWorkspaceLink
- returns a workspace link by id
Accepts following query parameters:
id
- text, id of requested linkuserId
- text, uuid-formatted string, identified user from whose part of storage data will be received
http://localhost:8080/idsFromCollection
- returns a list of ids from collection
Accepts following query parameters:
collection
- text, name of collection from which ids requesteduserId
- text, uuid-formatted string, identified user from whose part of storage data will be receivedsort
- text, get only "ascending" value. Means that ids will be sorted by timestamp in ascending order (default - descending) (optional)
http://localhost:8080/allRecordsFromCollection
- returns a list of records from collection
Accepts following query parameters:
collection
- text, name of collection from which records requesteduserId
- text, uuid-formatted string, identified user from whose part of storage data will be receivedsort
- text, get only "ascending" value. Means that records will be sorted by timestamp in ascending order (default - descending) (optional)
http://localhost:8080/getUserPreferences
- returns a json-formatted user preferences
Accepts following query parameters:
userId
- text, uuid-formatted string, identified user whose preferences will be received
http://localhost:8080/store
- stores data in the required collection and returns an id of stored data
Request body fields:
id
- text, id-keyword for special data ('defaultUser', for example) (optional)collection
- text, name of collection where the data will be storedpayload
- object, data to storeuserId
- text, uuid-formatted string, identified user in whose part of storage data will be stored
http://localhost:8080/update
- updates record in collection by id
Request body fields:
id
- text, id of record for updatecollection
- text, name of collection where the data will be updatedpayload
- object, updated data to storeuserId
- text, uuid-formatted string, identified user in whose part of storage data will be updated
http://localhost:8080/updateUserPreferences
- updates user preferences
Request body fields:
payload
- object, updated data to storeuserId
- text, uuid-formatted string, identified user in whose part of storage data will be updated
http://localhost:8080/registerUser
- register user in storage, return user id
Request body fields:
name
- text, user`s namepreferences
- object, user`s preferences data (optional)
http://localhost:8080/deleteRecordFromCollection
- delete record in collection by id
Accepts following query parameters::
collection
- text, name of collection from where records will be deletedid
- text, id of record for deleteuserId
- text, uuid-formatted string, identified user in whose part of storage data will be deleted
http://localhost:8080/dropCollection
- delete all records in collection
Accepts following query parameters:
collection
- name of collection where records will be deleteduserId
- text, uuid-formatted string, identified user in whose part of storage data will be dropped
http://localhost:8080/clearCollection
- delete only not default records in collection
Accepts following query parameters:
collection
- text, name of collection where not default records will be deleteduserId
- text, uuid-formatted string, identified user in whose part of storage data will be cleared