StoreApi
Static Methods
Create
Creates an instance of the StoreApi.
Params
connection
Connection
Instance of Connection
Returns
StoreApi
·
Created instance of the StoreApi.
Methods
CreateStore
Creates a new Store in given Context.
Params
contextId
string
ID of the Context to create the Store in.
users
List<UserWithPubKey>
Array of UserWithPubKey structs which indicates who will have access to the created Store.
managers
List<UserWithPubKey>
Array of UserWithPubKey structs which indicates who will have access (and management rights) to the created Store.
publicMeta
byte[]
Public metadata that will remain unencrypted on the Bridge.
privateMeta
byte[]
Private metadata that will be encrypted before being sent to the Bridge.
policies
ContainerPolicy?
(optional) Store policy.
Returns
string
·
Created Store ID.
UpdateStore
Updates an existing Store.
Params
storeId
string
ID of the Store to update.
users
List<UserWithPubKey>
Array of UserWithPubKey structs which indicates who will have access to the created Store.
managers
List<UserWithPubKey>
Array of UserWithPubKey structs which indicates who will have access (and management rights) to the created Store.
publicMeta
byte[]
Public metadata that will remain unencrypted on the Bridge.
privateMeta
byte[]
Private metadata that will be encrypted before being sent to the Bridge.
version
long
Current version of the updated Store.
force
bool
Force update (without checking version).
forceGenerateNewKey
bool
Force to renenerate a key for the Store.
policies
ContainerPolicy?
(optional) Store policy.
DeleteStore
Deletes a Store by given Store ID.
Params
storeId
string
ID of the Store to delete.
GetStore
Gets a single Store by given Store ID.
Params
storeId
string
ID of the Store to get.
Returns
Models.Store
·
Information about about the Store.
ListStores
Gets a list of Stores in given Context.
Params
contextId
string
ID of the Context to get the Stores from.
pagingQuery
PagingQuery
List query parameters.
Returns
PagingList<Models.Store>
·
List of Stores.
CreateFile
Creates a new file in a Store.
Params
storeId
string
ID of the Store to create the file in.
publicMeta
byte[]
Public file meta_data.
privateMeta
byte[]
Private file meta_data.
size
long
Size of the file.
Returns
long
·
Handle to write data.
UpdateFile
Updates an existing file in a Store.
Params
fileId
string
ID of the file to update.
publicMeta
byte[]
Public file meta_data.
privateMeta
byte[]
Private file meta_data.
size
long
Size of the file.
Returns
long
·
Handle to write file data.
UpdateFileMeta
Updates meta data of an existing file in a Store.
Params
fileId
string
ID of the file to update.
publicMeta
byte[]
Public file meta_data.
privateMeta
byte[]
Private file meta_data.
WriteToFile
Writes a file data.
Params
fileHandle
long
Handle to write file data.
dataChunk
byte[]
File data chunk.
DeleteFile
Deletes a file by given ID.
Params
storeId
string
ID of the file to delete.
GetFile
Gets a single file by the given file ID.
Params
fileId
string
ID of the file to get.
Returns
File
·
Information about the file.
ListFiles
Gets a list of files in given Store.
Params
storeId
string
ID of the Store to get files from.
pagingQuery
PagingQuery
List query parameters.
Returns
PagingList<File>
·
List of files.
OpenFile
Opens a file to read.
Params
fileId
string
ID of the file to read.
Returns
long
·
Handle to read file data.
ReadFromFile
Reads file data.
Params
fileHandle
long
Handle to write file data.
length
long
Size of data to read.
Returns
byte[]
·
File data chunk.
SeekInFile
Moves read cursor.
Params
fileHandle
long
Handle to write file data.
position
long
New cursor position.
CloseFile
Closes the file handle.
Params
fileHandle
long
Handle to read/write file data.
Returns
string
·
ID of closed file.
SubscribeForStoreEvents
Subscribes for the Store module main events.
UnsubscribeFromStoreEvents
Unsubscribes from the Store module main events.
SubscribeForFileEvents
Subscribes for the events in given Store.
Params
storeId
string
ID of the Store to subscribe for.
UnsubscribeFromFileEvents
Unsubscribes from the events in given Store.
Params
storeId
string
ID of the Store to unsubscribe from.
We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.