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.
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:
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
SkipCodeGenerationChecksflag in the Validation Configuration to
Exporting the API Workspace
To export your API workspace, click on the upload (☁️) icon from the left side of the status bar:
The export process will begin instantly. If your workspace isn't already built, the build process will start first:
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:
If you are exporting for the first time, a successful export will create a new API group entity in your APIMatic Dashboard:
The exported entity should be visible in your Dashboard:
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:
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:
This is how it will look like for your API entity in the 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:
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
Importfrom the list:
After proceeding, an APIMatic Metadata file will be successfully added in your workspace with default import settings as shown below:
For More Information
You can find out more details here about how an exported API definition's import to the Dashboard works.