generated from aboutcode-org/skeleton
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update CHANGELOG.rst and api doc #508
Signed-off-by: Jono Yang <[email protected]>
- Loading branch information
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -221,6 +221,25 @@ For example: | |
curl -X GET "$api_url?$payload" -H "$content_type" | ||
The packages list can be ordered by the following fields: | ||
|
||
- ``type`` | ||
- ``namespace`` | ||
- ``name`` | ||
- ``version`` | ||
- ``qualifiers`` | ||
- ``subpath`` | ||
- ``download_url`` | ||
- ``filename`` | ||
- ``size`` | ||
- ``release_date`` | ||
|
||
To sort a field in a descending fashion, prefix the field name with ``-``. | ||
Packages can be sorted by multiple fields. | ||
|
||
For example: | ||
|
||
``GET /api/packages/?sort=type,-size`` | ||
|
||
package details | ||
^^^^^^^^^^^^^^^ | ||
|
@@ -867,6 +886,13 @@ package. Find all addon pipelines `here. <https://scancodeio.readthedocs.io/en/l | |
"history": "https://public.purldb.io/api/packages/4f3a57de-e367-43c6-a7f1-51633d0ecd45/history/" | ||
} | ||
The ordering of the packages returned by ``/api/collect/`` can be set using the | ||
``sort`` query parameter. | ||
``GET /api/collect/?purl=pkg:npm/[email protected]&sort=qualifiers,-size`` | ||
The same sort fields from ``/api/packages/`` is also used here. | ||
collect actions | ||
--------------- | ||
|