< Back

Export-AzureRmApiManagementApi

Tue Jan 29, 2019 9:28 pm

NAME Export-AzureRmApiManagementApi



SYNOPSIS

Exports an API to a file.





SYNTAX

Export-AzureRmApiManagementApi -ApiId <String> -Context <PsApiManagementContext> [-DefaultProfile <IAzureContextContainer>] [-Force] [-PassThru]

-SaveAs <String> -SpecificationFormat {Wadl | Swagger | Wsdl} [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

The Export-AzureRmApiManagementApi cmdlet exports an Azure API Management API to a file in one of the supported formats.





PARAMETERS

-ApiId <String>

Specifies the ID of the API to export.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Context <PsApiManagementContext>

Specifies a PsApiManagementContext object.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Force [<SwitchParameter>]

Indicates that this operation overwrites the file of the same name if it already exists.



Required? false

Position? named

Default value False

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-PassThru [<SwitchParameter>]

Indicates that this operation returns $True if the API is exported successfully, or $False otherwise.



Required? false

Position? named

Default value False

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-SaveAs <String>

Specifies the file path to which to save the exported API.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-SpecificationFormat <PsApiManagementApiFormat>

Specifies the API format. psdx_paramvalues Wadl and Swagger.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

String

This cmdlet returns the exported API content as a string.





NOTES









Example 1: Export an API in Web Application Description Language (WADL) format



PS C:\\>$ApiMgmtContext = New-AzureRmApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"

PS C:\\>Export-AzureRmApiManagementApi -Context $ApiMgmtContext -ApiId "0123456789" -SpecificationFormat "Wadl" -SaveAs

"C:\\contoso\\specifications\\0123456789.wadl"



This command exports an API to a WADL file.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... agementapi

Get-AzureRmApiManagementApi

Import-AzureRmApiManagementApi

New-AzureRmApiManagementApi

Remove-AzureRmApiManagementApi

Set-AzureRmApiManagementApi