Creating a REST API Workflow - Platform - BlueCat Gateway - 18.6.1

Gateway Administration Guide

BlueCat Gateway
  1. Under Available Actions, click Create Workflow.

  2. Complete all of the required fields, then select Workflow using only REST API.
  3. Click SUBMIT.
    Since the new workflow was created as a REST API workflow, it will not show up on the Available Actions menu. The files for the new API are all created underneath <dns_integrity_gateway>/workflows/Examples/example_rest_workflow (for the current example). If you now look at the from that directory you will see:
    # Copyright 2018 BlueCat Networks. All rights reserved.
    from flask import request, g, abort, jsonify
    from bluecat import route, util
    from main_app import app
    # application config
    # GET, PUT or POST
    @route(app, '/example_rest_workflow/example_rest_workflow_endpoint', methods=['GET', 'PUT', 'POST'])
    def example_rest_workflow_example_rest_workflow_page():
        # are we authenticated?'SUCCESS')
        return jsonify({"method" : request.method})

    Again, you can place your own implementation in this file. Once done, it can be called by any suitable REST client using Basic authentication.