Skip to content

Commit 911b890

Browse files
committed
Document searching and @verbose attribute
1 parent 4aedcb0 commit 911b890

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

doc/rest.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,21 @@ an item can be queried by appending the property, e.g.,
5858
When performing the ``GET`` method on a class (e.g. ``/data/issue``), the
5959
number of items is returned in ``@total_size``. Then a ``collection``
6060
list follows which contains the id and link to the respective item.
61+
This endpoint supports pagination. With the attributes @page_size and
62+
@page_index, pagination is controlled. The @page_size specifies how many
63+
items are displayed at once. The @page_index (which defaults to 1 if not
64+
given) specifies which page number of @page_size items is displayed. If
65+
no @page_size is specified, all items are returned.
66+
In addition this method supports searching. Search parameters are names
67+
of properties of the given class, e.g., ``status`` for ``issue``. Links
68+
and Multilinks can be specified numerically or symbolically, e.g.,
69+
searching for issues in status ``closed`` can be achieved by searching
70+
for ``status=closed`` or ``status=3`` (provided the ``closed`` status
71+
has ID 3). Note that searching for strings (e.g. the issue title)
72+
performs a case-insensitive substring search, so searching for
73+
title=Something will find all issues with "Something" or "someThing",
74+
etc. in the title. There is currently no way to perform an exact string
75+
match.
6176

6277
When performing the ``GET`` method on an item (e.g. ``/data/issue/42``), a
6378
``link`` attribute contains the link to the item, ``id`` contains the
@@ -66,6 +81,17 @@ id, type contains the class name (e.g. ``issue`` in the example) and an
6681
query. The individual properties of the item are returned in an
6782
``attributes`` dictionary. The properties returned depend on the
6883
permissions of the account used for the query.
84+
Link and Multilink properties are displayed as a dictionary with a link
85+
and an id property by default. This is controlled by the @verbose
86+
attribute which is set to 1 by default. If set to 0, only the id is
87+
shown for Link and Multilink attributes. If set to 2, the label property
88+
(usually ``name`` e.g. for status) is also put into the dictionary.
89+
Content properties of message and file object are by default also shown
90+
as a dictionary with a sole link attribute. The link is the download
91+
link for the file or message. If @verbose is >= 3, the content property
92+
is shown in json as a (possibly very long) string. Currently the json
93+
serializer cannot handle files not properly utf-8 encoded, so specifying
94+
@verbose=3 for files is currently discouraged.
6995

7096
A ``GET`` method on a property (e.g. ``/data/issue/42/title``) returns the
7197
link, an ``@etag``, the type of the property (e.g. "<type str>") the id

0 commit comments

Comments
 (0)