Miyuu's Image Board

api:pools

Table of Contents


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


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]
name
[/td]

[td]string[/td]

[td][/td]

[/tr]

[tr]

[td]
description
[/td]

[td]string[/td]

[td][/td]

[/tr]

[tr]

[td]
post_ids
[/td]

[td]array[/td]

[td]integers > 0[/td]

[/tr]

[tr]

[td]
category
[/td]

[td]string[/td]

[td][series, collection][/td]

[/tr]

[tr]

[td]
is_deleted
[/td]

[td]boolean[/td]

[td][/td]

[/tr]

[tr]

[td]
is_active
[/td]

[td]boolean[/td]

[td]unused[/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


None.


Nomenclature

  • Plural form: "pools"
•• Used in the URL pathname
  • Singular form: "pool"
•• Used for write parameters (Help:API Write Requests)

Index


[table]

[tbody]

[tr]

[td]HTTP Method[/td]

[td]GET[/td]

[/tr]

[tr]

[td]Base URL[/td]

[td]

/pools.json
[/td]

[/tr]

[tr]

[td]Type[/td]

[td]read request[/td]

[/tr]

[tr]

[td]Description[/td]

[td]The default order is updated at descending.[/td]

[/tr]

[/tbody]

[/table]



All of the following are standard attributes with all of their available formats and qualifiers.

••
id

••
created_at

••
updated_at
••
name

••
description
••
post_ids
••
is_deleted


  • name_matches
    - Normalized case-insensitive wildcard searching on the name text field.
  • description_matches
    - Case-insensitive wildcard searching on the description text field.
  • post_tags_match
    - The pools's post's tags match the given terms. Meta-tags not supported.
  • category
••
series
- Only series-type pools.
••
collection
- Only collection-type pools.
  • order
    - Sets the order of the results.
••
name
- Alphabetic order by name.
••
created_at
- Orders by creation time.
••
post_count
- Orders by post count.


Show


[table]

[tbody]

[tr]

[td]HTTP Method[/td]

[td]GET[/td]

[/tr]

[tr]

[td]Base URL[/td]

[td]

/pools/$id.json
[/td]

[/tr]

[tr]

[td]Type[/td]

[td]read request[/td]

[/tr]

[tr]

[td]Description[/td]

[td]
$id
is the pool ID.[/td]

[/tr]

[/tbody]

[/table]


Create


[table]

[tbody]

[tr]

[td]HTTP Method[/td]

[td]POST[/td]

[/tr]

[tr]

[td]Base URL[/td]

[td]

/pools.json
[/td]

[/tr]

[tr]

[td]Type[/td]

[td]write request[/td]

[/tr]

[/tbody]

[/table]


Create parameters

  • Required:
••
name

••
category
- Can be: series, collection.
  • Optional
••
description

••
post_ids
- Uses URL array parameter format.
••
post_ids_string
- Space delimited list of post IDs.
••
is_deleted


Update


[table]

[tbody]

[tr]

[td]HTTP Method[/td]

[td]PUT/PATCH[/td]

[/tr]

[tr]

[td]Base URL[/td]

[td]

/pools/$id.json
[/td]

[/tr]

[tr]

[td]Type[/td]

[td]write request[/td]

[/tr]

[tr]

[td]Description[/td]

[td]
$id
is the pool ID.[/td]

[/tr]

[/tbody]

[/table]


Update parameters


Accepts the "same parameters":[#dtext-create-parameters] as the "create pool action":[#dtext-create]. All parameters are optional.


Delete


[table]

[tbody]

[tr]

[td]HTTP Method[/td]

[td]DELETE[/td]

[/tr]

[tr]

[td]Base URL[/td]

[td]

/pools/$id.json
[/td]

[/tr]

[tr]

[td]Type[/td]

[td]write request[/td]

[/tr]

[tr]

[td]Description[/td]

[td]
$id
is the pool ID.[/td]

[/tr]

[/tbody]

[/table]


Note: This action can also be accomplished using the "update pool action":[#dtext-update] by setting

is_deleted
to true.


Undelete


[table]

[tbody]

[tr]

[td]HTTP Method[/td]

[td]POST[/td]

[/tr]

[tr]

[td]Base URL[/td]

[td]

/pools/$id/undelete.json
[/td]

[/tr]

[tr]

[td]Type[/td]

[td]write request[/td]

[/tr]

[tr]

[td]Description[/td]

[td]
$id
is the pool ID.[/td]

[/tr]

[/tbody]

[/table]


Note: This action can also be accomplished using the "update pool action":[#dtext-update] by setting

is_deleted
to false.


Revert


[table]

[tbody]

[tr]

[td]HTTP Method[/td]

[td]PUT[/td]

[/tr]

[tr]

[td]Base URL[/td]

[td]

/pools/$id/revert.json
[/td]

[/tr]

[tr]

[td]Type[/td]

[td]write request[/td]

[/tr]

[tr]

[td]Description[/td]

[td]
$id
is the pool ID.[/td]

[/tr]

[/tbody]

[/table]


Revert parameters

  • Required:
•• version_id - The pool version ID to revert to.


See also


[table]

[tbody]

[tr]

[td]Controller[/td]

[td][/td]

[td][/td]

[/tr]

[tr]

[td]Model[/td]

[td][/td]

[/tr]

[tr]

[td]Policy[/td]

[td][/td]

[/tr]

[/tbody]

[/table]