Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    How do I a Package Variable value via API

    Scheduled Pinned Locked Moved Support
    buildmaster
    4 Posts 3 Posters 2 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      jstarbird_7831
      last edited by

      I was looking to get the value of a Package Variable with the API but I can't seem to find how to do it.
      I've tried using the GetVariableValues passing variations of some/all of the following: Environment_id, Application_Id, Release_Number, Build_Number, and Execution_Id but I always just get no values back.

      I can use the GetPackageVariables but that does not give me their values only their names, at least it doesn't appear to. There are fields in the response that say Variable Value but it is not what the real value is and is instead a string of characters that do not make any sense. The fields are not set as sensitive either.

      The response to GetPackageVariables looks like this:

       [{"Build_Id":723,
       "Variable_Name":"buildVersion","ValueType_Code":"S","Variable_Value":"MTQuMS4wLjI1", "Sensitive_Indicator":false,"EvaluateVariables_Indicator":false},
       {"Build_Id":723,"Variable_Name":"JenkinsBuildNumber","ValueType_Code":"S","Variable_Value":"ODQ3","Sensitive_Indicator":false, "EvaluateVariables_Indicator":false}]
      

      Thanks.

      Product: BuildMaster
      Version: 5.6.11

      1 Reply Last reply Reply Quote 0
      • benB Offline
        ben inedo-engineer
        last edited by

        Hello Jon,

        I would suggest using the variables management API. In this case, the endpoint would be GET /api/variables/packages/«application-name»/«release-number»/«package-number»?key=«api-key» to get all the variables associated with a package.

        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          Ben,
          thanks. Sorry I meant to close this one off yesterday as I posted another issue about using the variable api.
          I was using the API for something else and I had forgotten about the variable portion of it. I saw in the doc while looking at another one so I did go and try to use that.

          1 Reply Last reply Reply Quote 0
          • ? This user is from outside of this forum
            Guest
            last edited by

            lol, boy I really need to quit doing 5 things at once.

            Thanks for the answer Ben. Thought you were answering another one I posted that I had meant to close.

            Going to drink my coffee now and hopefully wake up!

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation