Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to supply bundle path when calling create_extension_bundle_version_with_http_info #318

Open
andyadamides opened this issue Aug 31, 2022 · 3 comments

Comments

@andyadamides
Copy link

andyadamides commented Aug 31, 2022

While this works

 nipyapi.registry.BucketBundlesApi().get_extension_bundles("UUID")

This:

nipyapi.registry.BucketBundlesApi().create_extension_bundle_version_with_http_info(
                bucket_id="UUID",
                bundle_type="nifi-nar",   
)

Throws this error:

  File "/usr/local/lib/python3.7/site-packages/nipyapi/registry/apis/bucket_bundles_api.py", line 154, in create_extension_bundle_version_with_http_info
    collection_formats=collection_formats)
  File "/usr/local/lib/python3.7/site-packages/nipyapi/registry/api_client.py", line 334, in call_api
    _return_http_data_only, collection_formats, _preload_content, _request_timeout)
  File "/usr/local/lib/python3.7/site-packages/nipyapi/registry/api_client.py", line 155, in __call_api
    _request_timeout=_request_timeout)
  File "/usr/local/lib/python3.7/site-packages/nipyapi/registry/api_client.py", line 379, in request
    body=body)
  File "/usr/local/lib/python3.7/site-packages/nipyapi/registry/rest.py", line 279, in POST
    body=body)
  File "/usr/local/lib/python3.7/site-packages/nipyapi/registry/rest.py", line 235, in request
    raise ApiException(http_resp=r)
nipyapi.registry.rest.ApiException: (400)
Reason: Bad Request
HTTP response body: Entity is empty.

I cannot see what parameter should I supply in order to create a new Bundle in Nifi Registry...

I basically want to replicate what happens here but with nipyapi:

curl -v -F file=@/path/to/my-processors-1.0.0.nar http://localhost:18080/nifi-registry-api/buckets/de8e08c9-592d-4e10-affe-b3752698f1d9/bundles/nifi-nar

How can I do that?

@Chaffelson
Copy link
Owner

Sorry I missed this @andyadamides , did you resolve it already?
I have not worked with this API call at all, so would have to set up a test and investigate.

@andyadamides
Copy link
Author

@Chaffelson Nope not yet, for now I use curl for this type of operation

@Chaffelson
Copy link
Owner

Roger. I will put it on my list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants