Skip to main content

Exporting an API Workspace to APIMatic Dashboard

You can easily export your API workspace from within the VS Code extension to your Dashboard once your API definition is ready. The export will essentially collect all files from the API workspace and import them as a single API entity in the Dashboard. The exact behavior you can expect from this feature is discussed in this document.

Export

Pre-Requisites

  • You must be authorized with APIMatic using an Authentication Key to export your API workspace. To obtain an authentication key please see relevant documentation here. When exporting, you will be prompted to provide the authentication key the first time:

    Authorization

    Only if the provided key is valid, will you be allowed to proceed with the export. You will not be prompted for the key again for as long as it is valid.

  • In order to export your API workspace to the Dashboard, it is required for your workspace to pass the Build first. The build must be run with code generation checks enabled i.e. if you are using an APIMatic Metadata file it must not set the SkipCodeGenerationChecks flag in the Validation Configuration to true.

Exporting the API Workspace

To export your API workspace, click on the upload (☁️) icon from the left side of the status bar:

Export to Dashboard

The export process will begin instantly. If your workspace isn't already built, the build process will start first:

Build Running

If the build passes, the export process will proceed to importing the workspace into the APIMatic Dashboard. At this point you should see a Exporting... message in the status bar:

Export Running

If you are exporting for the first time, a successful export will create a new API group entity in your APIMatic Dashboard:

Export Successful

The exported entity should be visible in your Dashboard:

Export Successful

Subsequent export requests will update the existing entity if it still exists and with the same API name. When updating the same version of an existing API group entity, existing version will only be replaced after taking consent. If consent is not given, a new API group entity will be created in the Dashboard instead:

Export Consent

If a new version is being exported for the same API group entity (i.e. with the same name), it will be added as a separate new version within the same API group entity without replacing the older versions:

Export New Version

This is how it will look like for your API entity in the Dashboard:

New Version in Dashboard

Configuring the Export Process

An export from the VS Code extension is essentially an "import" into the Dashboard. You can largely control how this import works and affects the SDK/Developer Experience portal generation, using various configuration options.

The VS Code extension allows you to easily add a Metadata file with default import settings as follows:

  • Hover near the Workspace File Navigator view title and click on the Add APIMatic Metadata Configuration File option:

    Add Metadata File

  • You will be asked to select all items you'd like to initialize in the APIMatic Metadata file. For the current example, we will only select Import from the list:

    Import Configuration

  • After proceeding, an APIMatic Metadata file will be successfully added in your workspace with default import settings as shown below:

    Import Configuration Added

For More Information

You can find out more details here about how an exported API definition's import to the Dashboard works.