Mercurial > p > roundup > code
comparison doc/rest.txt @ 5824:352e78c3b4ab
Allow @fields to include protected properties, document @protected
query param.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 23 Jun 2019 20:00:12 -0400 |
| parents | 9777d7311bc0 |
| children | 8e17c34a5cf0 |
comparison
equal
deleted
inserted
replaced
| 5823:edd9e2c67785 | 5824:352e78c3b4ab |
|---|---|
| 412 * - ``@verbose=3`` | 412 * - ``@verbose=3`` |
| 413 - will display the content property of messages and files. Note | 413 - will display the content property of messages and files. Note |
| 414 warnings about this below. Using this for collections is | 414 warnings about this below. Using this for collections is |
| 415 discouraged as it is slow and produces a lot of data. | 415 discouraged as it is slow and produces a lot of data. |
| 416 * - ``@fields=status,title`` | 416 * - ``@fields=status,title`` |
| 417 - will return the ``status`` and ``title`` fields for the issue displayed | 417 - will return the ``status`` and ``title`` fields for the |
| 418 according to the @verbose parameter | 418 displayed issues. It is added to the fields returned by the |
| 419 @verbose parameter. Protected properties | |
| 420 can be included in the list and will be returned. | |
| 419 | 421 |
| 420 In addition collections support the ``@fields`` parameter which is a | 422 In addition collections support the ``@fields`` parameter which is a |
| 421 colon or comma separated list of fields to embed in the response. For | 423 colon or comma separated list of fields to embed in the response. For |
| 422 example ``https://.../rest/data/issue?@verbose=2`` is the same as: | 424 example ``https://.../rest/data/issue?@verbose=2`` is the same as: |
| 423 ``https://.../rest/data/issue?@fields=title`` since the label property | 425 ``https://.../rest/data/issue?@fields=title`` since the label property |
| 640 | 642 |
| 641 By default all (visible to the current user) attributes/properties are | 643 By default all (visible to the current user) attributes/properties are |
| 642 returned. You can limit this by using the ``@fields`` query parameter | 644 returned. You can limit this by using the ``@fields`` query parameter |
| 643 similar to how it is used in collections. This way you can only return | 645 similar to how it is used in collections. This way you can only return |
| 644 the fields you are interested in reducing network load as well as | 646 the fields you are interested in reducing network load as well as |
| 645 memory and parsing time on the client side. | 647 memory and parsing time on the client side. By default protected |
| 648 properties (read only in the database) are not listed. Th | |
| 649 is makes it easier to submit the attributes from a | |
| 650 ``@verbose=0`` query using PUT. To include protected properties | |
| 651 in the output og a GET add the query parameter | |
| 652 ``@protected=true`` to the query and attributes like: actor, | |
| 653 created, creator and activity will be include in the result. | |
| 646 | 654 |
| 647 Link and Multilink properties are displayed as a dictionary with a | 655 Link and Multilink properties are displayed as a dictionary with a |
| 648 ``link`` and an ``id`` property by default. This is controlled by the | 656 ``link`` and an ``id`` property by default. This is controlled by the |
| 649 ``@verbose`` attribute which is set to 1 by default. If set to 0, only | 657 ``@verbose`` attribute which is set to 1 by default. If set to 0, only |
| 650 the id is shown for Link and Multilink attributes. In this form, the | 658 the id is shown for Link and Multilink attributes. In this form, the |
