Azure API Management


Uploading OpenAPI file via new REST API


Hi all,
I'm attempting to use the new management REST API to deploy OpenAPI definitions to an APIM instance; I can see from https://docs.microsoft.com/en-us/rest/api/apimanagement/api/createorupdate that I can supply an URL to a definition, is it possible to
upload a file in the body too (as the old management API permitted?).
I'm integrating this within Jenkins pipeline so would like to avoid having to upload the OpenAPI definition file to some public location, just so the APIM instance can see it.
Any ideas? Unfortunately I'm not in an environment where Powershell can be used and there is no AzureCLI hooks for this (yet).
You can embed the OpenAPI description into the contentValue property. The only other change is to set contentFormat to “swagger-json”
"properties": {
"contentFormat":
"swagger-json",
"contentValue":
"open api description goes here as an encoded string",
"path": "collector"
}
Hope this helps!
-----------------------------------------------------------------------------------------------------------------------------------
Do click on "Mark as Answer" on the post that helps you and vote it as helpful, this can be beneficial to other community members.
You can embed the OpenAPI description into the contentValue property. The only other change is to set contentFormat to “swagger-json”
"properties": {
"contentFormat":
"swagger-json",
"contentValue":
"open api description goes here as an encoded string",
"path": "collector"
}
Hope this helps!
-----------------------------------------------------------------------------------------------------------------------------------
Do click on "Mark as Answer" on the post that helps you and vote it as helpful, this can be beneficial to other community members.
Thanks Sadiqh, I'll give that a shot - I don't think that was obvious from the documentation; can an example be added to it to save someone else the time in future?
We take that as a feedback and will add the example. Let us know the progress.
-----------------------------------------------------------------------------------------------------------------------------------
Do click on "Mark as Answer" on the post that helps you and vote it as helpful, this can be beneficial to other community members.

Related Links

API Management in new/old portal - working?
How to Authenticate the Resource manager api calls ?
Expose a REST API POST method as GET - not possible?
Does Azure API Management include WAF functionality?
find-and-replace policy statement's "to" attribute does not accept a zero length string
On Developer Portal Login, Redirect the User to Home
In Resource Manager Templates, Is it possible to iterate inside keys expecting an array of items (nested loops)
Azure Scheduler Rest API: Update Job - How to Remove advanced scheduling options? - Error: Schedules are not supported for recurrence unit 'Hour'
I am getting error when trying to add a user group from Active directory in the Azure API management product
How to create API using Azure API Management REST API in C#
Automatically Subscribe a User to a Product
can I capture invalid request info with apim event hubs?
Manage my REST API using Azure
How to restrict direct call to APIs?
Traffic Manager and API Management
API management govenance workflow

Categories

MSDN
DevLabs
Learning
Smart Device Development
Development
Microsoft Research
Project Server
Bing Ads API: Development
Other Forums
Archived Forums SA-SM
In-App Advertising (Ad...
Internet of Things
Software Entwicklung f...
Forums Redesign - Q&A ...
Visual C#
Parallel Computing in ...
Visual Studio General ...
Test Tools in Visual S...
Application Insights (AI)
Publishing Windows Sto...
Dev Center App
Windows Desktop Develo...
Media Foundation Devel...
Windows Desktop Optica...
Windows Desktop Debugging
Windows Desktop Search...
Windows Desktop Pro-Au...
Developing Apps for Of...
Open XML Format SDK
SharePoint 2013 - Deve...
SharePoint 2013 - Setu...
SharePoint 2010 - Gene...
SharePoint 2010 - Setu...
Azure Pack
Azure Mobile Apps
Azure Backup
Azure CDN
StorSimple
Software Modeling Tools
BizTalk Server RFID
Commerce Server 2009
WCF Data Services
The Forum of Sho
Microsoft Translator H...
Partnering with Microsoft
Microsoft Robotics - S...
SQL Server Integration...
SQL Server Data Access
SQL Server SMO/DMO
Microsoft Drivers for ...
SQL Server Search
SQL Server Migration
Standard 7: Components...
SQL Server 2012 Setup ...
Server Virtualization
CRM Deployment
CRM Development
MSDN Subscriptions Fee...
WebsitePanel - Develop...
Windows File Sharing P...
Visio General Question...
Programming Silverligh...
Silverlight Controls a...
Microsoft Online Syndi...
Search Server: Install...
Retired SharePoint Ent...
Retired SharePoint Soc...
Axum Incubation Project
Azure Startups
CAT.NET
Charts & Reports in th...
CHESS – Find and Repro...
Game Technologies: Aud...
Microsoft adCenter: De...
Office Development wit...
Performance Counters f...
Popfly General Discussion
Oracle on Azure
Parallel Programming w...
Search Server: Develop...
Search Server: Frequen...
Silverlight (formerly ...
SQL Server Modeling
Storage Platform – ATA
SyncFx - Feedback [Rea...
SQL Server 2014 Databa...
Transactions Programming
Tools for Windows Stor...
UI Design for Windows ...
Visual C# IDE
Visual Studio 2008 (Pr...
Visual Studio Code Ana...
Visual Studio Editor i...
Visual Studio Performa...
Visual Studio Team Sys...
Building Windows Store...
Building Windows Store...
Building Windows Store...
Expression Blend for W...

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile