api:dmails
Table of Contents
- 4.01 Index
- 4.02 Search attributes
- 4.03 Special search parameters
- 4.04 Show
- 4.05 Show parameters.
- 4.06 Create
- 4.07 Create parameters
- 4.08 Update
- 4.09 Update parameters
- 4.10 Mark all as read
Record field format
[table]
[thead]
[tr]
[th]Name[/th]
[th]Type[/th]
[th]Details[/th]
[/tr]
[/thead]
[tbody]
[tr]
[td]
id[/td][td]integer[/td]
[td]>0[/td]
[/tr]
[tr]
[td]
owner_id[/td][td]integer[/td]
[td]>0[/td]
[/tr]
[tr]
[td]
to_id[/td][td]integer[/td]
[td]>0[/td]
[/tr]
[tr]
[td]
from_id[/td][td]integer[/td]
[td]>0[/td]
[/tr]
[tr]
[td]
title[/td][td]string[/td]
[td][/td]
[/tr]
[tr]
[td]
body[/td][td]string[/td]
[td][/td]
[/tr]
[tr]
[td]
is_read[/td][td]boolean[/td]
[td][/td]
[/tr]
[tr]
[td]
is_deleted[/td][td]boolean[/td]
[td][/td]
[/tr]
[tr]
[td]
is_spam[/td][td]boolean[/td]
[td]obsolete[/td]
[/tr]
[tr]
[td]
key[/td][td]string[/td]
[td][/td]
[/tr]
[tr]
[td]
created_at[/td][td]timestamp[/td]
[td][/td]
[/tr]
[tr]
[td]
updated_at[/td][td]timestamp[/td]
[td][/td]
[/tr]
[/tbody]
[/table]
Associated attributes
[table]
[thead]
[tr]
[th]Name[/th]
[th]Type[/th]
[th]Number[/th]
[th]Availability[/th]
[th]Details[/th]
[/tr]
[/thead]
[tbody]
[tr]
[td]
owner[/td][td]user[/td]
[td]single[/td]
[td]required[/td]
[td][/td]
[/tr]
[tr]
[td]
to[/td][td]user[/td]
[td]single[/td]
[td]required[/td]
[td][/td]
[/tr]
[tr]
[td]
from[/td][td]user[/td]
[td]single[/td]
[td]required[/td]
[td][/td]
[/tr]
[/tbody]
[/table]
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
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]GET[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/dmails.json[/td][/tr]
[tr]
[td]Type[/td]
[td]read request[/td]
[/tr]
[tr]
[td]Description[/td]
[td]The default order is ID descending.
Only Dmails to or from the user will be shown, regardless of user level.[/td]
[/tr]
[/tbody]
[/table]
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
- Case-insensitive wildcard search on the title fields.title_matches
- Case-insensitive wildcard search on the body field.message_matchesfolder_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
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]GET[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/dmails/$id.json[/td][/tr]
[tr]
[td]Type[/td]
[td]read request[/td]
[/tr]
[tr]
[td]Description[/td]
[td]
$id is the dmail ID.Normally only the owner can see the dmail, unless the correct dmail key is also supplied.[/td]
[/tr]
[/tbody]
[/table]
Show parameters.
Unique key for every dmail that will allow anyone to view the dmail.key
Create
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]POST[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/dmails.json[/td][/tr]
[tr]
[td]Type[/td]
[td]write request[/td]
[/tr]
[/tbody]
[/table]
Create parameters
- Required:
- To specifier: - must be one of the following
to_idto_nametitlebody
Update
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]PUT/PATCH[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/dmails/$id.json[/td][/tr]
[tr]
[td]Type[/td]
[td]write request[/td]
[/tr]
[tr]
[td]Description[/td]
[td]
$id is the dmail ID.[/td][/tr]
[/tbody]
[/table]
Update parameters
- Optional:
is_readis_deleted
Mark all as read
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]POST[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/dmails/mark_all_as_read[/td][/tr]
[tr]
[td]Type[/td]
[td]write request[/td]
[/tr]
[/tbody]
[/table]
See also
External links
[table]
[tbody]
[tr]
[td]Controller[/td]
[td]
[td][/td]
[/tr]
[tr]
[td]Model[/td]
[td]
[/tr]
[tr]
[td]Policy[/td]
[td]
[/tr]
[/tbody]
[/table]