1418 lines
48 KiB
JSON
1418 lines
48 KiB
JSON
[
|
|
{
|
|
"title": "Namespaces",
|
|
"parameters": {},
|
|
"entrypoint": "namespace",
|
|
"path": "/namespace",
|
|
"authentication": [],
|
|
"struct": [
|
|
{
|
|
"imports": [
|
|
"sqlxTypes github.com/jmoiron/sqlx/types",
|
|
"time"
|
|
]
|
|
}
|
|
],
|
|
"apis": [
|
|
{
|
|
"name": "list",
|
|
"method": "GET",
|
|
"title": "List namespaces",
|
|
"path": "/",
|
|
"parameters": {
|
|
"get": [
|
|
{
|
|
"type": "string",
|
|
"name": "query",
|
|
"required": false,
|
|
"title": "Search query"
|
|
},
|
|
{
|
|
"name": "page",
|
|
"type": "uint",
|
|
"required": false,
|
|
"title": "Page number (0 based)"
|
|
},
|
|
{
|
|
"name": "perPage",
|
|
"type": "uint",
|
|
"required": false,
|
|
"title": "Returned items per page (default 50)"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "create",
|
|
"method": "POST",
|
|
"title": "Create namespace",
|
|
"path": "/",
|
|
"parameters": {
|
|
"post": [
|
|
{
|
|
"type": "string",
|
|
"name": "name",
|
|
"required": true,
|
|
"title": "Name"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "slug",
|
|
"required": false,
|
|
"title": "Slug (url path part)"
|
|
},
|
|
{
|
|
"type": "bool",
|
|
"name": "enabled",
|
|
"required": false,
|
|
"title": "Enabled"
|
|
},
|
|
{
|
|
"type": "sqlxTypes.JSONText",
|
|
"name": "meta",
|
|
"required": true,
|
|
"title": "Meta data"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "read",
|
|
"method": "GET",
|
|
"title": "Read namespace",
|
|
"path": "/{namespaceID}",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "namespaceID",
|
|
"required": true,
|
|
"title": "ID"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "update",
|
|
"method": "POST",
|
|
"title": "Update namespace",
|
|
"path": "/{namespaceID}",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "namespaceID",
|
|
"required": true,
|
|
"title": "ID"
|
|
}
|
|
],
|
|
"post": [
|
|
{
|
|
"type": "string",
|
|
"name": "name",
|
|
"required": true,
|
|
"title": "Name"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "slug",
|
|
"required": false,
|
|
"title": "Slug (url path part)"
|
|
},
|
|
{
|
|
"type": "bool",
|
|
"name": "enabled",
|
|
"required": false,
|
|
"title": "Enabled"
|
|
},
|
|
{
|
|
"type": "sqlxTypes.JSONText",
|
|
"name": "meta",
|
|
"required": true,
|
|
"title": "Meta data"
|
|
},
|
|
{
|
|
"type": "*time.Time",
|
|
"name": "updatedAt",
|
|
"required": false,
|
|
"title": "Last update (or creation) date"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "delete",
|
|
"method": "DELETE",
|
|
"title": "Delete namespace",
|
|
"path": "/{namespaceID}",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "namespaceID",
|
|
"required": true,
|
|
"title": "ID"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"title": "Pages",
|
|
"description": "Compose pages",
|
|
"entrypoint": "page",
|
|
"path": "/namespace/{namespaceID}/page",
|
|
"authentication": [],
|
|
"struct": [
|
|
{
|
|
"imports": [
|
|
"sqlxTypes github.com/jmoiron/sqlx/types"
|
|
]
|
|
}
|
|
],
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "namespaceID",
|
|
"required": true,
|
|
"title": "Namespace ID"
|
|
}
|
|
]
|
|
},
|
|
"apis": [
|
|
{
|
|
"name": "list",
|
|
"method": "GET",
|
|
"path": "/",
|
|
"title": "List available pages",
|
|
"parameters": {
|
|
"get": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "selfID",
|
|
"required": false,
|
|
"title": "Parent page ID"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "query",
|
|
"required": false,
|
|
"title": "Search query"
|
|
},
|
|
{
|
|
"name": "page",
|
|
"type": "uint",
|
|
"required": false,
|
|
"title": "Page number (0 based)"
|
|
},
|
|
{
|
|
"name": "perPage",
|
|
"type": "uint",
|
|
"required": false,
|
|
"title": "Returned items per page (default 50)"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "create",
|
|
"method": "POST",
|
|
"title": "Create page",
|
|
"path": "/",
|
|
"parameters": {
|
|
"post": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "selfID",
|
|
"required": false,
|
|
"title": "Parent Page ID"
|
|
},
|
|
{
|
|
"type": "uint64",
|
|
"name": "moduleID",
|
|
"required": false,
|
|
"title": "Module ID"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "title",
|
|
"required": true,
|
|
"title": "Title"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "description",
|
|
"required": false,
|
|
"title": "Description"
|
|
},
|
|
{
|
|
"type": "bool",
|
|
"name": "visible",
|
|
"required": false,
|
|
"title": "Visible in navigation"
|
|
},
|
|
{
|
|
"type": "sqlxTypes.JSONText",
|
|
"name": "blocks",
|
|
"required": true,
|
|
"title": "Blocks JSON"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "read",
|
|
"path": "/{pageID}",
|
|
"method": "GET",
|
|
"title": "Get page details",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "pageID",
|
|
"required": true,
|
|
"title": "Page ID"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "tree",
|
|
"path": "/tree",
|
|
"method": "GET",
|
|
"title": "Get page all (non-record) pages, hierarchically",
|
|
"parameters": {}
|
|
},
|
|
{
|
|
"name": "update",
|
|
"method": "POST",
|
|
"title": "Update page",
|
|
"path": "/{pageID}",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "pageID",
|
|
"required": true,
|
|
"title": "Page ID"
|
|
}
|
|
],
|
|
"post": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "selfID",
|
|
"required": false,
|
|
"title": "Parent Page ID"
|
|
},
|
|
{
|
|
"type": "uint64",
|
|
"name": "moduleID",
|
|
"required": false,
|
|
"title": "Module ID (optional)"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "title",
|
|
"required": true,
|
|
"title": "Title"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "description",
|
|
"required": false,
|
|
"title": "Description"
|
|
},
|
|
{
|
|
"type": "bool",
|
|
"name": "visible",
|
|
"required": false,
|
|
"title": "Visible in navigation"
|
|
},
|
|
{
|
|
"type": "sqlxTypes.JSONText",
|
|
"name": "blocks",
|
|
"required": true,
|
|
"title": "Blocks JSON"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "reorder",
|
|
"method": "POST",
|
|
"title": "Reorder pages",
|
|
"path": "/{selfID}/reorder",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "selfID",
|
|
"required": true,
|
|
"title": "Parent page ID"
|
|
}
|
|
],
|
|
"post": [
|
|
{
|
|
"type": "[]string",
|
|
"name": "pageIDs",
|
|
"required": true,
|
|
"title": "Page ID order"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "delete",
|
|
"path": "/{pageID}",
|
|
"method": "Delete",
|
|
"title": "Delete page",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "pageID",
|
|
"required": true,
|
|
"title": "Page ID"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "upload",
|
|
"path": "/{pageID}/attachment",
|
|
"method": "POST",
|
|
"title": "Uploads attachment to page",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "pageID",
|
|
"required": true,
|
|
"title": "Page ID"
|
|
}
|
|
],
|
|
"post": [
|
|
{
|
|
"name": "upload",
|
|
"type": "*multipart.FileHeader",
|
|
"required": true,
|
|
"title": "File to upload"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"title": "Modules",
|
|
"description": "Compose module definitions",
|
|
"entrypoint": "module",
|
|
"path": "/namespace/{namespaceID}/module",
|
|
"authentication": [],
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "namespaceID",
|
|
"required": true,
|
|
"title": "Namespace ID"
|
|
}
|
|
]
|
|
},
|
|
"struct": [
|
|
{
|
|
"imports": [
|
|
"sqlxTypes github.com/jmoiron/sqlx/types",
|
|
"github.com/cortezaproject/corteza-server/compose/types",
|
|
"time"
|
|
]
|
|
}
|
|
],
|
|
"apis": [
|
|
{
|
|
"name": "list",
|
|
"method": "GET",
|
|
"title": "List modules",
|
|
"path": "/",
|
|
"parameters": {
|
|
"get": [
|
|
{
|
|
"type": "string",
|
|
"name": "query",
|
|
"required": false,
|
|
"title": "Search query"
|
|
},
|
|
{
|
|
"name": "page",
|
|
"type": "uint",
|
|
"required": false,
|
|
"title": "Page number (0 based)"
|
|
},
|
|
{
|
|
"name": "perPage",
|
|
"type": "uint",
|
|
"required": false,
|
|
"title": "Returned items per page (default 50)"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "create",
|
|
"method": "POST",
|
|
"title": "Create module",
|
|
"path": "/",
|
|
"parameters": {
|
|
"post": [
|
|
{
|
|
"type": "string",
|
|
"name": "name",
|
|
"required": true,
|
|
"title": "Module Name"
|
|
},
|
|
{
|
|
"type": "types.ModuleFieldSet",
|
|
"name": "fields",
|
|
"required": true,
|
|
"title": "Fields JSON"
|
|
},
|
|
{
|
|
"type": "sqlxTypes.JSONText",
|
|
"name": "meta",
|
|
"required": true,
|
|
"title": "Module meta data"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "read",
|
|
"method": "GET",
|
|
"title": "Read module",
|
|
"path": "/{moduleID}",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "moduleID",
|
|
"required": true,
|
|
"title": "Module ID"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "update",
|
|
"method": "POST",
|
|
"title": "Update module",
|
|
"path": "/{moduleID}",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "moduleID",
|
|
"required": true,
|
|
"title": "Module ID"
|
|
}
|
|
],
|
|
"post": [
|
|
{
|
|
"type": "string",
|
|
"name": "name",
|
|
"required": true,
|
|
"title": "Module Name"
|
|
},
|
|
{
|
|
"type": "types.ModuleFieldSet",
|
|
"name": "fields",
|
|
"required": true,
|
|
"title": "Fields JSON"
|
|
},
|
|
{
|
|
"type": "sqlxTypes.JSONText",
|
|
"name": "meta",
|
|
"required": true,
|
|
"title": "Module meta data"
|
|
},
|
|
{
|
|
"type": "*time.Time",
|
|
"name": "updatedAt",
|
|
"required": false,
|
|
"title": "Last update (or creation) date"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "delete",
|
|
"method": "DELETE",
|
|
"title": "Delete module",
|
|
"path": "/{moduleID}",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "moduleID",
|
|
"required": true,
|
|
"title": "Module ID"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"title": "Records",
|
|
"description": "Compose records",
|
|
"entrypoint": "record",
|
|
"path": "/namespace/{namespaceID}/module/{moduleID}/record",
|
|
"authentication": [],
|
|
"struct": [
|
|
{
|
|
"imports": [
|
|
"github.com/cortezaproject/corteza-server/compose/types"
|
|
]
|
|
}
|
|
],
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "namespaceID",
|
|
"required": true,
|
|
"title": "Namespace ID"
|
|
},
|
|
{
|
|
"type": "uint64",
|
|
"name": "moduleID",
|
|
"required": true,
|
|
"title": "Module ID"
|
|
}
|
|
]
|
|
},
|
|
"apis": [
|
|
{
|
|
"name": "report",
|
|
"method": "GET",
|
|
"title": "Generates report from module records",
|
|
"path": "/report",
|
|
"parameters": {
|
|
"get": [
|
|
{
|
|
"type": "string",
|
|
"name": "metrics",
|
|
"required": false,
|
|
"title": "Metrics (eg: 'SUM(money), MAX(calls)')"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "dimensions",
|
|
"required": true,
|
|
"title": "Dimensions (eg: 'DATE(foo), status')"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "filter",
|
|
"required": false,
|
|
"title": "Filter (eg: 'DATE(foo) > 2010')"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "list",
|
|
"method": "GET",
|
|
"title": "List/read records from module section",
|
|
"path": "/",
|
|
"parameters": {
|
|
"get": [
|
|
{
|
|
"name": "filter",
|
|
"type": "string",
|
|
"required": false,
|
|
"title": "Filtering condition"
|
|
},
|
|
{
|
|
"name": "page",
|
|
"type": "uint",
|
|
"required": false,
|
|
"title": "Page number (0 based)"
|
|
},
|
|
{
|
|
"name": "perPage",
|
|
"type": "uint",
|
|
"required": false,
|
|
"title": "Returned items per page (default 50)"
|
|
},
|
|
{
|
|
"name": "sort",
|
|
"type": "string",
|
|
"required": false,
|
|
"title": "Sort field (default id desc)"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "create",
|
|
"method": "POST",
|
|
"title": "Create record in module section",
|
|
"path": "/",
|
|
"parameters": {
|
|
"post": [
|
|
{
|
|
"type": "types.RecordValueSet",
|
|
"name": "values",
|
|
"required": true,
|
|
"title": "Record values"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "read",
|
|
"method": "GET",
|
|
"title": "Read records by ID from module section",
|
|
"path": "/{recordID}",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "recordID",
|
|
"required": true,
|
|
"title": "Record ID"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "update",
|
|
"method": "POST",
|
|
"title": "Update records in module section",
|
|
"path": "/{recordID}",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "recordID",
|
|
"required": true,
|
|
"title": "Record ID"
|
|
}
|
|
],
|
|
"post": [
|
|
{
|
|
"type": "types.RecordValueSet",
|
|
"name": "values",
|
|
"required": true,
|
|
"title": "Record values"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "delete",
|
|
"method": "DELETE",
|
|
"title": "Delete record row from module section",
|
|
"path": "/{recordID}",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "recordID",
|
|
"required": true,
|
|
"title": "Record ID"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "upload",
|
|
"path": "/{recordID}/{fieldName}/attachment",
|
|
"method": "POST",
|
|
"title": "Uploads attachment and validates it against record field requirements",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"name": "recordID",
|
|
"type": "uint64",
|
|
"required": true,
|
|
"title": "Record ID"
|
|
},
|
|
{
|
|
"name": "fieldName",
|
|
"type": "string",
|
|
"required": true,
|
|
"title": "Field name"
|
|
}
|
|
],
|
|
"post": [
|
|
{
|
|
"name": "upload",
|
|
"type": "*multipart.FileHeader",
|
|
"required": true,
|
|
"title": "File to upload"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"title": "Charts",
|
|
"path": "/namespace/{namespaceID}/chart",
|
|
"entrypoint": "chart",
|
|
"authentication": [],
|
|
"struct": [
|
|
{
|
|
"imports": [
|
|
"sqlxTypes github.com/jmoiron/sqlx/types",
|
|
"time"
|
|
]
|
|
}
|
|
],
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "namespaceID",
|
|
"required": true,
|
|
"title": "Namespace ID"
|
|
}
|
|
]
|
|
},
|
|
"apis": [
|
|
{
|
|
"name": "list",
|
|
"method": "GET",
|
|
"title": "List/read charts",
|
|
"path": "/",
|
|
"parameters": {
|
|
"get": [
|
|
{
|
|
"name": "query",
|
|
"required": false,
|
|
"title": "Search query to match against charts",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "page",
|
|
"type": "uint",
|
|
"required": false,
|
|
"title": "Page number (0 based)"
|
|
},
|
|
{
|
|
"name": "perPage",
|
|
"type": "uint",
|
|
"required": false,
|
|
"title": "Returned items per page (default 50)"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "create",
|
|
"method": "POST",
|
|
"title": "List/read charts ",
|
|
"path": "/",
|
|
"parameters": {
|
|
"post": [
|
|
{
|
|
"type": "sqlxTypes.JSONText",
|
|
"name": "config",
|
|
"required": true,
|
|
"title": "Chart JSON"
|
|
},
|
|
{
|
|
"name": "name",
|
|
"title": "Chart name",
|
|
"type": "string",
|
|
"required": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "read",
|
|
"method": "GET",
|
|
"title": "Read charts by ID",
|
|
"path": "/{chartID}",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "chartID",
|
|
"required": true,
|
|
"title": "Chart ID"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "update",
|
|
"method": "POST",
|
|
"title": "Add/update charts",
|
|
"path": "/{chartID}",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "chartID",
|
|
"required": true,
|
|
"title": "Chart ID"
|
|
}
|
|
],
|
|
"post": [
|
|
{
|
|
"type": "sqlxTypes.JSONText",
|
|
"name": "config",
|
|
"required": true,
|
|
"title": "Chart JSON"
|
|
},
|
|
{
|
|
"name": "name",
|
|
"title": "Chart name",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "*time.Time",
|
|
"name": "updatedAt",
|
|
"required": false,
|
|
"title": "Last update (or creation) date"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "delete",
|
|
"method": "DELETE",
|
|
"title": "Delete chart",
|
|
"path": "/{chartID}",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "chartID",
|
|
"required": true,
|
|
"title": "Chart ID"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"title": "Triggers",
|
|
"description": "Compose Triggers",
|
|
"entrypoint": "trigger",
|
|
"path": "/namespace/{namespaceID}/trigger",
|
|
"authentication": [],
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "namespaceID",
|
|
"required": true,
|
|
"title": "Namespace ID"
|
|
}
|
|
]
|
|
},
|
|
"struct": [
|
|
{
|
|
"imports": [
|
|
"time"
|
|
]
|
|
}
|
|
],
|
|
"apis": [
|
|
{
|
|
"name": "list",
|
|
"method": "GET",
|
|
"path": "/",
|
|
"title": "List available triggers",
|
|
"parameters": {
|
|
"get": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "moduleID",
|
|
"required": false,
|
|
"title": "Filter triggers by module"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "query",
|
|
"required": false,
|
|
"title": "Search query"
|
|
},
|
|
{
|
|
"name": "page",
|
|
"type": "uint",
|
|
"required": false,
|
|
"title": "Page number (0 based)"
|
|
},
|
|
{
|
|
"name": "perPage",
|
|
"type": "uint",
|
|
"required": false,
|
|
"title": "Returned items per page (default 50)"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "create",
|
|
"method": "POST",
|
|
"title": "Create trigger",
|
|
"path": "/",
|
|
"parameters": {
|
|
"post": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "moduleID",
|
|
"required": false,
|
|
"title": "Module ID"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "name",
|
|
"required": true,
|
|
"title": "Name"
|
|
},
|
|
{
|
|
"type": "[]string",
|
|
"name": "actions",
|
|
"required": false,
|
|
"title": "Actions that trigger this trigger"
|
|
},
|
|
{
|
|
"type": "bool",
|
|
"name": "enabled",
|
|
"required": false,
|
|
"title": "Enabled"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "source",
|
|
"required": false,
|
|
"title": "Trigger source code"
|
|
},
|
|
{
|
|
"type": "*time.Time",
|
|
"name": "updatedAt",
|
|
"required": false,
|
|
"title": "Last update (or creation) date"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "read",
|
|
"path": "/{triggerID}",
|
|
"method": "GET",
|
|
"title": "Get trigger details",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "triggerID",
|
|
"required": true,
|
|
"title": "Trigger ID"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "update",
|
|
"method": "POST",
|
|
"title": "Update trigger",
|
|
"path": "/{triggerID}",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "triggerID",
|
|
"required": true,
|
|
"title": "Trigger ID"
|
|
}
|
|
],
|
|
"post": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "moduleID",
|
|
"required": false,
|
|
"title": "Module ID"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "name",
|
|
"required": true,
|
|
"title": "Name"
|
|
},
|
|
{
|
|
"type": "[]string",
|
|
"name": "actions",
|
|
"required": false,
|
|
"title": "Actions that trigger this trigger"
|
|
},
|
|
{
|
|
"type": "bool",
|
|
"name": "enabled",
|
|
"required": false,
|
|
"title": "Enabled"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "source",
|
|
"required": false,
|
|
"title": "Trigger source code"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "delete",
|
|
"path": "/{triggerID}",
|
|
"method": "Delete",
|
|
"title": "Delete trigger",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"type": "uint64",
|
|
"name": "triggerID",
|
|
"required": true,
|
|
"title": "Trigger ID"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"title": "Notifications",
|
|
"description": "Compose Notifications",
|
|
"entrypoint": "notification",
|
|
"path": "/notification",
|
|
"authentication": [],
|
|
"struct": [
|
|
{
|
|
"imports": [
|
|
"sqlxTypes github.com/jmoiron/sqlx/types"
|
|
]
|
|
}
|
|
],
|
|
"apis": [
|
|
{
|
|
"name": "email/send",
|
|
"method": "POST",
|
|
"title": "Send email from the Compose",
|
|
"path": "/email",
|
|
"parameters": {
|
|
"post": [
|
|
{
|
|
"name": "to",
|
|
"type": "[]string",
|
|
"required": true,
|
|
"title": "Email addresses"
|
|
},
|
|
{
|
|
"name": "cc",
|
|
"type": "[]string",
|
|
"required": false,
|
|
"title": "Email addresses"
|
|
},
|
|
{
|
|
"name": "replyTo",
|
|
"type": "string",
|
|
"required": false,
|
|
"title": "Email address in reply-to field"
|
|
},
|
|
{
|
|
"name": "subject ",
|
|
"type": "string",
|
|
"required": false,
|
|
"title": "Email subject"
|
|
},
|
|
{
|
|
"name": "content",
|
|
"type": "sqlxTypes.JSONText",
|
|
"required": true,
|
|
"title": "Message content"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"title": "Attachments",
|
|
"path": "/namespace/{namespaceID}/attachment/{kind}",
|
|
"entrypoint": "attachment",
|
|
"authentication": [
|
|
"Client ID",
|
|
"Session ID"
|
|
],
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"name": "kind",
|
|
"type": "string",
|
|
"required": true,
|
|
"title": "Attachment kind"
|
|
},
|
|
{
|
|
"type": "uint64",
|
|
"name": "namespaceID",
|
|
"required": true,
|
|
"title": "Namespace ID"
|
|
}
|
|
],
|
|
"get": [
|
|
{
|
|
"type": "string",
|
|
"name": "sign",
|
|
"required": false,
|
|
"title": "Signature"
|
|
},
|
|
{
|
|
"type": "uint64",
|
|
"name": "userID",
|
|
"required": false,
|
|
"title": "User ID"
|
|
}
|
|
]
|
|
},
|
|
"apis": [
|
|
{
|
|
"name": "list",
|
|
"path": "/",
|
|
"method": "GET",
|
|
"title": "List, filter all page attachments",
|
|
"parameters": {
|
|
"get": [
|
|
{
|
|
"name": "pageID",
|
|
"type": "uint64",
|
|
"required": false,
|
|
"title": "Filter attachments by page ID"
|
|
},
|
|
{
|
|
"type": "uint64",
|
|
"name": "moduleID",
|
|
"required": false,
|
|
"title": "Filter attachments by module ID"
|
|
},
|
|
{
|
|
"name": "recordID",
|
|
"type": "uint64",
|
|
"required": false,
|
|
"title": "Filter attachments by record ID"
|
|
},
|
|
{
|
|
"name": "fieldName",
|
|
"type": "string",
|
|
"required": false,
|
|
"title": "Filter attachments by field name"
|
|
},
|
|
{
|
|
"name": "page",
|
|
"type": "uint",
|
|
"required": false,
|
|
"title": "Page number (0 based)"
|
|
},
|
|
{
|
|
"name": "perPage",
|
|
"type": "uint",
|
|
"required": false,
|
|
"title": "Returned items per page (default 50)"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "read",
|
|
"path": "/{attachmentID}",
|
|
"method": "GET",
|
|
"title": "Attachment details",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"name": "attachmentID",
|
|
"type": "uint64",
|
|
"required": true,
|
|
"title": "Attachment ID"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "delete",
|
|
"path": "/{attachmentID}",
|
|
"method": "DELETE",
|
|
"title": "Delete attachment",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"name": "attachmentID",
|
|
"type": "uint64",
|
|
"required": true,
|
|
"title": "Attachment ID"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "original",
|
|
"path": "/{attachmentID}/original/{name}",
|
|
"method": "GET",
|
|
"title": "Serves attached file",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"name": "attachmentID",
|
|
"type": "uint64",
|
|
"required": true,
|
|
"title": "Attachment ID"
|
|
},
|
|
{
|
|
"name": "name",
|
|
"type": "string",
|
|
"required": true,
|
|
"title": "File name"
|
|
}
|
|
],
|
|
"get": [
|
|
{
|
|
"type": "bool",
|
|
"name": "download",
|
|
"required": false,
|
|
"title": "Force file download"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "preview",
|
|
"path": "/{attachmentID}/preview.{ext}",
|
|
"method": "GET",
|
|
"title": "Serves preview of an attached file",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"name": "attachmentID",
|
|
"type": "uint64",
|
|
"required": true,
|
|
"title": "Attachment ID"
|
|
},
|
|
{
|
|
"name": "ext",
|
|
"type": "string",
|
|
"required": true,
|
|
"title": "Preview extension/format"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"title": "Permissions",
|
|
"parameters": {},
|
|
"entrypoint": "permissions",
|
|
"path": "/permissions",
|
|
"authentication": [
|
|
"Client ID",
|
|
"Session ID"
|
|
],
|
|
"struct": [
|
|
{
|
|
"imports": [
|
|
"github.com/cortezaproject/corteza-server/internal/permissions"
|
|
]
|
|
}
|
|
],
|
|
"apis": [
|
|
{
|
|
"name": "list",
|
|
"path": "/",
|
|
"method": "GET",
|
|
"title": "Retrieve defined permissions",
|
|
"parameters": {}
|
|
},
|
|
{
|
|
"name": "effective",
|
|
"path": "/effective",
|
|
"method": "GET",
|
|
"title": "Effective rules for current user",
|
|
"parameters": {
|
|
"get": [
|
|
{
|
|
"name": "resource",
|
|
"type": "string",
|
|
"required": false,
|
|
"title": "Show only rules for a specific resource"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "read",
|
|
"path": "/{roleID}/rules",
|
|
"method": "GET",
|
|
"title": "Retrieve role permissions",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"name": "roleID",
|
|
"type": "uint64",
|
|
"required": true,
|
|
"title": "Role ID"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "delete",
|
|
"path": "/{roleID}/rules",
|
|
"method": "DELETE",
|
|
"title": "Remove all defined role permissions",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"name": "roleID",
|
|
"type": "uint64",
|
|
"required": true,
|
|
"title": "Role ID"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "update",
|
|
"path": "/{roleID}/rules",
|
|
"method": "PATCH",
|
|
"title": "Update permission settings",
|
|
"parameters": {
|
|
"path": [
|
|
{
|
|
"name": "roleID",
|
|
"type": "uint64",
|
|
"required": true,
|
|
"title": "Role ID"
|
|
}
|
|
],
|
|
"post": [
|
|
{
|
|
"name": "rules",
|
|
"type": "permissions.RuleSet",
|
|
"required": true,
|
|
"title": "List of permission rules to set"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|