Skip to content

Overview

Development

Overview

IDEs

API Explorer

Gloop REST APIs

Introduction

Along with the ability to expose Gloop services via SOAP, Gloop also allows you to create RESTful APIs which can then be exposed to your API consumers using their automatically generated Swagger and OpenAPI definitions, as well as Postman collections.

The RESTful API functionality was built with the OpenAPI initiative in mind, so many parts and fields of the REST API editor are there to help generate the definitions. As a result, it's recommended to become familiar with the Swagger specification, as well as the OpenAPI specification.

For further assistance, TORO Integrate logs warning messages if it finds anything that it considers incorrect with the REST API, such as invalid data or empty fields that are required.

Creating a REST API

With TORO Integrate, you can create either a new RESTful web API from scratch or generate the services and the Gloop REST API, itself, from an existing definition. Either way, to create a new RESTful web API, you must do the following steps first:

Creating a new Gloop REST API

Creating a new Gloop REST API

  1. Launch Coder's Gloop API wizard.

    1. Go to the Coder Navigator view.
    2. Right click on your target package's code folder or any of the code directories under it where you'd like your API to reside.
    3. Select New, then select Gloop API. The wizard should now appear in your screen.

    Launch the wizard using keyboard shortcuts only

    In Coder Studio, you can open the Gloop API wizard by pressing and by typing api in the appearing dialog's search box.

  2. Select Publish as the type of action, then click Next.

  3. Specify the name of the API and ensure New REST API is selected; then click Finish or Next again.

    If you want to create a Gloop REST API from scratch but would like to enter the other meta-properties of your API later (such as its description, version, terms, and others), then you may now click Finish to proceed to opening the REST API editor. Otherwise2, click Next.

Creating a REST API From Scratch

To create a new and undefined Gloop REST API, continue using the wizard and follow the steps below:

Creating a new Gloop REST API from scratch

Creating a new Gloop REST API from scratch

  1. Choose None as the source, then click Next.
  2. Enter the version, title, and license name onto their corresponding text boxes, then click Next. These will be displayed in the Swagger or OpenAPI definition.

    Auto-complete

    The license text field has an 'auto-complete' feature that suggests commonly used licenses.

  3. Enter the documentation URL and (optionally) add a description for it. Click Next.

    Use Markdown in your description

    Note that as per the specifications of OpenAPI and Swagger, the description field allows CommonMark. Coder Studio also allows you to preview the markdown as you edit it. Beside the editor are six buttons. They are as follows:

    • Source view
    • Source and Preview view
    • Preview view
    • Orientation toggle (toggles the preview being beside or underneath the source while in the Source and Preview view
    • Preview back
    • Preview forward
  4. Optionally, add any tags to the API, then click Next again.

  5. Optionally, enter the path that you would like to expose via REST. Click Next.
  6. Choose a service that you would like to add to the API, then click Next.
  7. Finally, choose the HTTP request method that the operation will map to, then click Finish.

At this point the Gloop REST API editor will open and display your newly created Gloop REST API's details:

The Gloop REST API editor

The Gloop REST API editor

How do I generate REST APIs from existing definitions?

The steps for generating Gloop services and Gloop APIs from existing definitions are discussed Generating Gloop Services. This guide does not cover the topic as it is already documented in the resource linked.


  1. As long as the schema is supported by TORO Integrate 

  2. That is, if you would like to enter your new Gloop API's details now or create a Gloop REST API from an existing definition.