You can set up Resource Watcher to make RESTful API calls to receive notifications of events and changes in the state of your resources.
To use the RESTful API, you must first obtain a User Access Key and Secret Access Key.
User Access Key and Secret Access Key can be issued in the API security settings.
In the drop-down menu that appears when you hover over your account in the upper-right corner of the console, select API security settings, and then click Create User Access Key ID.
For security purposes, it is recommended to create both a User Access Key and a Secret Access Key.
Appkey is required to use Restful API.
You can check the issued key information by clicking URL & Appkey on the right side of the console.
For all API requests, the HTTP response code is 200.
For detailed response results, see the header item in the Response Body.
Key | Type | Description |
---|---|---|
header | Header | [Response Header] |
Key | Type | Description |
---|---|---|
isSuccessful | boolean | Successful or not (true, false) |
resultCode | int | Response code. Returns 0 on success, error code on failure |
resultMessage | String | Response message. Returns "SUCCESS" on success, error message on failure |
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": "SUCCESS"
}
}
Basic Information
Method | URI |
---|---|
POST | /resource-watcher/v2.0/appkeys/{appKey}/event-alarms |
Permission |
---|
ResourceWatcher:Alarms.Create |
You can set up notifications for events that occur on your resources.
[Request Header]
Key | Value |
---|---|
X-TC-AUTHENTICATION-ID | User Access Key issued from the console |
X-TC-AUTHENTICATION-SECRET | Secret Access Key issued from the console |
[Path Variable]
Key | Value |
---|---|
appKey | Appkey issued from the console |
Key | Type | Required | Description |
---|---|---|---|
alarm | Alarm | Yes | Notification information |
alarmTargets | AlarmTarget[] | Yes | About Notifications Recipient |
events | Event[] | No | List of notification target events Unset if you want to be notified of all events as they occur. |
target | Target | No | Information on target resource Unset if you want to receive events regardless of resources. |
Key | Type | Required | Description |
---|---|---|---|
alarmName | String | Yes | Notification name Up to 255 characters can be registered |
description | String | No | Notification description Up to 1,000 characters can be registered |
Key | Type | Required | Description |
---|---|---|---|
alarmTargetTypeCode | String | Yes | Notification target type code Type 1. UUID: For a single organization member (NHN Cloud member, IAM member) 2. ROLE: Organization role, project role group, project role 3. ALARM_KEY: Organization notification recipient group, project notification recipient group 4. WEBHOOK: Webhook |
alarmTarget | String | No | Notification target information 1. UUID: Member UUID 2. ROLE: Role ID (e.g., ADMIN) 3. ALARM_KEY: Group ID to receive alerts 4. WEBHOOK: Not entered |
emailAlarm | String | No | Whether to receive emails 1. Y: Receive emails 2. N: Not receive emails WEBHOOK, ALARM_KEY is not entered. |
smsAlarm | String | No | Whether to receive SMS 1. Y: Receive SMS 2. N: Not receiving SMS WEBHOOK, ALARM_KEY is not entered. |
webhookUrl | String | No | Webhook URL address http:// Or https://로 to get started. Enter when setting the notification destination type WEBHOOK |
webhookSecret | String | No | Webhook secret key Enter when setting the notification destination type WEBHOOK |
Key | Type | Required | Description |
---|---|---|---|
productId | String | Yes | Service ID |
eventId | String | Yes | Event ID |
For the productId and eventId values, see API Guide > 3.1 Event list lookup API response values.
Key | Type | Required | Description |
---|---|---|---|
resourceGroupIds | String[] | No | List of resource group IDs |
resourceTagIds | Long[] | No | List of resource tag IDs |
{
"alarm": {
"alarmName": "",
"description": ""
},
"alarmTargets": [
{
"alarmTarget": "",
"alarmTargetTypeCode": "",
"emailAlarm": "",
"smsAlarm": "",
"webhookSecret": "",
"webhookUrl": ""
}
],
"events": [
{
"eventId": "",
"productId": ""
}
],
"target": {
"resourceGroupIds": [
""
],
"resourceTagIds": [
""
]
}
}
[Response Body]
Basic Information
Method | URI |
---|---|
GET | /resource-watcher/v2.0/appkeys/{appKey}/event-alarms/{alarmId} |
Permission |
---|
ResourceWatcher:Alarms.Get |
Retrieves registered notifications.
[Request Header]
Key | Value |
---|---|
X-TC-AUTHENTICATION-ID | User Access Key issued from the console |
X-TC-AUTHENTICATION-SECRET | Secret Access Key issued from the console |
[Path Variable]
Key | Value |
---|---|
appKey | Appkey issued from the console |
alarmId | ID of the notification to look up |
[Response Body]
Key | Type | Description |
---|---|---|
alarm | Alarm | Notification information |
alarmTargetAlarmKeys | AlarmTargetAlarmKey[] | List of ALARM_KEY information to receive notifications for |
alarmTargetMemberProfiles | AlarmTargetMemberProfile[] | List of UUID information to receive notifications |
alarmTargetRoles | AlarmTargetRole[] | List of ROLEs to receive notifications |
alarmTargets | AlarmTarget[] | Notification recipient list |
events | Event[] | Notification event list |
target | Target | Information on target resource |
Key | Type | Description |
---|---|---|
alarmId | String | Notification ID |
alarmName | String | Notification name |
alarmRule | AlarmRule | Notification rule details |
alarmStatusCode | String | Notification status codes Type 1. STABLE: Enable 2. DISABLED: Disabled 3. CLOSED: Delete |
appKey | String | About Appkey |
cabAlarmKey | String | Group ID to receive notifications |
delDatetime | Date | Date and time of deletion |
description | String | Notification description |
modDatetime | Date | Modification date |
operatorUuid | String | Last Modified User UUID |
regDatetime | Date | Registered date and time |
Key | Type | Description |
---|---|---|
alarmRuleId | String | Notification rule ID |
alarmRuleStatusCode | String | Notification rule status codes Type 1. STABLE: Enable 2. DISABLED: Disabled 3. CLOSED: Delete |
alarmRuleName | String | Notification rule name |
alarmRuleDescription | String | Notification rule descriptions |
resourceTypes | String[] | List of target resource type codes that the alert rule applies to An empty value targets the entire resource type List of String types |
Key | Type | Description |
---|---|---|
alarmKey | String | Notification keys |
alarmGroupName | String | Group name to receive notifications |
alarmGroupDesc | String | Notification receiver group descriptions |
Key | Type | Description |
---|---|---|
UUID | String | Member UUID |
memberType | String | Separate members Type 1. TOAST_CLOUD 2. IAM |
name | String | Member name |
corporationName | String | Business name |
String | Member email | |
userId | String | Member ID |
Key | Type | Description |
---|---|---|
String | String | Role type |
roleId | String | Role ID |
roleName | String | Role name |
description | String | Role descriptions |
Key | Type | Description |
---|---|---|
alarmTargetTypeCode | String | Notification target type code Type 1. UUID: For a single organization member (NHN Cloud member, IAM member) 2. ROLE: Organization role, project role group, project role 3. ALARM_KEY: Organization notification recipient group, project notification recipient group 4. WEBHOOK: Webhook |
alarmTarget | String | Notification target information |
emailAlarm | String | Whether to receive emails (Y, N) |
smsAlarm | string | Whether SMS is received (Y, N) |
webhookUrl | string | Webhook URL address |
webhookSecret | string | Webhook secret key |
Key | Type | Description |
---|---|---|
productId | String | Product ID |
eventId | String | Event ID |
Key | Type | Description |
---|---|---|
resourceGroups | ResourceGroup[] | Resource Group List |
resourceTags | ResourceTag[] | Resource Tag List |
Key | Type | Description |
---|---|---|
resourceGroupId | String | List of resource group IDs |
resourceGroupName | String | List of resource tag IDs |
Key | Type | Description |
---|---|---|
tagId | Long | Resource Tag ID |
tagGroupId | Long | Resource tag group ID |
tagName | String | Resource tag name |
resourceTagTypeCode | String | Resource tag type code (DEFAULT, NORMAL) |
regDatetime | Date | Resource tag registration date |
modDatetime | Date | Resource tag modification date |
resourceTagGroup | ResourceTagGroup | Resource Tag Groups |
Key | Type | Description |
---|---|---|
tagGroupId | Long | Resource tag group ID |
tagGroupKey | String | Resource tag key |
appKey | String | Appkey |
creationTypeCode | String | Creation type (USER, SYSTEM) |
regDatetime | Date | Resource tag group registration date |
modDatetime | Date | Resource tag group modification date |
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": ""
},
"alarm": {
"alarmId": "",
"alarmName": "",
"alarmRule": {
"alarmRuleDescription": "",
"alarmRuleId": "",
"alarmRuleName": "",
"alarmRuleStatusCode": "",
"resourceTypes": [
""
]
},
"alarmStatusCode": "",
"appKey": "",
"cabAlarmKey": "",
"delDatetime": "yyyy-MM-ddTHH:mm:SS",
"description": "",
"modDatetime": "yyyy-MM-ddTHH:mm:SS",
"operatorUuid": "",
"regDatetime": "yyyy-MM-ddTHH:mm:SS"
},
"alarmTargetAlarmKeys": [
{
"alarmGroupDesc": "",
"alarmGroupName": "",
"alarmKey": ""
}
],
"alarmTargetMemberProfiles": [
{
"corporationName": "",
"email": "",
"memberType": "",
"name": "",
"userId": "",
"uuid": ""
}
],
"alarmTargetRoles": [
{
"description": "",
"roleId": "",
"roleName": "",
"type": ""
}
],
"alarmTargets": [
{
"alarmTarget": "",
"alarmTargetTypeCode": "",
"emailAlarm": "",
"smsAlarm": "",
"webhookSecret": "",
"webhookUrl": ""
}
],
"events": [
{
"eventId": "",
"productId": ""
}
],
"target": {
"resourceGroups": [
{
"resourceGroupId": "",
"resourceGroupName": ""
}
],
"resourceTags": [
{
"tagId": 0,
"tagGroupId" : 0,
"tagName": "",
"resourceTagTypeCode" : "",
"regDatetime": "yyyy-MM-ddTHH:mm:SS",
"modDatetime": "yyyy-MM-ddTHH:mm:SS",
"resourceTagGroup" : {
"tagGroupId": 0,
"tagGroupKey": "",
"appKey": "",
"creationTypeCode": "",
"regDatetime": "yyyy-MM-ddTHH:mm:SS",
"modDatetime": "yyyy-MM-ddTHH:mm:SS"
}
}
]
}
}
Basic Information
Method | URI |
---|---|
POST | /resource-watcher/v2.0/appkeys/{appKey}/event-alarms/search |
Permission |
---|
ResourceWatcher:Alarms.List |
Get a list of event notifications you've signed up for. - You can include search criteria in your request to get the list of notifications you want. - Supports paging.
[Request Header]
Key | Value |
---|---|
X-TC-AUTHENTICATION-ID | User Access Key issued from the console |
X-TC-AUTHENTICATION-SECRET | Secret Access Key issued from the console |
[Path Variable]
Key | Value |
---|---|
appKey | Appkey issued from the console |
[Query Parameter]
Key | Value | Required |
---|---|---|
page | Page number to search Default value: 0 |
No |
size | Number of notifications to view Default value: 10 |
No |
sort | What and how to sort Default values: modDatetime, DESC |
No |
[Request Body]
Key | Type | Required | Description |
---|---|---|---|
alarmIds | String[] | No | List of notification IDs List of String types |
alarmNameAnyLike | String | No | Alert name (retrieves all alerts that contain the input value) |
alarmRuleIds | String[] | No | List of alert rule IDs List of String types |
alarmStatusCodes | String[] | No | Notification status List of String types Default values: STABLE, DISABLED Type 1. STABLE: Enable 2. DISABLED: Disabled 3. CLOSED: Delete |
descriptionAnyLike | String | No | Alert descriptions (retrieve all alerts that contain the input value) |
modDateFrom | Date | No | Start last modification pause |
modDateTo | Date | No | End last modified pause |
operatorUuids | String[] | No | List of last modifier UUIDs List of String types |
resourceGroupIds | String[] | No | Resource Group List List of String types |
{
"alarmIds": [
""
],
"alarmNameAnyLike": "",
"alarmRuleIds": [
""
],
"alarmStatusCodes": [
""
],
"descriptionAnyLike": "",
"modDateFrom": "yyyy-MM-ddTHH:mm:SS",
"modDateTo": "yyyy-MM-ddTHH:mm:SS",
"operatorUuids": [
""
],
"resourceGroupIds": [
""
]
}
[Response Body]
Key | Type | Description |
---|---|---|
alarms | Alarm | Notifications list |
totalItems | Long | Total number |
Key | Type | Description |
---|---|---|
alarmId | String | Notification ID |
alarmName | String | Notification name |
alarmRule | AlarmRule | Notification rule details |
alarmStatusCode | String | Notification status codes Type 1. STABLE: Enable 2. DISABLED: Disabled 3. CLOSED: Delete |
appKey | String | About Appkey |
cabAlarmKey | String | Group ID to receive notifications |
description | String | Notification description |
operatorUuid | String | Last Modified User UUID |
delDatetime | Date | Date and time of deletion |
modDatetime | Date | Modification date |
regDatetime | Date | Registered date and time |
Key | Type | Description |
---|---|---|
alarmRuleId | String | Notification rule ID |
alarmRuleStatusCode | String | Notification rule status codes Type 1. STABLE: Enable 2. DISABLED: Disabled 3. CLOSED: Delete |
alarmRuleName | String | Notification rule name |
alarmRuleDescription | String | Notification rule descriptions |
resourceTypes | String[] | List of target resource type codes that the alert rule applies to An empty value targets the entire resource type List of String types |
{
"header": {
"isSuccessful": true,
"resultCode": 0,
"resultMessage": ""
},
"alarms": [
{
"alarmId": "",
"alarmName": "",
"alarmRule": {
"alarmRuleDescription": "",
"alarmRuleId": "",
"alarmRuleName": "",
"alarmRuleStatusCode": "",
"resourceTypes": [
""
]
},
"alarmStatusCode": "",
"appKey": "",
"cabAlarmKey": "",
"delDatetime": "yyyy-MM-ddTHH:mm:SS",
"description": "",
"modDatetime": "yyyy-MM-ddTHH:mm:SS",
"operatorUuid": "",
"regDatetime": "yyyy-MM-ddTHH:mm:SS"
}
],
"totalItems": 0
}
Basic Information
Method | URI |
---|---|
PUT | /resource-watcher/v1.0/appkeys/{appKey}/event-alarms/{alarmId} |
Permission |
---|
ResourceWatcher:Alarms.Update |
Edit a registered alert. - Since we're changing everything you requested, we need to transfer the existing setting values for the ones that don't change.
[Request Header]
Key | Value |
---|---|
X-TC-AUTHENTICATION-ID | User Access Key issued from the console |
X-TC-AUTHENTICATION-SECRET | Secret Access Key issued from the console |
[Path Variable]
Key | Value |
---|---|
appKey | Appkey issued from the console |
alarmId | ID of the alert to modify |
[Request Body]
Basic Information
Method | URI |
---|---|
DELETE | /resource-watcher/v2.0/appkeys/{appKey}/event-alarms/{alarmId} |
Permission |
---|
ResourceWatcher:Alarms.Delete |
Delete a registered alert.
[Request Header]
Key | Value |
---|---|
X-TC-AUTHENTICATION-ID | User Access Key issued from the console |
X-TC-AUTHENTICATION-SECRET | Secret Access Key issued from the console |
[Path Variable]
Key | Value |
---|---|
appKey | Appkey issued from the console |
alarmId | ID of the notification to delete |
[Response Body]
Basic Information
Method | URI |
---|---|
DELETE | /resource-watcher/v2.0/appkeys/{appKey}/event-alarms |
Permission |
---|
ResourceWatcher:Alarms.Delete |
Delete multiple registered alerts.
[Request Header]
Key | Value |
---|---|
X-TC-AUTHENTICATION-ID | User Access Key issued from the console |
X-TC-AUTHENTICATION-SECRET | Secret Access Key issued from the console |
[Path Variable]
Key | Value |
---|---|
appKey | Appkey issued from the console |
[Query Parameter]재
Key | Value | Required |
---|---|---|
alarmIds | List of notification IDs to delete You must enter at least one value. |
Yes |
[Response Body]