Danbooru
Login Posts Comments Notes Artists Tags Pools Wiki Forum More ยป
Search Changes Help
  • |
  • Posts (0) History

    Blacklisted (help)

    • guro
    • scat
    • furry -rating:g
    Disable all Re-enable all

    Recent Changes (all)

    • filvis challia
    • gambier bay (rainy season) (kancolle)
    • gambier bay (kancolle)
    • cipher (atticus) (honkai: star rail)
    • orca
    • elysia (herrscher of human: ego) (honkai impact)
    • trucy wright
    • idol corp
    • ludmilla (winter owner) (nikke)
    • sakura miku (rella)
    • world tre@sure (idolmaster)
    • yuria shardet
    • togata mirio
    • eri (boku no hero academia)
    • tar-21 (girls' frontline)
    • saegusa akina (4th costume)
    • setsuna (1st costume) (nijisanji)
    • fictional whale
    • anastigal elmar engel berglund
    • aa-12 (the sun never rises) (girls' frontline)
    • lumine (genshin impact)
    • lind (girls' frontline 2)
    • pauline (mario)
    • ura (umamusume)
    • our life: now and forever

    Options

    • Wiki History
    • Discussions
    • What Links Here

    api:notes

    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
    • 10. External links

    The following includes the details of how to interface with the note records through the API.

    Record field format

    NameTypeDetails
    idinteger>0
    post_idinteger>0
    bodystring
    xinteger>0
    yinteger>0
    widthinteger>0
    heightinteger>0
    is_activeboolean
    versioninteger>0
    created_attimestamp
    updated_attimestamp

    Associated attributes

    NameTypeNumberAvailabilityDetails
    postpostsinglerequired

    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 MethodGET
    Base URL/notes.json
    Typeread request
    DescriptionThe default order is ID descending.
    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 MethodGET
    Base URL/notes/$id.json
    Typeread request
    Description$id is the note ID.

    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 MethodPOST
    Base URL/notes.json
    Typewrite request
    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 MethodPUT/PATCH
    Base URL/notes/$id.json
    Typewrite 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 MethodDELETE
    Base URL/notes/$id.json
    Typewrite request
    Description$id is the note ID.

    Revert

    HTTP MethodPUT
    Base URL/notes/$id/revert.json
    Typewrite request
    Description$id is the note ID.
    Revert parameters
    • Required:
      • version_id - The note version ID to revert to.

    See also

    • Help:Common URL Parameters
    • Help:API

    External links

    Controllerhttps://github.com/danbooru/danbooru/blob/master/app/controllers/notes_controller.rb
    Modelhttps://github.com/danbooru/danbooru/blob/master/app/models/note.rb
    Policyhttps://github.com/danbooru/danbooru/blob/master/app/policies/note_policy.rb
    Terms / Privacy / Upgrade / Contact /