API response code rendering issue

Nike K 0 Reputation points
2026-08-18T11:18:28.5+00:00

The HTTP response status codes for an API operation are displayed in a non-ascending order in the Azure API Management (APIM) Portal.

Observed in APIM Portal:

401
403
200
404

Expected:

200
401
403
404

But in Json format the responses are in correct order. May I know the exact reason for the same.

Azure API Management
Azure API Management

An Azure service that provides a hybrid, multi-cloud management platform for APIs.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Jose Benjamin Solis Nolasco 11,621 Reputation points Volunteer Moderator
    2026-08-24T03:57:51.73+00:00

    Welcome to Microsoft Q&A!

    @Nike K I hope you are doing well,

    The reason this happens is due to how the APIM Developer Portal UI retrieves and renders data. While your JSON file is ordered, JSON standards do not actually enforce or guarantee key order. When you import your API, the Azure APIM backend Management API parses and stores those responses in its own internal structure (often based on insertion order or internal IDs).

    The Developer Portal's frontend widget simply renders the responses in the exact order it receives them from the backend, without applying a secondary numerical sort (like ascending 200 -> 404) on the screen.

    Recommended Next Steps: Since the managed portal doesn't natively enforce numerical sorting for this specific widget, you have a couple of options:

    The Quick Workaround: If you want to force the order in the managed portal, you can go into the Azure Portal, delete the responses for that operation, and manually recreate them one by one in your preferred order (200, then 401, etc.).

    1. The Developer Portal GitHub: Because the APIM Developer Portal is open-source, you can report this sorting behavior as a UI bug/feature request directly to the engineering team on their official GitHub repository. If you happen to be self-hosting the portal, you can even modify the React widget code yourself to force a numerical sort!

    Help make this community better for everyone: if this answer resolved your issue, please accept it or leave an upvote. If not, share more details in a comment so we can continue the discussion and find the right solution

    Was this answer helpful?


Your answer

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