Storage API
Storage API is used to store and retrieve files from the application storage. Storage is a part of the application and is used to store api definitions, javascript, css, templates, and other resources. Each application has its own storage.
Application directory structure
example:
/components
- components/pages
- pages/js
- javascript/css
- client css/srs
- api definition files/templates
- templates
REST API
Storage status
app_{app_name}_read
Browse
app_{app_name}_read
withsubdir
default = truetext-ext
default = "" example .md,.txt,.sql,.html,.xml,.json,.css,.jskb
max kilobytes read default 0kboptions
:srs
: convert all srs to json object (properties.data node) example{{host}}/api/core/storage/browse/erp/srs?options=srs&kb=200
json
: convert all xml to json object (properties.data node)xls
: try to make html preview of xml (content node)scm
: get scm status (commit node)code
: get code node for visual editor
HTTP | |
---|---|
GET ZIP
app_{app_name}_read
HTTP | |
---|---|
GET FILE
app_{app_name}_read
Get from storage (acl aplied here)
w
- widthh
- heighto
- options
HTTP | |
---|---|
HTTP | |
---|---|
GET META
app_{app_name}_read
Query parameters:
kb
max kilobytes read default 1000kbtextext
default=.md,.txt,.sql,.html,.xml,.json,.css,.js,.svg,.log
options
default =srs json xls code scm
HTTP | |
---|---|
UPLOAD
app_{app_name}_write
HTTP | |
---|---|
|
SAVE
app_{app_name}_write
DELETE
app_{app_name}_write