Skip to content

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

  1. 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

  1. Selecting the Action Type:

    • In the API Wizard, choose Publish as the action type and then click Next.
  2. 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, click Next.
  3. Entering Additional Information:

    • For further details, choose None as the source, then proceed with Next.
    • 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.
  4. 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.
  5. Adding API Tags:

    • Insert tags for your API to aid in identification and categorization. After tagging, proceed with Next.
  6. Setting Up the API Path:

    • Determine and specify the path your API will expose. Click Next after setting the path.
  7. Choosing a Service:

    • Select the appropriate service that aligns with the path you have defined. Click Next to move forward.
  8. Finalizing the API:

    • Choose the desired HTTP request method for your API's operation. Finalize your settings by clicking Finish.

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.