Importing a Function Backend Service API
Import the request parameter definition of a FunctionGraph backend service API that uses the GET method and is accessed through IAM authentication.
Swagger example:
swagger: "2.0"
info:
title: "importFunctionEndpoint"
description: "import apis"
version: "1.0"
host: "api.account.com"
paths:
'/function/{name}':
get:
operationId: "invokeFunction"
description: "invoke function by name"
security:
- apig-auth-iam: []
schemes:
- https
parameters:
- name: "test"
description: "authorization token"
type: "string"
in: "header"
required: true
- name: "name"
description: "function name"
type: "string"
in: "path"
required: true
responses:
"200":
description: "function result"
x-apigateway-request-type: "public"
x-apigateway-cors: true
x-apigateway-match-mode: "NORMAL"
x-apigateway-backend:
type: "FUNCTION"
parameters:
- name: "functionName"
value: "name"
in: "query"
origin: "REQUEST"
description: "funtion name"
- name: "X-Invoke-User"
value: "apigateway"
in: "header"
origin: "CONSTANT"
description: "invoke user"
functionEndpoints:
function-urn: "your function urn address"
version: "your function version"
invocation-type: "async"
timeout: 30000
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
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.