Get Started

Theme switcher

Base URL

The Base URL widget is a crucial element in Theneo's web editor, enabling you to clearly specify the root URL(s) for API requests. Here's how to use it:

  1. Insert the Widget: In your documentation, navigate to the place where you want to mention the base URL. On a new line, type /base url and select the Base URL widget from the dropdown.
  2. Edit Base URL: To edit the base URL, click the edit icon in the base URL widget or open the More Actions menu in the API Management widget and select the Base URL configuration option. A dialog box will appear, allowing you to add or modify URLs for different environments, such as Production and Sandbox.
  3. Save Environment URLs: Enter the title for each environment and the corresponding URL. For example, you could have "Production" with the URL http://api.example.com and "Sandbox" with the URL http://sandbox.api.example.com.
  4. Automatic Updates: Once you save your base URLs, they will be dynamically updated across all sections of your documentation. If you adjust the base URL, the changes will reflect throughout the documentation without the need for manual updates in each section.
  5. API Explorer Synchronization: The base URL also synchronizes with the API explorer, allowing users to switch between environments like Sandbox and Production effortlessly while trying out API calls.

Managing Base URLs

Default Setup

By default, your documentation includes a Production environment with a sample base URL: http://example.io.

Adding Multiple Base URLs

You can enhance your documentation by configuring multiple base URLs within the same environment. For instance, under the Production environment, you can define two distinct base URLs such as http://example.io and http://example.prod.io. Follow these steps to add and customize base URLs:

1

Access Base URL Configuration Modal

Open the base URL configuration modal for the desired environment.

2

Add Another Base URL

  1. Click on the "Add Another Base URL" button.
  2. Enter a valid base URL in the input field.
3

Submit or Customize Further

  1. To Add Only: Press Submit, and the new URL will appear in the base URL widget.
  2. To Customize:
    • Click the Settings icon in the modal.
    • A separate window will appear. Select specific endpoints or sections where you want to apply this base URL.
    • Press Save to confirm your changes.
4

Apply Changes

  1. Your updates will reflect in the editor immediately.
  2. Once published, the changes will also apply to the published documentation and API Explorer.

Adding New Environments

You can create unlimited environments tailored to your API needs, such as “Sandbox,” “Testing,” or “Staging.” Here’s how to define multiple environments:

1

Access Base URL Configuration Modal

Navigate to the base URL configuration modal

2

Add a New Environment

  1. Click the "Add New Environment" button.
  2. Provide a name for the environment, e.g., "Sandbox."
  3. Add a valid base URL for the environment.
3

Assign Environment to Endpoints

Use the same steps as configuring base URLs:

  1. Select specific endpoints or sections for the environment.
  2. Save your changes.

Customizing Environment Settings

Each environment can have its own set of base URLs and configurations, allowing you to align them with your development, staging, or production workflows.

Benefits of Configuring Base URLs and Environments

  • Flexibility to manage multiple base URLs under a single environment.
  • Seamless switching between environments for different stages of API development.
  • Centralized configuration improves collaboration and consistency across your documentation.
  • Updates are instantly reflected in both the editor and published documentation, ensuring accuracy.

FAQ:

  • Can I edit the name of the environment? Yes, you can. By default, sample environment names are provided, but you have the flexibility to update and customize them to suit your preferences.
  • Will I need to update the base URL in every section if it changes? No, once you update the base URL in the widget, it will automatically reflect across all sections of your documentation, saving you time and ensuring consistency.
Was this section helpful?

What made this section unhelpful for you?

Base URL

Production:

Sandbox:

Was this section helpful?

What made this section unhelpful for you?