Edit
Table of Contents
- 01. Record field format
- 02. Associated attributes
- 03. Nomenclature
- 04. Index
- 05. Show
- 06. Create
- 07. Update
- 08. Delete
- 09. Revert
- 10. See also
The following includes the details of how to interface with the note records through the API.
Record field format
Name | Type | Details |
---|---|---|
id | integer | >0 |
post_id | integer | >0 |
body | string | |
x | integer | >0 |
y | integer | >0 |
width | integer | >0 |
height | integer | >0 |
is_active | boolean | |
version | integer | >0 |
created_at | timestamp | |
updated_at | timestamp |
Associated attributes
Name | Type | Number | Availability | Details |
---|---|---|---|---|
post | post | single | required |
Nomenclature
- Plural form: "notes"
- Used in the URL pathname
- Singular form: "note"
- Used for write parameters (Help:API Write Requests)
- Versions: API:Note versions
Index
HTTP Method | GET or POST* |
Base URL | /notes.json |
Type | read request |
Description | The default order is ID descending. * Accepts POST under certain circumstances. See Help:API read requests. |
Search attributes
All of the following are standard attributes with all of their available formats and qualifiers.
- Number syntax
id
x
y
width
height
version
created_at
updated_at
- Text syntax
body
- Boolean syntax
is_active
- Post syntax
post
Special search parameters
body_matches
- Case-insensitive wildcard searching on the body text field.
Show
HTTP Method | GET or POST* |
Base URL | /notes/$id.json |
Type | read request |
Description | $id is the note ID.* Accepts POST under certain circumstances. See Help:API read requests. |
Note: This does a redirect to the post with that note when using the HTML interface, specifically highlighting that note when it gets there.
Create
HTTP Method | POST |
Base URL | /notes.json |
Type | write request |
Description |
Create parameters
- Required:
post_id
- The post ID the note belongs to.x
- X coordinate of the note starting from the left of the image.y
- y coordinate of the note starting from the top of the image.height
width
body
- Optional
is_active
- Whether the note is active or not (i.e. deleted).
Note: The note box must fit within the full-size dimensions of the image.
Update
HTTP Method | PUT/PATCH |
Base URL | /notes/$id.json |
Type | write request |
Description | $id is the note ID. |
Update parameters
Accepts the same parameters as the create note action, except for the post ID. All parameters are optional.
Delete
HTTP Method | DELETE |
Base URL | /notes/$id.json |
Type | write request |
Description | $id is the note ID. |
Revert
HTTP Method | PUT |
Base URL | /notes/$id/revert.json |
Type | write request |
Description | $id is the note ID. |
Revert parameters
- Required:
- version_id - The note version ID to revert to.
See also
No posts found.
1