Azure APIM Developer Portal: Unable to edit Query param after adding some sample values in Azure Portal

Prasad Karanth 0 Reputation points
2023-02-06T20:32:24.45+00:00

Hi, In order to make it easier for Developers, we add Request, Response samples in APIM Portal for each operation. That's when I noticed this bug. For ex: In this case I added a value for the query parameter.. If I go back to APIM Developer Portal, You can see that a non editable drop down is displayed, so the User is forced to choose from the drop down, they can't add their own value, even though I didn't make the value default. So I tried both ways - by making the value default and not default.. still the same non editable drop down is displayed.. I can't add an empty value to this list of values, so there is no way for Users to add custom value.

  • Azure APIM Portal:User's image
  • Azure APIM Developer Portal:

User's image

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,447 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MuthuKumaranMurugaachari-MSFT 22,441 Reputation points Moderator
    2023-02-07T22:01:24.93+00:00

    Prasad Karanth Thank you for posting your question in Microsoft Q&A. This is working per design and as explained in GitHub thread, all pre-defined values for a parameter are treated as Enum and hence you see the limited set of values defined in API.

    So instead of adding the parameter values, you can specify examples using OpenApi's example property described as follows:

    Setting examples for parameters isn't supported in the form-based design of the Azure portal interface, but you can do it manually by editing the OpenAPI file:

    1. Go to APIs in your API Management service in the Azure portal.
    2. Select your API.
    3. Keep "All operations" selected.
    4. Select the "pencil" icon in the "frontend" section.
    5. Edit the OpenAPI file and save it.

    Here is the sample I checked in my APIM operation, and you can customize the object based on your need:User's image

    Developer portal:User's image

    If you have any feedback regarding this, feel free to open up a conversation directly with our product team on the GitHub thread.

    I hope this helps with your question. Please accept as "Yes" if the answer is helpful, so that it can help others in the community.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.