user2608601
user2608601

Reputation: 147

Azure APIM - how to publish versions

how to publish latest version to Azure APIM. With each build/release, I'm looking to publish latest API definitions to APIM, but not sure how to do this.

Found below documentation, but below URL doesn't indicate where to mention serice URL to get the latest API definitions.

PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/api-version-sets/api1?api-version=2018-06-01-preview If-Match: *

Do I need to add a step in release definition or any other approach like azure function.

Upvotes: 1

Views: 205

Answers (1)

Vitaliy Kurokhtin
Vitaliy Kurokhtin

Reputation: 7840

Ultimately you have to have an updated OpenAPI spec for your backend with each release. Then you'll be able to import this spec into APIM as a part of your release routine. If you do not maintain OpneAPI spec - there are tools that allow you to generate it from your server-side code.

I would imagine you should be more interested in PUT call rather than PATCH. Since it is likely that with every release you'd want to replace your API in APIM with new one.

Upvotes: 1

Related Questions