APIM API Timing Out with a SMAPI 422 Response

Warren Kinley 56 Reputation points
2022-11-02T11:19:51.677+00:00

I am seeing this 422 message in APIM. I think it is to do with the size of the mocked response i.e. 2.8 Mb. The actually mocking is working perfectly from outside of APIM, however, when I try and update the API or even try to delete it I see this 422 exception in APIM.
256339-image.png

Also, the endpoint does not even load in APIM, it times out with a "Could not load details for operation...".
256349-image.png

My question is, what are the limits here, mocking responses? I only see a 64 Kb limit on a validation schema policy within APIM.

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

Accepted answer
  1. JananiRamesh-MSFT 26,151 Reputation points
    2022-11-02T17:19:13.713+00:00

    Hi @Anonymous Thanks for reaching out. There are operations in the API that have a really large schema associated with them. That causes the retrieve operation to time out. The only workaround is to delete those operations and maybe re-create them with a smaller sample text or you should upgrade from developer sku to standard/premium sku.

    please try deleting the operations using direct MAPI REST call using a SAS token.

    For example:

    DELETE https://{servicename}.management.azure-api.net:3443/subscriptions/Sub ID/resourceGroups/ResourceGroup Name/providers/Microsoft.ApiManagement/service/APIM service name/apis/Api Name/operations/operation name?api-version=2021-01-01-preview

    Content Type: application/json
    Authorization: SharedAccessSignature <REMOVED>

    Reference: https://learn.microsoft.com/en-us/rest/api/apimanagement/apimanagementrest/api-management-rest

    let me know incase of further queries, I would be happy to assist you.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    1 person found this answer helpful.

0 additional answers

Sort by: Most 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.