title: Azure API Management returns an InternalServerError while PUT'ing a Swagger definition
body: <p>I'm trying to import a Swagger definition via Azure API Managment's REST API following the steps on <a href="https://www.codit.eu/blog/2016/01/25/deploy-your-swagger-api-to-azure-api-management-automatically/" rel="nofollow">this blog</a> and the <a href="https://msdn.microsoft.com/en-us/library/dn781423.aspx#ImportExisting" rel="nofollow">reference documentation</a>. However, I'm getting a 500 error in response, with the body:</p>
  
  <pre><code>{
    "error": {
      "code": "InternalServerError",
      "message": "Request processing failed due to internal error.",
      "details": null
    }
  }
  </code></pre>
  
  <p>My request works for a GET, but not for a PUT. Can anyone point out what's wrong with my request or potential setup issues I should look into?</p>
  
  <p>This is the request I'm sending:</p>
  
  <pre><code>PUT /apis/{app-id}?api-version=2014-02-14-preview&amp;amp;import=true HTTP/1.1
  Host: {tenant}.management.azure-api.net
  Authorization: SharedAccessSignature uid={uid}&amp;ex={ex}&amp;sn={sn}
  Content-Type: application/vnd.swagger.link+json
  If-Match: *
  Cache-Control: no-cache    
  {
      "link": "{app}.cloudapp.azure.com:8165/swagger/docs/0"
  }
  </code></pre>