REST Support in ElectricFlow and ElectricCommander 5.2

One of the enduring strengths of ElectricCommander and ElectricFlow is the full API support: anything you can do in the product’s UI you can also do from the command line using ectool, or using other tools or systems with our Perl and Java API bindings.

However, not everyone in the world wants to learn Perl or Java (shocking, I know). So, one of the most frequently requested features for ElectricCommander has been to provide a REST API, making it easier to consume the Commander API in the language of your choice.

Starting with version 5.2, ElectricFlow and ElectricCommander server API are fully REST-enabled and REST is a first-class citizen going forward.

For existing customers that are too impatient to read through the rest of this blog (pun intended) – the REST API is exposed on your https://localhost:8443/rest/v1.0 – Have at it.

We have used the excellent Swagger-UI to document the API and make it more discoverable.

swagger

To see that, visit https://localhost:8443/rest/doc/v1.0 (actually – for everything to work correctly, security-wise – you’ll want to use the fully-qualified hostname of your Commander server when using Swagger).

Sample Code:

Following are a few simple examples, all using curl to do the heavy lifting. For brevity, I’m leaving out the authentication options, but you could use basic authentication by passing  --basic -u user:password  , for example.

Create a project, passing arguments as query parameters:

Fetch a project by name:

Simple parameters can be included either as query string parameters or as part of the JSON payload.

Create a procedure with the description passed as a query parameter (remember to escape the “&” if you use sh):

or, pass the parameters in the JSON body:

Fetch the procedures we just created:


For a more realistic example, one of our excellent professional services engineers (thanks, Robert!) created a JQuery-based app which you can find at https://github.com/electriccommunity/electriccommander/tree/master/CommanderREST

robert-rest-api

You can also check out the RESTful API documentation for ElectricFlow and ElectricCommander 


See it in action:

code-apiJoin us on November 12, at 10am PST for a live demo of the REST API.

The technical webinar will highlight key features and functionality and cover common use cases, including:

 

  • How to access the native REST interface
  • How to use REST to create new jobs, kick off existing jobs, or report on finished jobs
  • See code samples for common use cases for integrating your tool chain to achieve centralized management and orchestration

Register for the webinar

 

Anders Wallgren

Anders Wallgren is Chief Technical Officer of Electric Cloud. Anders brings with him over 25 years of in-depth experience designing and building commercial software. Previously, Anders held executive and management positions at Aceva, Archistra, Impresse, Macromedia (MACR), Common Ground Software and Verity (VRTY). Anders holds a B.SC from MIT.

Share this:

One response to “REST Support in ElectricFlow and ElectricCommander 5.2”

  1. Jonathan Thorpe says:

    Anders, this is exciting stuff. Will you also blog about the JavaScript bindings? It’s great to see you blogging and I’m hoping to see lots more technical content from you.

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe

Subscribe via RSS
Click here to subscribe to the Electric Cloud Blog via RSS

Subscribe to Blog via Email
Enter your email address to subscribe to this blog and receive notifications of new posts by email.

ElectricFlow Community Edition

FREE

ElectricFlow

The most advanced DevOps Release Automation solution

ElectricFlow - The most advanced DevOps Release Automation solution

Download Now

Learn more about ElectricFlow

Continuous Discussions Video Podcast

Next Episode: ChatOps and DevOps
March 28, 2017 at 10am PT


Add to your calendar »