Skip to content

Overview

Concepts and Principles

Development

Overview

IDEs

API Explorer

Releases

Release Notes

TORO Integrate

Coder Studio

Coder Cloud

Bug Reports

Search

Generating Gloop Services

If your API is already defined, then there's no need to create your Gloop Services from scratch. This page will guide you how to generate Gloop Services from:

From an API Schema

To generate Gloop Services from an API schema, follow the steps below:

  1. Launch the 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 services to reside.
    3. Select New, then select Gloop API.

    Shortcut

    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 Consume as the Type if you want to Consume the API defined in the schema, or Publish if you wish to have TORO Integrate host the schema as a new SOAP or REST API, then click Next.

  3. Specify your source API schema.
    1. Browse your API specification document or enter its URL in the text box.
    2. Specify your API schema's type by selecting any of the options in Source, if Coder hasn't selected the correct one for you.
  4. Specify if you want to log your services' requests to Tracker.
  5. Click Finish.

Here's a short GIF for you applying the steps above:

Generating Gloop Services from a Swagger file

Generating Gloop Services from a Swagger file

Supported Schemas

Swagger v2.0

The Swagger specification is a format used to describe and document RESTful APIs. Swagger is a popular choice amongst developers and companies primarily because of the following benefits, stated in the article What is Swagger and Why it Matters:

  • It's comprehensible for developers and non-developers.
  • It's human readable and machine readable.
  • It's easily adjustable.

Companies like Netflix, IBM and Yelp have already incorporated it into their own infrastructure and platform.

OpenAPI v3.0

The OpenAPI specification (formerly known as the Swagger specification) is a format used to describe and document RESTful APIs.

The OpenAPI specification is overseen by the OpenAPI Initiative which aims to standardize API descriptions. Google, Microsoft, and IBM are members of this initiative.

WSDL

WSDL (Web Services Description Language Version) provides a model and an XML configuration used for describing web services.

WADL

WADL (Web Application Description Language) is scheme that provides a machine-readable definition of HTTP-based web applications.

RAML

RAML stands for RESTful API Modeling Language. It's a YAML-based based language used for describing RESTful APIs in a way that's highly machine and human readable.

From an HTTP Request

The Gloop HTTP Client Service wizard allows you to easily create Gloop Services that send HTTP requests and consume HTTP responses. All you have to do is specify the details of the endpoint where the requests will be directed to and the wizard will take care of the rest. This is similar to Postman.

To generate a Gloop HTTP Client Service, simply follow the steps below:

  1. Under the Coder Navigator view, right click on your target package's code directory or any of the directories underneath it where you'd like your service to reside and then do New > Gloop HTTP Client Service.
  2. On the first page of the wizard, enter the name of your to-be-created service. Click Next or hit Enter.
  3. In the following page, specify the method, URL, parameters, body, headers, and response type of the HTTP endpoint that will receive the requests. Additionally, you can opt to create a Gloop Model from the endpoint's response and specify how the response will be represented in Gloop.

    Path variables

    Indicate path parameters by wrapping them with ${}. For example:

    1
    https://target.site/users/${id}
    

    You can also double click on path parts to have them automatically wrapped for you.

  4. Click the Finish button to finally generate the service.

Here's a short GIF that'll walk you through the process:

Generating an HTTP endpoint-calling Gloop Service

Generating an HTTP endpoint-calling Gloop Service

From the TORO Marketplace

The TORO Marketplace also hosts schema documents of different APIs. Instead of having to manually look for your API's specification document, you can just pick them up from the TORO Marketplace and proceed to generating services. To do this, follow the steps below:

  1. In Coder Studio, open the TORO Marketplace dialog by clicking the TORO Marketplace icon button in the toolbar.

    The TORO Marketplace button in the toolbar

  2. Search for and select the API schemas you want to generate services from by checking the checkbox beside its entry.

    1. To show only API schema files in the dialog, select API Schema as the Type.
    2. Further filter through the entries by typing the API's name in the search bar.
    3. Tick the checkboxes of your selected API schemas.

    Searching API schemas in the *TORO Marketplace* dialog

  3. Select the instance where you want the selected packages to be installed.

  4. Click Install.
  5. Select where to install your to-be-generated services to. In this step, you have two options. You can install your services in a new package or an existing package.

    1. Click Next.
    2. Select whether to install in a new or existing package.
    3. Enter your new package's name or select the existing package where you want to install your services.
    4. Click Finish.

    Optionally, you can also click Finish immediately. This will bundle all the services in a new package named after the API schema's Marketplace ID.

Generating Gloop Services from the Marketplace to a new package demo

Generating Gloop Services from the Marketplace to an existing directory demo