Overview
This feature allows you to call the features for creating, editing, and deleting traffic policies provided by Global Traffic Manager using the specified API.
You must use the authorized API key issued from the dashboard to make these calls.
Common Global Traffic Manager settings
The following describes commonly used request and response formats in Global Traffic Manager APIs.
Request
The following describes the common request format.
API URL
The request API URL is as follows:
https://globaltrafficmanager.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 |
Optional | Request data 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 |
|---|---|---|---|
result |
String | - | API call results
|
error |
Object | - | Error code and message
|
error.errorCode |
Integer | - | Error code |
error.message |
String | - | Error message |
error.devMessage |
String | - | Error message for developers |
error.moreInfo |
Object | - | Additional error information |
error.moreInfo.validationInfo |
Array | - | Validity check error information |
error.moreInfo.validationInfo.fieldPath |
String | - | Field path where validity check error occurred |
error.moreInfo.validationInfo.msg |
String | - | Validity check error message |
error.moreInfo.timestamp |
String | - | Error occurrence time |
Response status codes
Global Traffic Manager APIs use NAVER Cloud Platform's common response status codes. 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.
{
"result": "FAIL",
"error": {
"errorCode": "05X000",
"message": "Invalid value.<br>Hover your mouse over the displayed area to see the details in a tooltip.",
"devMessage": "Invalid value.",
"moreInfo": {
"validationInfo": [
{
"fieldPath": "monitor.hostHeader",
"msg": "hostHeader can't be entered unless the protocol is HTTP/HTTPS."
}
],
"timestamp": "2022-11-16T10:54:47.191+09:00"
}
}
}