Creating a Gloop REST API
You can create a new Gloop REST API from scratch, or generate one from an existing definition1. Below are the procedures you have to follow if you want to create a new REST API:
Launch Martini's Gloop API wizard.
This is done by going to the Navigator, right clicking on the directory where the API will reside, and then selecting New > Gloop API wizard from the appearing context menu.
Launch the wizard using keyboard shortcuts only
In Martini, you can open the Gloop API wizard using the wizard launcher. To open the wizard launcher, press if you're using Martini Desktop; if Martini Online. To finally launch the Gloop API wizard, select Gloop API from the provided list of wizards in the dialog. To filter displayed wizards, type
apiin the dialog's search bar.
Select Publish as the type of action, then click Next.
Specify the name of the API, and select REST API as the Type; then click Finish or Next again.
If you want to provide other details of your API later (such as its description, version, terms), then you may now click Finish. Choosing this option will open your API in the REST API editor immediately. You may ignore the succeeding steps in this guide.
If you would rather enter your new Gloop API's details now, click Next.
Choose None as the source, then click Next.
Enter the version, title, and license name onto their corresponding text boxes. Click Next. These will be ported to the Swagger or OpenAPI definition of your API.
The license text field has an auto-complete feature that suggests commonly used licenses.
Enter the documentation URL and (optionally) add a description for it. Click Next.
Use Markdown in your description
As per the specifications of OpenAPI and Swagger,
descriptionfields allow CommonMark2. And for your convenience, Martini allows you to preview the Markdown as you edit it.
You can shift the arrangement of this Markdown editor using the following buttons in the wizard, located beside the text area:
- Show source only
- Show source and preview
- Show preview only
- Toggle horizontal or vertical orientation
(Optional) Add tags for your API. Click Next.
- Enter a path you would like to expose through your API. Click Next.
Choose a service for the path specified in the previous step. Click Next.
Finally, choose the HTTP request method for the operation you entered. Click Finish. After this, the Gloop REST API editor will open and display your newly created Gloop REST API.
See Rich Text Formatting. ↩