title: Azure API Management/Portal: activate Mocking for "Try Out" in API Portal
body: <p>I was wondering if there is the possibility to activate mocking for calls to an Azure API Management based API from the API Portal.</p>
  <p>I don't want developers who browse the interface catalog and use the &quot;try it&quot; functionality to actually CRUD records from/in the backends. They should only receive a set of predefined data so they can develop against it without messing up the data in the backends.</p>
  <p><strong>Example</strong></p>
  <p>API is created on Azure API Management and productive.
  This API is listed in the corresponding Azure API Portal -
  a developer now finds that API and wants to try it out:
  <a href="https://i.stack.imgur.com/rCtdD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rCtdD.png" alt="enter image description here" /></a></p>
  <p><strong>POST /SalesQuote</strong> would create a Sales Quotation in SAP. A developer uses the &quot;try it&quot; button in the developer portal to see the behaviour. The &quot;send&quot; button now actually creates a record in the backend.</p>
  <p>Can this be prevented? If so - how? Would this be something that could be achieved within the API policy (i.e. mock data for origin = api portal url)?</p>
  <p>The only other option I can think of would be disabling the try it feature - rather a bad solution.</p>
  <p>EDIT: general &quot;mocking-enabled&quot; is of course for a productive API no option.</p>
  <p>Thanks for your help!</p>