Gloop REST API Editor
The Gloop REST API editor is what you use to map your Gloop services to your REST endpoints that are to be exposed. It has extra fields to aid in populating your Swagger, OpenAPI, and Postman definitions; and it does so by splitting up parts of the definition into separate tabs, which will be explained below.
Preview your API in TORO Integrate's API Explorer while you edit!
While you're editing a Gloop REST API, you can click on the API Explorer button in the Operations tab to watch your Swagger definition come to life in the API Explorer as you edit it! Every time you save the API, Coder Studio will reload the specification into API Explorer for you.
Example REST APIs
examples package includes some REST APIs in the
The Source tab shows the raw Gloop definition of the REST API. This information is used by both Gloop and TORO Integrate at runtime to build your APIs. This source text is read-only, but may be selected, and copied to your clipboard.
The General tab is used to maintain general information about the API. The fields here map to the Info Object in the resulting Swagger or OpenAPI definition. The fields in this tab are as follows:
|Version||Required. The version of the REST API.|
|Title||Required. The title of the API.|
|Description||A short description of the API. CommonMark syntax may be used for rich text representation.|
|Terms Of Service||A URL to the terms of service for the API. Must be in the format of a URL.|
|Contact Name||The identifying name of the contact person or organization, which will be included in the Swagger or OpenAPI definition.|
|Contact URL||The URL pointing to the contact information. Must be in the format of a URL.|
|Contact Email||The email address of the contact person or organization. Must be in the format of an email address.|
|License Name||Required. The license name used for the API.|
|License URL||A URL to the license used for the API. Must be in the format of a URL.|
The Documentation tab is used to populate the External Documentation Object section of the Swagger or OpenAPI definition. The fields in this tab are as follows:
|Documentation URL||Required. The URL for the target documentation. Value must be in the format of a URL.|
|Description||A short description of the target documentation. CommonMark syntax may be used for rich text representation.|
The Operations tab is most important tab in the editor. This is where all the paths are mapped to their respective Gloop services. In Swagger or OpenAPI, these are referred to as operations. This tab is similar to the Gloop service editor and the Gloop model editor in that they have a toolbar at the top, and support a wide range of content-assist helpers to make editing faster and easier.
Below is a screenshot of the toolbar, and a table listing what each button in the toolbar is used for.
|New Path||Adds a new path to the REST API. This maps to the Swagger or OpenAPI Path Item Object.|
|New Operation (Wizard)||Opens a wizard prompting you to choose a service and request method to add to a selected path in the Operations editor, which then results in a new operation being added to the API. This maps to the Swagger or OpenAPI Operation Object.|
|New Body Parameter||Adds a parameter to an operation. This maps to the Swagger Parameter Object, whose
|New Parameter||Adds a parameter to an operation. This maps to the Swagger or OpenAPI Parameter Object.|
|New Response||Adds a response to an operation. This maps to the Swagger or OpenAPI Response Object.|
|New Tag||Adds a string to the list of tags for the operation.|
|New Consume||Adds a new consume entry to the operation.|
|New Produce||Adds a new produces entry to the operation.|
|Edit Response Header||Edits the model used to represent the response headers of the operation.|
|Edit||Edits the value of the selected row in the Operations tree.|
|Delete||Deletes the current entry from the Operations editor.|
|Collapse All||Collapses all nodes in the Operations editor.|
|Expand All||Expands all nodes in the Operations editor.|
|Enabled||Enables and disables the API. If the API is disabled, it's still editable but no operations will be exposed.|
Want to learn more about the Operations editor?
The Operations editor is packed with many features, and because there are many topics to discuss, it has been assigned its own dedicated page.
The Tags tab is used to maintain the tags for the Swagger or OpenAPI definitions. New tabs are added by clicking on the plus button in the toolbar, and existing tags can be deleted by clicking the 'x' button in toolbar. Alternatively, you can select a tag and press instead to delete. To edit an existing tag, simply double click on it or select one and press . The following fields will appear when editing a tag:
|Name||Required. The name of the tag.|
|Tag Description||A short description for the tag. CommonMark syntax may be used for rich text representation.|
|External Doc. URL||Required. The URL for the target documentation. Value must be in the format of a URL.|
|External Doc. Description||A short description of the target documentation. CommonMark syntax MAY be used for rich text representation.|
The Preview tab lets you see what the resulting Swagger, OpenAPI, and Postman files will look like (in JSON and YAML for Swagger and OpenAPI, too). You can use the select box on the right-hand side of the address bar to choose which version you want to preview.