Getting multiple variable sets from the API with one call?

Octopus.Client implements IGet on IVariableSetRepository, which implements getting both a single resource by ID, as well as a list of resources.

However, the API does not seem to actually support getting multiple variable sets at once. The client generates a URL like the following, which returns a 404:

http://octopusservername/api/variables?ids=variableset-Projects-781,variableset-LibraryVariableSets-41,variableset-LibraryVariableSets-84,variableset-LibraryVariableSets-81,%24variablesets-libraryvariablesets-legacy-snapshot1

The API documentation doesn’t indicate that it’s possible to get multiple variable sets at the same time (compare https://github.com/OctopusDeploy/OctopusDeploy-Api/wiki/VariableSets to https://github.com/OctopusDeploy/OctopusDeploy-Api/wiki/LibraryVariableSets).

  1. Is there any way to get multiple variable sets at once, so I don’t have to make multiple API calls?
  2. If there is no way to do so currently, is that a bug or a design choice?

Hi Andrew,

Thanks for getting in touch. What you have encountered is not so much a bug, but an omission / design. Unfortunately, the best way to currently do this is as you suggest. Making multiple API calls.

I believe the best platform for inciting further functionality here would be UserVoice. Below is a link to our UserVoice page where you can create suggestions or vote and comment on others. We use UserVoice to gauge community support for potential features or enhancements.
https://octopusdeploy.uservoice.com/

Sorry if this is not exactly the response you were hoping for.

Best regards,
Daniel