Help Center/
    
      
      API Gateway/
      
      
        
        
        Developer Guide (Paris Region)/
        
        
        Importing and Exporting APIs/
        
        
        Examples of Importing APIs/
        
      
      Importing a Mock Backend Service API
    
  
  
    
        Updated on 2025-02-21 GMT+08:00
        
          
          
        
      
      
      
      
      
      
      
      
  
      
      
      
        
Importing a Mock Backend Service API
Import the definition of a Mock backend service API that uses the GET method and is accessed without authentication.
Swagger example:
swagger: "2.0"
info:
  title: "importMockEndpoint"
  description: "import apis"
  version: "1.0"
host: "api.account.com"
paths:
  '/mock':
    get:
      operationId: "mock"
      description: "mock test"
      schemes:
      - http
      responses:
        "200":
          description: "mock result"
      x-apigateway-request-type: "private"
      x-apigateway-cors: true
      x-apigateway-match-mode: "NORMAL"
      x-apigateway-backend:
        type: "MOCK"
        mockEndpoints:
          result-content: "{\"message\": \"mocked\"}"
securityDefinitions:
  apig-auth-app:
    in: header
    name: Authorization
    type: apiKey
    x-apigateway-auth-type: AppSigv1
  apig-auth-iam:
    in: header
    name: unused
    type: apiKey
    x-apigateway-auth-type: IAM
   Parent topic: Examples of Importing APIs
  
 Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
                The system is busy. Please try again later.
                
            
        For any further questions, feel free to contact us through the chatbot.
Chatbot