Add method
- Print
- PDF
Add method
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Available in Classic and VPC
Set up and add a method to the API resource created.
Request
This section describes the request format. The method and URI are as follows:
Method | URI |
---|---|
POST | /products/{product-id}/apis/{api-id}/resources/{resource-id}/methods |
Request headers
For headers common to API Gateway, see API Gateway common request headers.
Request path parameters
The following describes the parameters.
Field | Type | Required | Description |
---|---|---|---|
product-id | String | Required | Product ID that the API belongs to
|
api-id | String | Required | ID of the API whose method you want to add
|
resource-id | String | Required | ID of the target resource in the API
|
Request syntax
The request syntax is as follows:
Request body
You can include the following data in the body of your request:
Field | Type | Required | Description |
---|---|---|---|
methodName | String | Required | Method type
|
methodDescription | String | Optional | Method description
|
mockEndPoint | String | Conditional | Endpoint type that returns the value set in the API Gateway
|
mockEndPoint.httpStatus | Integer | Conditional | Response status code
|
mockEndPoint.response | String | Optional | Data to display in the response
|
mockEndPoint.headers | Map<String, String> | Optional | Header to include in the response
|
ncpEndPoint | String | Conditional | Endpoint type that returns a value using a service of NAVER Cloud Platform
|
ncpEndPoint.service | String | Conditional | Service on NAVER Cloud Platform to use for returning responses
|
ncpEndPoint.region | String | Conditional | Supported Region code of the Cloud Functions service
|
ncpEndPoint.actionId | String | Conditional | Action ID of the Cloud Functions service
|
ncpEndPoint.actionName | String | Conditional | Action name of the Cloud Functions service
|
ncpEndPoint.stream | Boolean | Conditional | Whether to use the stream feature
|
ncpEndPoint.method | String | Optional | Method type to request from the Cloud Functions service
|
ncpEndPoint.url | String | Conditional | URL path of the Cloud Functions service
|
httpEndPoint | String | Conditional | Endpoint type that returns the result of a call to an HTTP(S) endpoint
|
httpEndPoint.method | String | Conditional | Method type to request from the backend server
|
httpEndPoint.stream | Boolean | Conditional | Whether to use the stream feature
|
httpEndPoint.url | String | Conditional | URL path to request to the backend server
|
requiredApiKey | String | Required | API key usage information |
requiredApiKey.required | Boolean | Required | Whether to use API key
|
validation | String | Required | Validity check information |
validation.type | String | Required | Validity check range
|
validation.headers | List<String> | Conditional | List of required headers subject to validity check
|
validation.queryStrings | List<String> | Conditional | List of required query strings subject to validity check
|
authentication | String | Required | Authentication information |
authentication.platform | String | Required | Set authentication method
|
authentication.authorizerId | String | Conditional | ID of the authorizer to use when using the authorizer as the authentication method |
Request example
The request example is as follows:
Response
This section describes the response format.
Response syntax
The response syntax is as follows:
Response status codes
For response status codes common to API Gateway, see API Gateway response status codes.
Response example
The response example is as follows:
Was this article helpful?