api:dmails
Table of Contents
- 1. Record field format
- 2. Associated attributes
- 3. Nomenclature
- 4. Actions
- 4.01 Index
- 4.02 Show
- 4.03 Create
- 4.04 Update
- 4.05 Mark all as read
- 5. See also
- 6. External links
The following includes the details of how to interface with the dmail records through the API.
Record field format
| Name | Type | Details |
|---|---|---|
id | integer | >0 |
owner_id | integer | >0 |
to_id | integer | >0 |
from_id | integer | >0 |
title | string | |
body | string | |
is_read | boolean | |
is_deleted | boolean | |
is_spam | boolean | obsolete |
key | string | |
created_at | timestamp | |
updated_at | timestamp |
Associated attributes
| Name | Type | Number | Availability | Details |
|---|---|---|---|---|
owner | user | single | required | |
to | user | single | required | |
from | user | single | required |
Nomenclature
- Plural form: "dmails"
- Used in the URL pathname
- Singular form: "dmail"
- Used for write parameters (Help:API Write Requests)
- Versions: none
Actions
These are the various actions that can be done with dmail records.
Index
| HTTP Method | GET |
| Base URL | /dmails.json |
| Type | read request |
| Description | The default order is ID descending. Only Dmails to or from the user will be shown, regardless of user level. |
Search attributes
All of the following are standard attributes with all of their available formats and qualifiers.
- Number syntax
idcreated_atupdated_at- Text syntax
titlebody- User syntax
tofrom- Boolean syntax
is_readis_deleted
Special search parameters
title_matches- Case-insensitive wildcard search on the title fields.message_matches- Case-insensitive wildcard search on the body field.folder_matches- received - Shows all dmails to the user.
- unread - Shows all unread dmails to the user.
- sent - Shows all dmails from the user.
- deleted - Shows all dmails deleted by the user.
Show
| HTTP Method | GET |
| Base URL | /dmails/$id.json |
| Type | read request |
| Description | $id is the dmail ID.Normally only the owner can see the dmail, unless the correct dmail key is also supplied. |
Show parameters.
keyUnique key for every dmail that will allow anyone to view the dmail.
Create
| HTTP Method | POST |
| Base URL | /dmails.json |
| Type | write request |
Create parameters
- Required:
- To specifier: - must be one of the following
to_idto_nametitlebody
Update
| HTTP Method | PUT/PATCH |
| Base URL | /dmails/$id.json |
| Type | write request |
| Description | $id is the dmail ID. |
Update parameters
- Optional:
is_readis_deleted
Mark all as read
| HTTP Method | POST |
| Base URL | /dmails/mark_all_as_read |
| Type | write request |
