Creating a REST API in Martini
This guide provides a straightforward process for creating a new REST API in Martini. The steps are designed to be applicable universally across different environments of Martini.
Starting the API Wizard
- Open the API Wizard:
- In the Navigator view, right-click on the directory where you plan to create your API.
- Select
New > API Wizard
from the context menu to initiate the process.
Creating Your API
-
Selecting the Action Type:
- In the API Wizard, choose
Publish
as the action type and then clickNext
.
- In the API Wizard, choose
-
Defining API Details:
- Enter a name for your API and select
REST API
as the type. - If you prefer to provide additional details later, click
Finish
to open the API editor. If you want to add more details immediately, clickNext
.
- Enter a name for your API and select
-
Entering Additional Information:
- For further details, choose
None
as the source, then proceed withNext
. - Fill in the API's version, title, and license information. The license field might suggest common licenses for ease of use.
- After completing these details, click
Next
.
- For further details, choose
-
Documentation and Description:
- Provide a documentation URL for your API. Optionally, you can add a detailed description, making use of Markdown formatting if needed. Continue with
Next
.
- Provide a documentation URL for your API. Optionally, you can add a detailed description, making use of Markdown formatting if needed. Continue with
-
Adding API Tags:
- Insert tags for your API to aid in identification and categorization. After tagging, proceed with
Next
.
- Insert tags for your API to aid in identification and categorization. After tagging, proceed with
-
Setting Up the API Path:
- Determine and specify the path your API will expose. Click
Next
after setting the path.
- Determine and specify the path your API will expose. Click
-
Choosing a Service:
- Select the appropriate service that aligns with the path you have defined. Click
Next
to move forward.
- Select the appropriate service that aligns with the path you have defined. Click
-
Finalizing the API:
- Choose the desired HTTP request method for your API's operation. Finalize your settings by clicking
Finish
.
- Choose the desired HTTP request method for your API's operation. Finalize your settings by clicking
After completing these steps, the API editor will open, displaying your newly created REST API.
Note: It's important to include all necessary models and services to ensure the full functionality of your API.