API get tool wrapper version

Hi there!

I wish to get the version number of a tool’s wrapper through the ToolShed API (for instance 2.4.6 for rrparser).

When I curl https://toolshed.g2.bx.psu.edu/api/repositories?name=rrparser, there is no version number while it is displayed on the ToolShed web page.

Any help will be very appreciated since the ToolShed API documentation is very thin.


not sure if helpful but here is some documentation: Tool Shed API — Galaxy Project 20.09 documentation and bioblend also has some TS support: bioblend.toolshed — BioBlend 0.16.0 documentation

Hope that helps,

Thanks a lot Bjoern. Unfortunately, I still cannot find the right command. I tried the following without success:

(test) ➜  ToolVersionMonitor git:(main) ✗ curl -i "https://toolshed.g2.bx.psu.edu/api/repositories/get_ordered_installable_revisions?name=rrparser"
HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Date: Mon, 07 Feb 2022 17:20:15 GMT
Content-Type: application/json; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
cache-control: max-age=0,no-cache,no-store

(test) ➜  ToolVersionMonitor git:(main) ✗ curl -i "https://toolshed.g2.bx.psu.edu/api/repositories/get_repository_revision_install_info?name=rrparser"
HTTP/1.1 500 Internal Server Error
Server: nginx/1.18.0 (Ubuntu)
Date: Mon, 07 Feb 2022 17:20:26 GMT
Content-Type: text/html; charset=utf8
Transfer-Encoding: chunked
Connection: keep-alive

  <head><title>Internal Server Error</title></head>
    <h1>Internal Server Error</h1>
    <p>The server has either erred or is incapable of performing
the requested operation.

<!--  --></p>
    <hr noshade>
    <div align="right">WSGI Server</div>

I don’t know :frowning: Galaxy is getting this information. So maybe you can track this down from the Galaxy side?

Maybe @nsoranzo has an idea?
What are you trying to do @breakthewall. Maybe we can give you your data in another way?

Actually I’m developing a tool that checks versions of a tool all along the chain (GitHub source code, Conda package and Galaxy Wrapper). Because we developed a bunch of tools and sometimes it’s hard to follow all the versions of multiple publishing platforms.
Then I use GitHub and Anaconda API through shields.io to get latest releases of tools with colored badges. As said in my first post, this is a little bit more tricky with the Galaxy ToolShed. We actually have a piece of code which get first the latest release ID and with that ID we are able to make a second request to get the latest version number. It’s a two-steps request which is not compliant with shields.io forged request. In addition, as the version number is inside nested dictionaries, I have to create a dummy JSON file to get it read by shields.io.
Maybe it should be useful to add the latest version of a ToolShed tool in the first-level of the response sent back from one single request.

Was just going to reply that sth like https://toolshed.g2.bx.psu.edu/api/repositories/get_repository_revision_install_info?name=rrparser&owner=tduigou&changeset_revision=ea590c609fec is containing the version info, but you seem to be well aware of this possibility.

The idea to put the latest version into the first-level response sounds reasonable. Question is wehther somebody is available for implementing it.

1 Like

@breakthewall and I, work in the same team.
We have noticed a spelling mistake in the webpage Galaxy Toolshed Api under the paragraph dedicated to the function get_repository_revision_install_info where the parameter changeset_revision is written as changset_revision
Another suggestion would be to add a version of the API in the url like:
/api/repositories/get_repository_revision_install_info becomes /api/v1/repositories/get_repository_revision_install_info
Lastly, I’ve pushed a PR #7633 to the shields.io to make badges with the version of tools.