Download OpenAPI specification:
A light-weight, document-based database including user-management. DocPouch is meant for tests, development or internal applications, where security is not a major factor. The database is file and text based and therefore also not layed out for high performance. Instead the main focus of DocPouch is simplicity and a small footprint.
User credentials for authentication
| name required | string User name for authentication |
| password required | string Password is used as main authentication element |
{- "name": "Darth Vader",
- "password": "darths-secret"
}{- "token": "string",
- "isAdmin": true,
- "userName": "string"
}Get all user information as admin or your user information as user
[- {
- "_id": "p3O5LB4T6C4PgkvW",
- "name": "admin",
- "email": "admin@example.com",
- "department": "administration",
- "group": "auto-created",
- "isAdmin": true
}
]Update any user (as admin) or your own user applying the provided attributes
| userID required | string Unique user ID |
Data object containing only the attributes to be updated
| name | string User names can be changed at any time and are not necessarily unique. Users are uniquely identified based on their id. |
| password | string Password is used as main authentication element |
string User email address | |
| isAdmin | boolean Flag indicating if the user has administrator privileges |
| department | string The department the user is part of |
| group | string The group the user is part of |
{- "name": "Darth Vader",
- "password": "darths-secret",
- "email": "darth@gmail.com",
- "isAdmin": false,
- "department": "Administration",
- "group": "The Magentas"
}JSON body with all information to create a new user
| name required | string User names can be changed at any time and are not necessarily unique. Users are uniquely identified based on their id. |
| password required | string Password is used as main authentication element |
string User email address | |
| department required | string The department the user is part of |
| group required | string The group the user is part of |
| isAdmin required | boolean Flag indicating if the user has administrator privileges |
{- "name": "Darth Vader",
- "password": "darths-secret",
- "email": "darth@gmail.com",
- "department": "Administration",
- "group": "The Magentas",
- "isAdmin": false
}{- "_id": "p3O5LB4T6C4PgkvW",
- "name": "admin",
- "email": "admin@example.com",
- "department": "administration",
- "group": "auto-created",
- "isAdmin": true
}Export full data as ZIP/JSON or export a single collection as JSON. Only available to administrators.
| scope | string Default: "all" Enum: "all" "users" "documents" "structures" Which data scope to export |
| format | string Default: "zip" Enum: "zip" "json" Export format. ZIP is only supported for scope=all. |
Import data from JSON (full or scoped) or ZIP (full only). Only available to administrators.
| file | string <binary> JSON file (scoped or full) or ZIP file (full import) |
| scope | string Default: "all" Enum: "all" "users" "documents" "structures" Import target scope. ZIP supports only scope=all. |
| mode | string Default: "replace" Enum: "replace" "add" "skip" Import mode: replace (overwrite same _id), add (new _id for same _id), skip (ignore same _id) |
JSON body with all the information to create a new document
| title required | string The title of the document |
| description | string The description of the document |
| type required | integer Type of document - can be used by user for document organization |
| subType required | integer Sub-type of document - can be used by user for document organization |
required | Array of objects The content of the document as an array of field objects |
| shareWithGroup required | boolean If true, the document is shared with all users in the owner's group |
| shareWithDepartment required | boolean If true, the document is shared with all users in the owner's department |
| public required | boolean If true, the document can be read by everybody |
{- "title": "Mission Statement",
- "description": "A brief description of the document",
- "type": 17,
- "subType": 11,
- "content": [
- {
- "label": "Document content here",
- "importance": 0
}
], - "shareWithGroup": false,
- "shareWithDepartment": false,
- "public": false
}{- "_id": "3ufDC0Rh5g7arSC9",
- "owner": "p3O5LB4T6C4PgkvW",
- "title": "Mission Statement",
- "description": "A brief description of the document",
- "type": 17,
- "subType": 11,
- "content": [
- {
- "label": "Document content here",
- "importance": 0
}
], - "shareWithGroup": false,
- "shareWithDepartment": false,
- "public": false
}List all documents readable by the user. This includes documents owned by the user, shared with the user's group or department, or marked as public. For administrators, all documents are listed.
[- {
- "_id": "3ufDC0Rh5g7arSC9",
- "owner": "p3O5LB4T6C4PgkvW",
- "title": "Mission Statement",
- "description": "A brief description of the document",
- "type": 17,
- "subType": 11,
- "content": [
- {
- "label": "Document content here",
- "importance": 0
}
], - "shareWithGroup": false,
- "shareWithDepartment": false,
- "public": false
}
]Fetch documents matching the query criteria that the user has access to. This includes own documents, documents shared with group/department, or public documents. Administrators can fetch any document.
An object describing the query to fetch the documents.
| _id | string Unique ID of document. Only used for queries and deletions |
| owner | string The _id of the user who owns this document |
| type | integer Type of document - can be used by user for document organization |
| subType | integer Sub-type of document - can be used by user for document organization |
| title | string The title of the document |
| description | string The description of the document |
| shareWithGroup | boolean If true, the document is shared with all users in the owner's group |
| shareWithDepartment | boolean If true, the document is shared with all users in the owner's department |
| public | boolean If true, the document can be read by everybody |
{- "_id": "3ufDC0Rh5g7arSC9",
- "owner": "p3O5LB4T6C4PgkvW",
- "type": 17,
- "subType": 11,
- "title": "Mission Statement",
- "description": "A statement describing the corporate mission or how to achieve the corporate vision",
- "shareWithGroup": false,
- "shareWithDepartment": false,
- "public": false
}[- {
- "_id": "3ufDC0Rh5g7arSC9",
- "owner": "p3O5LB4T6C4PgkvW",
- "title": "Mission Statement",
- "description": "A brief description of the document",
- "type": 17,
- "subType": 11,
- "content": [
- {
- "label": "Document content here",
- "importance": 0
}
], - "shareWithGroup": false,
- "shareWithDepartment": false,
- "public": false
}
]Users can update their own documents fully. Users with shared access (via group or department) can only update the content field. Only document owners can change sharing settings.
| documentID required | string Unique document ID |
Data object containing only the attributes to be updated
| _id required | string Unique ID of document. Only used for queries and deletions |
| owner required | string The _id of the user who owns this document |
| title required | string The title of the document |
| description | string The description of the document |
| type required | integer Type of document - can be used by user for document organization |
| subType required | integer Sub-type of document - can be used by user for document organization |
required | Array of objects The content of the document as an array of field objects |
| shareWithGroup | boolean If true, the document is shared with all users in the owner's group |
| shareWithDepartment | boolean If true, the document is shared with all users in the owner's department |
| public required | boolean If true, the document can be read by everybody |
{- "_id": "3ufDC0Rh5g7arSC9",
- "owner": "p3O5LB4T6C4PgkvW",
- "title": "Mission Statement",
- "description": "A brief description of the document",
- "type": 17,
- "subType": 11,
- "content": [
- {
- "label": "Document content here",
- "importance": 0
}
], - "shareWithGroup": false,
- "shareWithDepartment": false,
- "public": false
}JSON body with all the information to create a new data structure
| name required | string The name of the structure |
| description | string The description of the structure |
required | Array of objects (DataField) Array of fields defining the structure |
{- "name": "City Info",
- "description": "Data resulting from Vision-Mission-Value-Canvas",
- "fields": [
- {
- "name": "Mission value statement",
- "type": "boolean",
- "items": "tt5vo04DN3jm8Bqe"
}
]
}{- "_id": "tt5vo04DN3jm8Bqe",
- "name": "City Info",
- "description": "Data resulting from Vision-Mission-Value-Canvas",
- "fields": [
- {
- "name": "Mission value statement",
- "type": "boolean",
- "items": "tt5vo04DN3jm8Bqe"
}
]
}[- {
- "_id": "tt5vo04DN3jm8Bqe",
- "name": "City Info",
- "description": "Data resulting from Vision-Mission-Value-Canvas",
- "fields": [
- {
- "name": "Mission value statement",
- "type": "boolean",
- "items": "tt5vo04DN3jm8Bqe"
}
]
}
]| structureID required | string Unique structure ID |
Data object containing only the attributes to be updated
| _id | string Unique ID of data structure, is used as type for documents |
| name required | string The name of the structure |
| description | string The description of the structure |
required | Array of objects (DataField) Array of fields defining the structure |
{- "_id": "tt5vo04DN3jm8Bqe",
- "name": "City Info",
- "description": "Data resulting from Vision-Mission-Value-Canvas",
- "fields": [
- {
- "name": "Mission value statement",
- "type": "boolean",
- "items": "tt5vo04DN3jm8Bqe"
}
]
}