Skip to main content

Export API

You can export your API into any of the supported API specification formats in APIMatic. All popular formats like OpenAPI, RAML and API Blueprint are supported.

  1. On the APIMatic Dashboard, click on the kebab menu (three vertical dots) on the API entity that you want to export.

    Selection from three dots

  2. Select Export API from the options.

    Export API

  3. Select the API version you want to export, choose the Export Format from the dropdown and click Export. By default, the API is exported without any specification extensions (e.g. OpenAPI/Swagger vendor extensions). However, you can export your API along with extensions by enabling the Include Extensions flag. The API definition will be exported into the desired format.

    Export API

Supported Export Formats

We support export of API specifications to the following formats:

API Specification FormatVersionFile Format
Postman Collection2.0
API Blueprint1AMarkdown
GraphQL Schema-GraphQL

Configuring Export

You can configure how your input API definition is exported by providing export-specific configuration settings in the APIMatic's Metadata file. It is important to note here, however, that the APIMatic Metadata file is provided at the time of import. Therefore, configuring for export requires that you import your input API specification with the required set of export settings which are then stored along with the API definition.

The export configuration settings can be placed in an Export Settings Object in the root object of the Metadata file using the ExportSettings property as shown below:

"ExportSettings": {
"ExportExtensions": true,
"GenerateModelSamples": true

Export Settings Object

The available properties and their respective types are as follows:

ExportExtensionsBooleanDefault: false. If true, any extensions, if supported in the selected export format, will be exported to the output file.
GenerateModelSamplesBooleanDefault: true. By default, when exporting to Postman (v1.0,2.0), parameter/request/response samples will be auto-generated (where needed) except when importing from WSDL or WADL. Sample generation can be enabled/disabled using this flag.
UseDateTimeOnlyInRamlBooleanDefault: false. If true, then all date-time fields are exported with type datetime-only instead of datetime in RAML v1.0.
SetPostmanParamValuesAsVariablesBooleanDefault: false. If true, auto-generated sample values for Postman params (query/path) will be stored inside collection variables instead of being directly embedded in the param definitions. The name of the variable will be the param's name. The values stored in the variables can then be adjusted through the Variables section in Postman's Collection editor.
AddRefSiblingDataInAllOfSchemaBooleanDefault: true. Any sibling data linked to a schema definition that also uses $ref will be exported by placing the reference and sibling data in the allOf construct. If set to false, the sibling data will be ignored.
EncodeUrlParamsInPostmanBooleanDefault: true. Enable/disable request URL encoding when exporting to Postman.
UseXsdBase64BinaryTypeBooleanDefault: false. By default, the File or Binary types are exported as xs:hexBinary in XML schemas. If true, the types will be exported as xs:base64Binary instead.
ExportXmlMetaDataBooleanDefault: true. By default, XML metadata (e.g. XML node name, namespace, prefix, etc.) is set for XML entities when exporting to OpenAPI v3.x, v2.0 or RAML v1.0. If false the XML metadata will not be exported.
ExportDiscriminatorMappingValuesBooleanDefault: true. When set to false, information about discriminator values are not exported to mapping information of the Discriminator object in OpenAPI v3.
ExportAnyTypeBooleanDefault: true. By default, type any will be exported where applicable. When set to false, type any will be exported as object/string instead.
ExportGlobalTypeCombinatorsBooleanDefault: true. By default, global type combining constructs e.g. anyOf, oneOf, not or union types will be defined once globally and the referencing schemas will refer them via their unique name/path in applicable formats like OpenAPI v3.0 and RAML. When set to false, the global type combining schemas will be embedded inline in all schemas referencing them.
ExportOptionalParametersAsDisabledBooleanDefault: false. By default, optional parameters are enabled in exported Insomnia and Postman Collection files. When set to true, request parameters marked as optional will appear disabled in the aforementioned types of files, upon export.
ExportApiKeyAuthInPostmanBooleanDefault: true. By default, if a request in Postman needs an API key to be sent as a header/query parameter, it is set as its authentication type. When set to false, the API key is instead added as an explicit request parameter. This is especially recommended for cases where a request needs multiple API keys to be sent as part of its authentication, which is a scenario otherwise not supported in Postman authentication types.
GenerateSampleValueFromRegexPatternBooleanDefault: false. By default, this is disabled due to performance overhead. When set to true and a regex pattern is specified, the sample value will be generated based on the specified regex pattern in case of export to Insomnia or Postman Collection.
ForceAllowModelExampleExportForSampleGenerationBooleanDefault: false. By default, sample auto-generation in Postman and Insomnia export do not reuse any examples specified at model level for risk of exporting examples that may contain read-only or write-only properties where they may not be allowed. This setting should be set to true if you do not believe that a risk of read-only or write-only fields exist and so any examples specified at model level should not be ignored.
UseHttpMethodPrefixForAutoGeneratedWsdlNamesBooleanDefault: true. When set to false, WSDL export will not add endpoint's HTTP method as a prefix to auto-generated names of related components e.g. names of schema types, operation name, etc.