Configure a table definition

In this topic, you learn how to configure an API to communicate with a table definition.

Prerequisites

Procedure

In this procedure we use sample data from the Star Wars universe. You can exchange our data with your data in the procedure.
  1. In the Cockpit, go to Connectivity and select API Designer.

  2. In the API Designer, select Create.

    Result: The Create API dialog opens.

  3. In Type, select Table Definition.

  4. In API Format, Swagger 2.0 is preselected.

  5. Enter a Name for your table definition, for example, API Clones.

  6. In Table, select a table definition from the Select Table Definition.

  7. If you created a package for your APIs, applications, oData, and mock data before, you can select this from Package.

  8. In Endpoint, enter the URL of the external API, for example, https://swapi.dev/api.

    Do not put a slash / at the end of the endpoint.
    If you select the API type in Type as Import Definition to configure an API on the basis of the import of a table definition, the import auto-populates the endpoint of the table definition, removing the need to enter it manually. If you select the API type in Type as Import Planet 9 File to configure an API on the basis of the import of a Planet 9 file, the import also predefines the API format and auto-populates the endpoint.
  9. Select Create.

  10. Once you have created the table definition, in the General tab, in Version, enter a version number, for example, 1.0, to keep track of changes to the API.

  11. In Media Type, define the type of content of your api. This is needed to communicate with your browser. By default, it is application/json.

  12. Activate any of the following options that fit your application:

    • Allow Untrusted Certificates: Allow self-signed certificates that were added in Proxy Authentication.

    • Enable Proxy: Allow proxy to reach external servers to prevent CORS issues.

    • Enable Trace: Allow tracing activities of your API. You can see activities in the API Client.

    • Use in App Designer & App Editor: Allow this API to be used in the App Designer or App Editor.

  13. Click Save.

Result

  • Your API is saved with the current settings and is added to the library in the API Designer.

  • The API Designer adds an ID to your API and saves change dates.

Next steps