Dockstore API '/workflows/versions' requires bearer token to get version information from published workflow

Dear Sir./Madam.,

I’m developing a tool to automatically import published workflows in Dockstore to Terra. To do so require me to obtain version information of published workflows.

I have tried Dockstore API ‘/workflows/versions’. Surprisingly, this API requires bearer token to get version information even for published workflow.

I wonder if this is the expected behavior? It would be awkward if my tool utilizes a random user account to get version info for public use.

Thanks,
Bo

Hi Bo,

In addition to the proprietary API that you’ve discovered, Dockstore also implements the GA4GH TRS API to fetch published workflows. It requires no authentication, so it should meet your needs. The OpenAPI for it is here.

Charles

1 Like

Hi @coverbeck,

Thanks so much for your information!

I also discovered that the ‘/workflows/published/{workflowId}’ API also works. Is there any reason that you would recommend the GA4GH TRS API over this one?

In addition, I have a question related to the workflowVersions metadata. It seems that each version has both a ‘name’ and a ‘reference’ attribute. Would these two attributes always have the same value?

Thanks,
Bo

Hi @bli25 ,

Is there any reason that you would recommend the GA4GH TRS API over this one?

Dockstore will not break the TRS API. The non-TRS API, we reserve the right to break, e.g. add/change properties in the response, change the path, etc. So you can use either, but there’s a chance that your code may not work in a future release of Dockstore if you use the non-TRS API.

It seems that each version has both a ‘name’ and a ‘reference’ attribute. Would these two attributes always have the same value?

Yes, for workflows, they always have the same value. For tools, they can be different. I assume you’re working in WDL; if so tools shouldn’t really apply to you, as WDL does not have the formal distinction between tools and workflows that CWL does.

Charles

1 Like