The following includes the details of how to interface with the note version records through the API.
Record field format
| Name | Type | Details |
|---|
| [code]id[/code] | integer | >0 |
| [code]note_id[/code] | integer | >0 |
| [code]post_id[/code] | integer | >0 |
| [code]x[/code] | integer | >=0 |
| [code]y[/code] | integer | >=0 |
| [code]width[/code] | integer | >=0 |
| [code]height[/code] | integer | >=0 |
| [code]body[/code] | string | |
| [code]is_active[/code] | boolean | |
| [code]version[/code] | integer | >0 |
| [code]updater_id[/code] | integer | >0 |
| [code]created_at[/code] | timestamp | |
| [code]updated_at[/code] | timestamp | |
| [code]updater_addr_ip[/code] | inet | Limited to Moderator+ |
Associated attributes
| Name | Type | Number | Availability | Details |
|---|
| [code]note[/code] | note | single | required | |
| [code]post[/code] | post | single | required | |
| [code]updater[/code] | user | single | required | |
Nomenclature
- Plural form: "note_versions"
- Used in the URL pathname
- Singular form: "note_version"
- Unused
- Version of: API:Notes
Actions
These are the various actions that can be done with note version records.
Index
| HTTP Method | GET |
| Base URL | [code]/note_versions.json[/code] |
| Type | read request |
| Description | The default order is ID descending. |
All of the following are standard attributes with all of their available formats and qualifiers.
- Number syntax
- [code]id[/code]
- [code]note_id[/code]
- [code]post_id[/code]
- [code]x[/code]
- [code]y[/code]
- [code]width[/code]
- [code]height[/code]
- [code]version[/code]
- [code]created_at[/code]
- [code]updated_at[/code]
- Text syntax
- [code]body[/code]
- Boolean syntax
- [code]is_active[/code]
- User syntax
- [code]updater[/code]
- [code]post_tags_match[/code] - The post query of the search term matches the post of the note.
- [code]body_matches[/code] - Case-insensitive wildcard search on the body field.
Show
| HTTP Method | GET |
| Base URL | [code]/note_versions/$id.json[/code] |
| Type | read request |
| Description | [code]$id[/code] is the note version ID. |
See also
External links
| Controller | <https://github.com/danbooru/danbooru/blob/master/app/controllers/note_versions_controller.rb> | |
| Model | <https://github.com/danbooru/danbooru/blob/master/app/models/note_version.rb> |
| Policy | <https://github.com/danbooru/danbooru/blob/master/app/policies/note_version_policy.rb> |