Common-storage is a personal-data-server in which bookmarks, events, tasks, and other data can be added.
feed
: an overview of the topics on the current data-server
Administration
user
: create & manage users, and grant them permissions by assigning rolesrole
: create & manage roles, which restrict access to endpoints and topics
Data Storage
topic
: create & manage topics, which logically groups related data & constrains its members to matching JSON Schemacontent
: append & retrieve "content" (json entries) to a topic
Data Synchronisation
subscription
: create & manage subscriptions, which sync content from a remote common-storage server's topic to a local topic
An overview of the topics on the current data-server
GET /feed
Returns a description provided by the server, and a list of topics & associated statistics
Response
{
description,
title,
version,
topics: [{
topic: {
name,
description,
created
},
stats: {
count,
lastUpdated
}
}]
}
Create & manage users, and grant them permissions by assigning roles
GET /user/:name
Parameters
name
: the account user-name
POST /user/:name
Parameters
name
: the account user-name
Body
{
"role": "my_user_role",
"password": "this-is-the-user-password"
}
Create & manage roles, which restrict access to endpoints and topics
GET /role/:name
Get details about & permissions associated with a role
Parameters
name
: the role name
POST /role/:name
Post a named permission-set (a role) to the server
Parameters
name
: the role name
Body
{
"permissions": [
{
"routes": ["GET /content"],
"topics": ["notes"]
}
]
}
Create & manage topics, which logically groups related data & constrains its members to matching JSON Schema
GET /topic/:name
Get details about a topic, like the description and creation-date
Parameters
Body
POST /topic/:name
Add a named, validated container for data to the server
Parameters
Body
DELETE /topic/:name
Delete a topic and all associated data from the server
Parameters
Body
Append & retrieve "content" (json entries) to a topic
GET /content/:name
Retrieve an array of user-submitted content from the server, from a specified
start-id. By sending the content-type application/x-ndjson
, retrieve an unbounded JSON stream
of content instead
Parameters
Body
POST /content/:name
Post user-content to a topic
Parameters
Body
Append & retrieve "content" (json entries) to a topic
Create & manage subscriptions, which sync content from a remote common-storage server's topic to a local topic
GET /subscription/:topic
Get information about a subscription.
Parameters
topic
: the topic to which the subscriptions stores content
POST /subscription/:topic
Create a subscription to a remote server.
Parameters
topic
: the topic to which the subscriptions stores content
Body
{
"source": "https://remote-server/content/notes",
"topic": "subscription.notes",
"serviceAccount": "remote_server_read_notes",
"frequency": 300
}
DELETE /subscription/:topic
Delete a subscription.
Parameters
topic
: the topic to which the subscriptions stores content