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!

    Enabling BuildMaster JSON API?

    Scheduled Pinned Locked Moved Support
    documentationbuildmasterapi
    4 Posts 1 Posters 22 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.
    • ? This user is from outside of this forum
      Guest
      last edited by

      Just starting to dive into the API functionality in BuildMaster.

      Am I right in understanding that there's a generic API (like the one here) and a Native API (like the one here)?

      • I tried calling http://<buildmaster>/api/ - which didn't give me anything (just a 404)
      • I tried calling http://<buildmaster>/api/soap - which gave the the SOAP methods (YAY!)
      • But then I tried calling http://<buildmaster>/api/json - which gave me no response at all

      Ideally I'd like to be using the generic api (e.g. /api/releases/packages/deploy), which seems to not be found, but failing that the Native JSON api would be good.

      Are there any examples of this (request-response sort of examples)? Do I need to enable the JSON API?

      Any advice would be appreciated =)

      Product: BuildMaster
      Version: 5.3.7

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

        You're right in that it's best to choose the specific API for your need (e.g. /api/releases/packages/deploy). The Native JSON API (/api/json) should show a list of methods that are supported when browsed directly... it should not result in a 404 (if that's what you're seeing, there must be a bug somewhere).

        Those endpoints require an API key, you can set one up at Admin > Security & Authentication > API Keys & Access Logs. There will also be logs there for all API accesses.

        From there, you can supply the key in the URL query string as key (or any other supported method).

        Here is an example to list all deployments to the Testing stage for a certain application:

        http://buildmaster/api/releases/packages/deployments?key=YourApiKey&applicationName=TDWTF2&pipelineStageName=Testing&indent=true
        
        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          Thanks Todd.

          I did some more trialing, but to no avail:
          The http://buildmaster/api/releases/packages/deployments?key=YourApiKey&applicationName=TDWTF2&pipelineStageName=Testing&indent=true URL (modified for us, of course) is still returning 404s.

          Could it be the version of BuildMaster we're running? (Currently 5.3.7).

          Further investigation finds:

          1. http://buildmaster/api/json?key=APIKEY returns a blank 200 page
          2. http://buildmaster/api/?key=APIKEY returns a 404 Not Found page
          3. http://buildmaster/api/json/Builds_PromoteBuild?key=APIKEY returns nothing (closed socket, i think)

          When I look through the access-logs for the api I only have entries for the /api/json request (1) (not the /api (2) or /json/Build_PromoteBuild (3) requests).

          Any ideas?

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

            The Release & Deployment API was added in BuildMaster v5.5 so you'd have to upgrade to use it.

            As for the /api/json page, it shouldn't require a key to view the methods so there's a bug there and I've added that to our internal issue tracker.

            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