How and where a webapp stores the organisation's information (data & files) is critical.
In this guide we cover saving and retrieving data & files from storage and protecting the organisations stored information.
Remember if you have any questions please email as at learn@entityos.cloud
The entityos Javascript framework includes a .save()
function to help with saving organisation data.
The most common options for .save() are;
Option | Description | Example |
---|---|---|
object | The type of object you are updating. entityos has many organsational objects included. | contact_person |
data | The data fields you are updating ie mobile number | {id: 1234, mobile: '0400 123 456'} |
callback | The function to be called once the update has been completed by entityos.cloud | myApp.refreshContact |
entityos.cloud.save(
{
object: 'contact_person',
fields:
{
id: 1234,
mobile: '0400 123 456'
},
callback: myApp.refreshContact
})
The entityos Javascript framework includes a .retrieve()
function to help with retrieving data.
The most common .retrieve() options are;
Option | Description | Example |
---|---|---|
object | The type of object you are updating. entityos has many organsational objects included. | contact_person |
fields | Which fields do you want returned. | [{name: 'mobile'}, {name: 'firstname'}] |
filters | Array to filters |
[{name: 'mobile', comparison: 'EQUAL_TO', value1: 'Jane'}]
Filter comparisons |
sorts | Array of data sorting | [{name: 'mobile', direction: 'asc'}] |
callback | The function to be called once the retrieve has been completed by entityos.cloud | myApp.showSurname |
entityos.cloud.retrieve(
{
object: 'contact_person',
fields: [{name: 'firstname'}, {name: 'surname'}],
filters: [{name: 'firstname', comparison: 'EQUAL_TO', value: 'Jane'}],
sorts: [{name: 'firstname', direction: 'asc'}],
callback: myApp.showSurname
});
A lot of of an organisation's information is also contained in files.
The entityos Javascript framework includes a .upload()
function to make it easier to upload files into entityos.cloud storage.
It .upload() function will upload the file selected in a special HTML input
element.
<input type="file" name="file0" id="myapp-attach-file0">
The options for .upload() are;
Option | Description | Example |
---|---|---|
object | The type of object you are updating. entityos has many organsational objects included. | contact_person |
objectContext | The id of the object you are attaching the file to. | contact_person id |
context | The context within the app ie used to find the input box. | myapp |
callback | The function to be called once complete | myApp.uploadComplete |
To retrieve a file that has been saved (uploaded) into storage you first need to retrieve the information about the file using .retrieve()
with the object set as core_file
and the field download
included. You can then use this data to set the HTML a
element href
property.
entityos.cloud.retrieve( { object: 'core_file', fields: [{name: 'filename'}, {name: 'download'}], filters: [ {name: 'object', comparison: 'EQUAL_TO', value1: '32'}, {name: 'objectcontext', comparison: 'EQUAL_TO', value1: '123456'} ], sorts: [{name: 'filename', direction: 'asc'}], callback: 'app-files-show' })
<a href="/download/789">test.txt</a>
Then when a user then clicks on the a
element (ie text.txt), if they have access to it, the file will be downloaded.
Organisational data is valuable and also organisations have obligations to keep it private.
entityos.cloud includes a number of special objects that can be used to control access to data and files.
Object | Description |
---|---|
User Roles | Preset roles that contain access to the other objects in the organisation - ie viewing invoices. |
Users | Control who has access and how they have to authenticate themselves. |
Logon | Used by a user to authenticate themselves and return their authorisation - ie what entityos objects that have access to. |
Key factors when considering organisation information storage;
Factors | Description | entityos |
---|---|---|
Availability | Where is located? How long has it existed? | Based on AWS and 19+ years of service. entityos is independantly audited to ISO27001. |
Protection | Authentication, Authorisation & Accounting (Access Auditing) | Full authentication including 2nd factor and full role based authorisation with all user actions being accounted (audited). |
Existing structures | Existing objects | Full enterprise model |
To protect the entityOS storage from request overloading it is enabled with rate limiting as per below.
Method Type | Maximum Requests | Wait Time Once Maximum Reached |
---|---|---|
Normal | 500 / 60s | 240s |
Sensitive (Relates to Security) | 10 / 300s | 300s |
RateLimit-Limit: containing the requests quota in the time window.
RateLimit-Remaining: containing the remaining requests quota in the current window.
RateLimit-Reset: containing the time remaining in the current window, specified in seconds or as a timestamp.