Can't copied sample request and response API

Desty 20 Reputation points
2025-01-22T08:52:05.85+00:00

Hi, I copied the API from environment development to environment production, but why are all the sample requests and responses missing in environment production?

Environment Development

image (13)

Environment Production

image (12)

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

1 answer

Sort by: Most helpful
  1. RithwikBojja 75 Reputation points Microsoft Vendor
    2025-02-06T05:47:01.5766667+00:00

    Hi @Desty,

    Thank you for reaching out to MS Q&A.

    The issue is not with development or production environments, rather it is with exporting the API. This is a known limitation while exporting it with Open API.

    Firstly, I have below sample responses:

    enter image description here

    When exported it with json (Only top row has exported):

    "205": {
    
            "description": "jj",
    
            "content": {
    
                "application/AML": {
    
                    "schema": {
    
                        "$ref": "#/components/schemas/WeatherForecast"
    
                    },
    
                    "example": {
    
                        "L": 0
    
                    }
    
                }
    
            }
    
        }
    

    To resolve this issue, I have exported it using WADL as below:

    enter image description here

    When exported, I have got all sample responses:

    <doc>jj</doc>
    
    <representation mediaType="application/AML">
    
    <doc>{ "L": 0 }</doc>
    
    </representation>
    
    <representation mediaType="application/AML">
    
    <doc>{ "K": 4 }</doc>
    

    Now after importing using WADL, all the sample responses are imported:

    enter image description here

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.


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.