Help Center/API Gateway/Developer Guide/Importing and Exporting APIs/Examples of Importing APIs/Importing a Mock Backend Service API
Updated on 2023-04-06 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.
The system is busy. Please try again later.

