Charts
List/read charts from module section
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/chart/ |
HTTP/S | GET |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|
List/read charts from module section
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/chart/ |
HTTP/S | POST |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| config | sqlxTypes.JSONText | POST | Chart JSON | N/A | YES |
| name | string | POST | Chart name | N/A | YES |
Read charts by ID from module section
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/chart/{chartID} |
HTTP/S | GET |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| chartID | uint64 | PATH | Chart ID | N/A | YES |
Add/update charts in module section
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/chart/{chartID} |
HTTP/S | POST |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| chartID | uint64 | PATH | Chart ID | N/A | YES |
| config | sqlxTypes.JSONText | POST | Chart JSON | N/A | YES |
| name | string | POST | Chart name | N/A | YES |
Delete chart
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/chart/{chartID} |
HTTP/S | DELETE |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| chartID | uint64 | PATH | Chart ID | N/A | YES |
Modules
CRM module definitions
List modules
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/module/ |
HTTP/S | GET |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| query | string | GET | Search query | N/A | NO |
Create module
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/module/ |
HTTP/S | POST |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| name | string | POST | Module Name | N/A | YES |
| fields | types.ModuleFieldSet | POST | Fields JSON | N/A | YES |
| meta | sqlxTypes.JSONText | POST | Module meta data | N/A | YES |
Read module
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/module/{moduleID} |
HTTP/S | GET |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| moduleID | uint64 | PATH | Module ID | N/A | YES |
Edit module
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/module/{moduleID} |
HTTP/S | POST |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| moduleID | uint64 | PATH | Module ID | N/A | YES |
| name | string | POST | Module Name | N/A | YES |
| fields | types.ModuleFieldSet | POST | Fields JSON | N/A | YES |
| meta | sqlxTypes.JSONText | POST | Module meta data | N/A | YES |
Delete module
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/module/{moduleID} |
HTTP/S | DELETE |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| moduleID | uint64 | PATH | Module ID | N/A | YES |
Generates report from module records
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/module/{moduleID}/report |
HTTP/S | GET |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| metrics | string | GET | Metrics (eg: 'COUNT(*) AS count, SUM(money)') | N/A | YES |
| dimensions | string | GET | Dimensions (eg: 'DATE(foo), status') | N/A | YES |
| filter | string | GET | Filter (eg: 'DATE(foo) > 2010') | N/A | NO |
| moduleID | uint64 | PATH | Module ID | N/A | YES |
List/read records from module section
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/module/{moduleID}/record |
HTTP/S | GET |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| filter | string | GET | Filtering condition | N/A | NO |
| page | int | GET | Page number (0 based) | N/A | NO |
| perPage | int | GET | Returned items per page (default 50) | N/A | NO |
| sort | string | GET | Sort field (default id desc) | N/A | NO |
| moduleID | uint64 | PATH | Module ID | N/A | YES |
Create record in module section
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/module/{moduleID}/record |
HTTP/S | POST |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| moduleID | uint64 | PATH | Module ID | N/A | YES |
| values | types.RecordValueSet | POST | Record values | N/A | YES |
Read records by ID from module section
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/module/{moduleID}/record/{recordID} |
HTTP/S | GET |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| moduleID | uint64 | PATH | Module ID | N/A | YES |
| recordID | uint64 | PATH | Record ID | N/A | YES |
Add/update records in module section
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/module/{moduleID}/record/{recordID} |
HTTP/S | POST |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| moduleID | uint64 | PATH | Module ID | N/A | YES |
| recordID | uint64 | PATH | Record ID | N/A | YES |
| values | types.RecordValueSet | POST | Record values | N/A | YES |
Delete record row from module section
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/module/{moduleID}/record/{recordID} |
HTTP/S | DELETE |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| moduleID | uint64 | PATH | Module ID | N/A | YES |
| recordID | uint64 | PATH | Record ID | N/A | YES |
Notifications
CRM Notifications
Send email from the CRM
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/notification/email |
HTTP/S | POST |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| to | []string | POST | Email addresses or Crust user IDs | N/A | YES |
| cc | []string | POST | Email addresses or Crust user IDs | N/A | NO |
| replyTo | string | POST | Crust user ID or email address in reply-to field | N/A | NO |
| subject | string | POST | Email subject | N/A | NO |
| content | sqlxTypes.JSONText | POST | Message content | N/A | YES |
Pages
CRM module pages
List available pages
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/page/ |
HTTP/S | GET |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| selfID | uint64 | GET | Parent page ID | N/A | NO |
Create page
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/page/ |
HTTP/S | POST |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| selfID | uint64 | POST | Parent Page ID | N/A | NO |
| moduleID | uint64 | POST | Module ID | N/A | NO |
| title | string | POST | Title | N/A | YES |
| description | string | POST | Description | N/A | NO |
| visible | bool | POST | Visible in navigation | N/A | NO |
| blocks | sqlxTypes.JSONText | POST | Blocks JSON | N/A | YES |
Get page details
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/page/{pageID} |
HTTP/S | GET |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| pageID | uint64 | PATH | Page ID | N/A | YES |
Get page all (non-record) pages, hierarchically
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/page/tree |
HTTP/S | GET |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|
Edit page
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/page/{pageID} |
HTTP/S | POST |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| pageID | uint64 | PATH | Page ID | N/A | YES |
| selfID | uint64 | POST | Parent Page ID | N/A | NO |
| moduleID | uint64 | POST | Module ID (optional) | N/A | NO |
| title | string | POST | Title | N/A | YES |
| description | string | POST | Description | N/A | NO |
| visible | bool | POST | Visible in navigation | N/A | NO |
| blocks | sqlxTypes.JSONText | POST | Blocks JSON | N/A | YES |
Reorder pages
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/page/{selfID}/reorder |
HTTP/S | POST |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| selfID | uint64 | PATH | Parent page ID | N/A | YES |
| pageIDs | []string | POST | Page ID order | N/A | YES |
Delete page
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/page/{pageID} |
HTTP/S | Delete |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| pageID | uint64 | PATH | Page ID | N/A | YES |
Triggers
CRM Triggers
List available triggers
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/trigger/ |
HTTP/S | GET |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| moduleID | uint64 | GET | Filter triggers by module | N/A | NO |
Create trigger
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/trigger/ |
HTTP/S | POST |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| moduleID | uint64 | POST | Module ID | N/A | NO |
| name | string | POST | Name | N/A | YES |
| actions | []string | POST | Actions that trigger this trigger | N/A | NO |
| enabled | bool | POST | Enabled | N/A | NO |
| source | string | POST | Trigger source code | N/A | NO |
Get trigger details
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/trigger/{triggerID} |
HTTP/S | GET |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| triggerID | uint64 | PATH | Trigger ID | N/A | YES |
Edit trigger
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/trigger/{triggerID} |
HTTP/S | POST |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| triggerID | uint64 | PATH | Trigger ID | N/A | YES |
| moduleID | uint64 | POST | Module ID | N/A | NO |
| name | string | POST | Name | N/A | YES |
| actions | []string | POST | Actions that trigger this trigger | N/A | NO |
| enabled | bool | POST | Enabled | N/A | NO |
| source | string | POST | Trigger source code | N/A | NO |
Delete trigger
Method
| URI | Protocol | Method | Authentication |
|---|---|---|---|
/trigger/{triggerID} |
HTTP/S | Delete |
Request parameters
| Parameter | Type | Method | Description | Default | Required? |
|---|---|---|---|---|---|
| triggerID | uint64 | PATH | Trigger ID | N/A | YES |