Data management
Two types of data management
Personium manages user's data with Elasticsearch and file system.
Data on Elasticsearch is OData interface, data on file system follows WebDAV interface.
OData (Open Data Protocol)
A protocol that standardized data access method in Web application.
It returns JSON or XML data as a response in the standard WebAPI HTTP request.
OData official : http://www.odata.org/WebDAV (Web-based Distributed Authoring and Versioning)
Protocol aimed at managing files on a Web server that extends HTTP 1.1.
It can be used without problem even under Proxy environment because of pure HTTP extension.
In addition to the HTTP standard, several methods such as PROPFIND have been added.
WebDAV official : https://web.archive.org/web/20120626092812/http://webdav.org/
Management of each object data
Indicates management of each object of Personium.
Category | Object | Interface type |
---|---|---|
Unit control object | Cell | OData |
Cell control object | Role Account Box ExtCell Relation ExtRole SentMessage ReceivedMessage | OData |
Box resource schema | ODataServiceCollection WebDAVServiceCollection EngineServiceCollection | WebDAV |
Box resource File | File ServiceCollectionSource | WebDAV |
Box resource OData | EntityType AssociationEnd ComplexType Property ComplexTypeProperty Entity | OData |
Access control setting | ACL (Cell Level) ACL (Box Level) | WebDAV |
Reference information
For example, if you want to acquire the data in the cell for backup purposes etc., it can be done by executing the Personium API.
Account password can not be obtained.
How to get OData's data
Execute list acquisition API of each object and obtain data.
In the case of a large amount of data, it is good to utilize the query at the time of API execution and acquire it in multiple times.
- $inlinecount : Acquire the number of search results
- $top : Restrict the number of search results
- $skip : Acquire the specified number of skipped search results
- $orderby : Sort search results
How to get WebDAV's data
ACL (Cell Level)
Execute property acquisition API of Cell.
Box resource
Execute the collection setting acquisition API with depth = 1.
The following information can be acquired with the collection setting acquisition API.
- Resource Path
- Resource Type (ODataServiceCollection, WebDAVServiceCollection, EngineServiceCollection, File)
- ACL
When the Resource Type is WebDAVServiceCollection or EngineServiceCollection, the collection setting acquisition API is recursively executed for that subordinate to acquire information.
If the Resource Type is a file, execute the file acquisition API and acquire the file.
How to register acquired data
Execute creation / registration API of corresponding object.
If there are multiple data, execute it recursively.