Getting multiple variable sets from the API with one call?

andrew.timson's Avatar

andrew.timson

09 Aug, 2017 07:57 PM

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/LibraryVari...).

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?

  1. Support Staff 1 Posted by Daniel Fischer on 14 Aug, 2017 05:24 AM

    Daniel Fischer's Avatar

    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

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac