title: Import function definition into API Management as part of CI process
body: <p>We're looking to automate the process of importing a function definition into our CD process with every deployment of our azure functions.  Within the azure portal, there is a very straightforward way to import a function definition through the UI, but their doesn't appear to be any api/cli/powershell library to automate this process.</p>
  <p><a href="https://i.stack.imgur.com/bvFoW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bvFoW.png" alt="Azure Portal Function app import" /></a></p>
  <p>We have managed to create a workaround which involves keeping our function app definitions up to date using the C# OpenApi library and then using the <code>az apim import</code> cli command as part of our deployment pipeline but it feels like extra work keeping the OpenApi definition up to date and accurate on every endpoint of our function and it would be preferable to automate what the portal is doing under the hood when you import a function app (this does not require an openapi definition being kept up to date in source code).  Any help would be greatly appreciated.</p>
  <p>We are using Azure Devops for our CI/CD pipelines and releases.</p>