Edit
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
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 or POST [1] |
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
id
created_at
updated_at
- Text syntax
title
body
- User syntax
to
from
- Boolean syntax
is_read
is_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 or POST [1] |
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.
key
Unique key for every dmail that will allow anyone to view the dmail.
Create
HTTP Method | POST |
Base URL | /dmails.json |
Type | write request |
Description |
Create parameters
- Required:
- To specifier: - must be one of the following
to_id
to_name
title
body
Update
HTTP Method | PUT/PATCH |
Base URL | /dmails.json |
Type | write request |
Description |
Update parameters
- Optional:
is_read
is_deleted
Mark all as read
HTTP Method | POST |
Base URL | /dmails/mark_all_as_read |
Type | write request |
Description |
See also
[1] See Help:API read requests for more information.
No posts found.
1