Available in Classic and VPC
API Gateway is a NAVER Cloud Platform service that allows you to conveniently manage all tasks related to API calls. The API Gateway service provides APIs for various management features designed to ensure stable API operation, as well as a dashboard that lets you monitor usage statistics in real time, all in a RESTful format.
Common API Gateway settings
The following describes commonly used request and response formats in API Gateway APIs.
Request
The following describes the common request format.
API URL
The request API URL is as follows:
https://apigateway.apigw.ntruss.com
Request headers
The following describes the request headers.
| Field | Required | Description |
|---|---|---|
x-ncp-apigw-timestamp |
Required | This is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC.
|
x-ncp-iam-access-key |
Required | Access key issued on NAVER Cloud Platform
|
x-ncp-apigw-signature-v2 |
Required | Base64-encoded signature that encrypts the request information with a secret key that maps to the access key issued on NAVER Cloud Platform, using the HMAC encryption algorithm (HmacSHA256).
|
Content-Type |
Required | Set the Content-Type of the request body to application/json.
|
Response
The following describes the common response format.
Response body
The response body includes the following data:
error
error defines the API call failure information. The following describes error.
| Field | Type | Required | Description |
|---|---|---|---|
errorCode |
String | Required | Error code |
message |
String | Required | Error message |
details |
String | Optional | Error details |
Response status codes
The following describes the response status codes.
| HTTP status code | Code | Message | Description |
|---|---|---|---|
| 200 | - | OK | Request succeeded |
| 201 | - | Created | A new resource is created as a result of the request. |
| 202 | - | Accepted | The request has been accepted but not yet completed. |
| 204 | - | No Content | The request succeeded, but no response content |
| 400 | 100 | Bad Request Exception | Request error due to HTTPS protocol or UTF-8 encoding. |
| 401 | 200 | Authentication Failed | Authentication information to use the requested resource was not provided or is invalid. |
| 401 | 210 | Permission Denied | No permissions to the requested resource |
| 403 | 230 | Forbidden | No permissions to the requested resource |
| 404 | 300 | Not Found Exception | Requested resource not found. |
| 429 | 400 | Quota Exceeded | API usage limit (quota) exceeded. |
| 429 | 410 | Throttle Limited | API request rate exceeded |
| 429 | 420 | Rate Limited | API request rate exceeded |
| 413 | 430 | Request Entity Too Large | Request body size exceeds the limit the server can handle. |
| 415 | 440 | Unsupported Media Type | Unsupported media type |
| 503 | 500 | Endpoint Error | Endpoint connection error |
| 504 | 510 | Endpoint Timeout | Endpoint connection time limit exceeded |
| 503 | 520 | Unknown Endpoint Domain | Endpoint not recognized or not set up |
| 503 | 530 | Connection Closed By Endpoint | Disconnection from the endpoint |
| 500 | 900 | Unexpected Error | Failed to process request due to unexpected circumstances. |
For information about the HTTP status codes common to NAVER Cloud Platform, see Ncloud API response status codes.
Response example
For response examples when a call is successful, see each API specification. The following is a sample response upon a failed call.
{
"error": {
"errorCode": "200",
"message": "Authentication Failed",
"details": "Invalid authentication information."
}
}
API Gateway API
The following describes the APIs provided by the API Gateway service.
| Type | Description |
|---|---|
| API | Create, view, edit, delete, deploy, publish, and import Swagger for APIs. |
| API Key | Create, view, edit, delete, regenerate, and subscribe to a product for API keys. |
| Authorizer | Create, view, edit, delete, and test authorizers for use as authentication methods. |
| Canary Test | Enable, disable, edit, promote, and export documentation/SDK for Canary. |
| Dashboard API Key | Get dashboard data, APIs, and products by API key, and export to Excel. |
| Dashboard Event | Get API event history. |
| Dashboard Product | Get dashboard data, APIs, and products by product, and export to Excel. |
| Document | Get and edit API documentation deployed to a stage. |
| Export | Export deployed APIs in Swagger, OpenAPI, and Java SDK formats. |
| Gateway Response | Get gateway responses, add status codes, and reset. |
| Gateway Response Header | Add or delete custom headers to gateway responses. |
| Gateway Response Template | Add, edit, or delete mapping templates for gateway response bodies. |
| Method | Add, view, edit, or delete methods for a resource, and configure consumer/producer settings. |
| Method Request Body | Save, view, and delete method request bodies. |
| Method Request Parameter | Add, view, and delete method request parameters (headers, query strings). |
| Method Response | Add, view, edit, and delete method response status codes. |
| Method Response Body | Save, view, and delete method response bodies. |
| Method Response Header | Add, view, and delete method response headers. |
| Model | Add, view, edit, delete, and preview request/response body models. |
| Product | Create, view, edit, and delete products. |
| Published Product | Get products and API documentation published across the entire account. |
| Resource | Create, view, edit, delete API resources, and import Swagger. |
| Stage | Create, view, edit, delete, deploy, link to a usage plan, and clear cache for a stage. |
| Stage Deployment | Get the deployment history and published documentation for a stage. |
| Stage Resource | Get and overwrite method settings for a stage. |
| Usage Plan | Create, view, update, delete, and view linked stages for a usage plan. |
API Gateway related resources
NAVER Cloud Platform provides a variety of related resources to help users better understand API Gateway APIs.
- API Gateway API guides
- Create signature: How to create a signature to add to the request header
- Sub Account User Guides: How to issue the access key to be added to the request header
- Common Ncloud response status codes: Information on common response status codes of NAVER Cloud Platform used by the API Gateway service
- How to use the API Gateway service
- API Gateway user guide: How to use API Gateway in the NAVER Cloud Platform console
- Ncloud user environment guide: Explore VPC and Classic environments and supported services.
- Pricing and features: View pricing details and key capabilities.
- Latest announcements: Stay informed about the API Gateway service updates and news.
- FAQs: Get answers to common API Gateway questions.
- Contact Support: Get help if you can't find what you need in the API guide.