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

add new non-admin APIs for external tools registration (for marketplace) #11079

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

stevenwinship
Copy link
Contributor

@stevenwinship stevenwinship commented Dec 9, 2024

What this PR does / why we need it: The APIs for registering and listing external tools needs be accessible outside of admin (with proper authorization) to allow them to be called from the marketplace.

Which issue(s) this PR closes: #10930

Special notes for your reviewer:

Suggestions on how to test this: See IT tests. Test each API (admin and non-admin)

Does this PR introduce a user interface change? If mockups are available, please link/include them here: No

Is there a release notes update needed for this change?: Included

Additional documentation:

Preview docs at https://dataverse-guide--11079.org.readthedocs.build/en/11079/admin/external-tools.html#managing-external-tools

@stevenwinship stevenwinship self-assigned this Dec 9, 2024
@stevenwinship stevenwinship added Size: 10 A percentage of a sprint. 7 hours. Marketplace These changes are required for the Dataverse Marketplace FY25 Sprint 12 FY25 Sprint 12 (2024-12-04 - 2024-12-18) labels Dec 9, 2024

This comment has been minimized.

@stevenwinship stevenwinship removed their assignment Dec 10, 2024
@coveralls
Copy link

coveralls commented Dec 16, 2024

Coverage Status

coverage: 22.569% (-0.002%) from 22.571%
when pulling 4faadf6 on 10930-marketplace-external-tools-apis
into e3b5795 on develop.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@stevenwinship stevenwinship removed their assignment Dec 17, 2024
@stevenwinship stevenwinship removed their assignment Dec 17, 2024

This comment has been minimized.

Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more bit of feedback.

Comment on lines 55 to 59
This API is Superuser only. Note the endpoint difference (/api/externalTools instead of /api/admin/externalTools).

.. code-block:: bash

curl -s -H "X-Dataverse-key:$API_TOKEN" http://localhost:8080/api/externalTools
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obviously, only superusers should be able to ADD tools but have we considered allowing the guest user (no API token) LIST tools? (This would apply to the "list one tool" endpoint as well, of course.)

I don't THINK there would be any harm...

On a related note, it's now possible to list (without an API token), the exporters that are enabled:

I think it would be nice to have this for external tools as well. We could, of course, defer this and open up the listing API in a future pull request. I just thought I'd mention it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can change it now. Makes sense and shouldn't be an issue

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, done in 4faadf6 (thanks!) and no objections in Slack:

Screenshot 2024-12-19 at 10 12 20 AM

Copy link

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:10930-marketplace-external-tools-apis
ghcr.io/gdcc/configbaker:10930-marketplace-external-tools-apis

🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name.

@stevenwinship stevenwinship removed their assignment Dec 17, 2024
@pdurbin pdurbin changed the title add new apis for marketplace external tool registration add new non-admin APIs for external tools registration (for marketplace) Dec 19, 2024
Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pdurbin pdurbin removed their assignment Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FY25 Sprint 12 FY25 Sprint 12 (2024-12-04 - 2024-12-18) Marketplace These changes are required for the Dataverse Marketplace Size: 10 A percentage of a sprint. 7 hours.
Projects
Status: Ready for QA ⏩
Development

Successfully merging this pull request may close these issues.

Modify external tool registration APIs to be accessible for marketplace
3 participants