Skip to content

Commit

Permalink
Rename api.rst to rest_api.rst #241 #445
Browse files Browse the repository at this point in the history
    * Add rest_api.rst and installation.rst to their respective toctrees

Signed-off-by: Jono Yang <[email protected]>
  • Loading branch information
JonoYang committed Jun 3, 2024
1 parent dd9d8ed commit 1ca1c49
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 36 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Changelog
Next Release
----------------

- The API endpoints for ``approximate_directory_content_index``,
``approximate_directory_structure_index``, ``exact_file_index``,
``exact_package_archive_index``, ``cditems``, ``on_demand_queue`` have been
removed.


v5.0.0
---------
Expand All @@ -14,7 +19,7 @@ v5.0.0
- Support indexing of PURLs listed in https://github.com/nexB/purldb/issues/326,
https://github.com/nexB/purldb/issues/327, https://github.com/nexB/purldb/issues/328,
https://github.com/nexB/purldb/issues/329 and https://github.com/nexB/purldb/issues/356.
- Support ``addon_pipelines`` for symbol and string collection in ``/api/collect`` endpoint. https://github.com/nexB/purldb/pull/393
- Support ``addon_pipelines`` for symbol and string collection in ``/api/collect`` endpoint. https://github.com/nexB/purldb/pull/393
- Store ``source_symbols`` and ``source_strings`` in ``extra_data`` field. https://github.com/nexB/purldb/pull/351


Expand Down
1 change: 1 addition & 0 deletions docs/source/how-to-guides/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ through specific use cases:
.. toctree::
:maxdepth: 2

installation
matchcode
tutorial_symbol_and_string_collection
1 change: 1 addition & 0 deletions docs/source/purldb/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ PURLdb

overview
symbol_and_string_collection
rest_api
68 changes: 33 additions & 35 deletions docs/source/purldb/api.rst → docs/source/purldb/rest_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ local development setup.
Authentication
--------------

When the authentication setting :ref:`purldb_settings_require_authentication`
When the authentication setting ``PURLDB_SETTINGS_REQUIRE_AUTHENTICATION``
is enabled on a PurlDB instance (disabled by default), you will have to include
an authentication token ``API key`` in the Authorization HTTP header of each request.

Expand Down Expand Up @@ -359,8 +359,8 @@ Using cURL to get package resources:
"emails": [],
"urls": [],
"extra_data": {}
},
...
}
]
}
Expand Down Expand Up @@ -541,8 +541,8 @@ Return a list of resources in the PurlDB.
"emails": [],
"urls": [],
"extra_data": {}
},
...
}
]
}
The resources list can be filtered by the following fields:
Expand Down Expand Up @@ -1065,11 +1065,9 @@ Return a list of package sets and the package data of packages within
],
"resources": "https://public.purldb.io/api/packages/8a433f5e-372c-4fe1-9fc3-1027ecc9678b/resources/",
"history": "https://public.purldb.io/api/packages/8a433f5e-372c-4fe1-9fc3-1027ecc9678b/history/"
},
...
}
]
},
...
}
]
}
Expand Down Expand Up @@ -1123,36 +1121,36 @@ Using cURL to upload a scan for matching:
.. code-block:: json
{
'url': 'http://testserver/api/matching/d7b3a3f3-87de-44d5-852a-e0fb99b10d89/',
'uuid': 'd7b3a3f3-87de-44d5-852a-e0fb99b10d89',
'created_date': '2024-06-03T19:02:28.966557Z',
'input_sources': [
"url": "http://testserver/api/matching/d7b3a3f3-87de-44d5-852a-e0fb99b10d89/",
"uuid": "d7b3a3f3-87de-44d5-852a-e0fb99b10d89",
"created_date": "2024-06-03T19:02:28.966557Z",
"input_sources": [
{
'filename': 'scan.json',
'download_url': '',
'is_uploaded': True,
'tag': '',
'exists': True,
'uuid': '2f67a376-6ff7-4762-9ea5-e998d8164156'
"filename": "scan.json",
"download_url": "",
"is_uploaded": true,
"tag": "",
"exists": true,
"uuid": "2f67a376-6ff7-4762-9ea5-e998d8164156"
}
],
'runs': [
"runs": [
{
'url': 'http://testserver/api/runs/74c533f7-b31b-451c-8fff-a5a556a410ce/',
'pipeline_name': 'matching',
'status': AbstractTaskFieldsModel.Status.NOT_STARTED,
'description': '',
'project': 'http://testserver/api/runs/d7b3a3f3-87de-44d5-852a-e0fb99b10d89/',
'uuid': '74c533f7-b31b-451c-8fff-a5a556a410ce',
'created_date': '2024-06-03T19:02:28.968804Z',
'scancodeio_version': '',
'task_id': None,
'task_start_date': None,
'task_end_date': None,
'task_exitcode': None,
'task_output': '',
'log': '',
'execution_time': None
"url": "http://testserver/api/runs/74c533f7-b31b-451c-8fff-a5a556a410ce/",
"pipeline_name": "matching",
"status": "not started",
"description": "",
"project": "http://testserver/api/runs/d7b3a3f3-87de-44d5-852a-e0fb99b10d89/",
"uuid": "74c533f7-b31b-451c-8fff-a5a556a410ce",
"created_date": "2024-06-03T19:02:28.968804Z",
"scancodeio_version": "",
"task_id": null,
"task_start_date": null,
"task_end_date": null,
"task_exitcode": null,
"task_output": "",
"log": "",
"execution_time": null
}
]
}

0 comments on commit 1ca1c49

Please sign in to comment.