Closed AmeliaDollars closed 1 year ago
Any update on this request?
I would suggest moving to the client interface rather than relying on updates to the old interface.
Fixes for the old interface are unlikely to be a priority given other aspects (unlimited page size) are already broken by the 2022.4 release.
I would suggest moving to the client interface rather than relying on updates to the old interface.
Fixes for the old interface are unlikely to be a priority given other aspects (unlimited page size) are already broken by the 2022.4 release.
This is also broken in the Client as it includes the same headers: https://github.com/blackducksoftware/hub-rest-api-python/blob/baaa427907046a2051191e91101fe114236363ee/blackduck/Client.py#L62
I would suggest moving to the client interface rather than relying on updates to the old interface. Fixes for the old interface are unlikely to be a priority given other aspects (unlimited page size) are already broken by the 2022.4 release.
This is also broken in the Client as it includes the same headers:
As we state in the documentation, Client will passthrough kwargs to the underlying session.request
, meaning you could do something like this:
bd = blackduck.Client(...)
for component in bd.get_resource("components", params={'q': 'myComponentName'}, headers={'Accept':'application/vnd.myDataType'}):
print(component)
More examples in the examples :) https://github.com/blackducksoftware/hub-rest-api-python/blob/master/examples/client/generate_notices_report_for_project_version.py#L70
Description
The search components endpoint is being deprecated in the 2022.7 update per release notes for 2022.4. This update removes the search/component endpoint and replaces it with "search/kb-components" (which is not yet officially supported). This issue is to update the headers used for the component search functionality to enable use of the new endpoint.
https://github.com/blackducksoftware/hub-rest-api-python/blob/da81b322b31af2ca106c838529131030bb713d4a/blackduck/Components.py#L43
https://github.com/blackducksoftware/hub-rest-api-python/blob/da81b322b31af2ca106c838529131030bb713d4a/blackduck/Core.py#L76