Skip to main content Skip to complementary content

Organizing your API list

Configure your portal to define how to display your list of APIs.

About this task

By default, all APIs in the portal are displayed in alphabetical order. You can create a list that allows you to sort and group them.

Procedure

  1. In your API Portal repository, open the config.toml file.
  2. Enter your configuration at the end of the file, under [params].
    The file contains comments with an example of the structure. The list should be structured as follows:
    [params]
      [[params.api-list]]
        "<group_1>" = [ "<api_1>", "<api_2>" ]
      [[params.api-list]]
        "<group_2>" = [ "<api_3>", "<api_4>" ]
      [[params.api-list]]
        "default" = [ "<api_5>", "<api_6>" ]
    You can add as many groups as needed. You can also sort APIs in "default" if they should appear at the beginning of the list, without a specific group.

    The APIs should be referenced using the name of their folder in apis. Group names can contain UTF-8 and Unicode characters.

    Information noteNote: Once the list is created in config.toml, new APIs need to be added to it in order to appear in the portal.
  3. Commit your changes.

Results

Once your portal is deployed with this new configuration, your APIs appear in the specified groups.
With the following configuration, the list would be displayed as in the image below:
[params]
  [[params.api-list]]
    "Inventory" = [ "books", "dvds" ]
  [[params.api-list]]
    "Sales" = [ "customers", "orders" ]
  [[params.api-list]]
    "default" = [ "employees"]
The Books and DVDs APIs appear under Inventory, and the Customers and Orders APIs appear under Sales. The Employees API is at the top of the page and is not part of any group.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!