Site Monitor
Site Monitor Task Configuration Related APIs
HTTP(S) Task Related API
HTTP(S) Task Creation
- method:POST
- URL:/csm/api/v1/userId/{userId}/site/http/create
/csm/api/v1/userId/{userId}/site/https/create
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| httpTask | HttpTask | HTTP Task Information | Yes | Query Parameters |
HttpTask
| Name | Types | Description | Required or not |
|---|---|---|---|
| taskName | String | Task name | Yes |
| address | String | Monitor URL | Yes |
| method | String | Request Type (get/post) | Yes |
| postContent | String | Send Content | No |
| cycle | Integer | Detection Period | Yes |
| idc | String | Probe Points, separated by commas | Yes |
| timeout | int | Timeout Setting, in seconds | Yes |
| advanceConfig | Boolean | Whether to enable advanced configuration | Yes |
| ipType | String | Protocol Type (IPv4/IPv6) | Yes |
| agentCount | int | Uniformly set the count of probe points per provincial operator (1-5) | Yes |
When advanceConfig is true, the following parameters must be included
| Name | Types | Description | Required or not |
|---|---|---|---|
| cookies | String | Request Cookie | No |
| host | String | Request Host | No |
| userAgent | String | Request UserAgent | No |
| responseCode | String | Expected Response Code | No |
| responseCheck | String | Expected Response Body | No |
| userName | String | Username | No |
| password | String | Password | No |
Request example
1POST /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/http/create
2request body:
3{
4 "userId": "453bf9588c9e488f9ba2c984129090dc",
5 "taskName": "bb2_fpm",
6 "address": "baidu.com",
7 "method": "get",
8 "postContent": "",
9 "advanceConfig": false,
10 "cycle": 300,
11 "idc": "shaanxi-CMNET,heilongjiang-CMNET,liaoning-CMNET,jilin-CMNET,henan-CMNET",
12 "timeout": 10,
13 "ipType": "ipv4",
14 "agentCount": 2
15}
Response example
1{
2 "taskId": "BbjmjhalUMMeFXfZTUccWWEHchuMbewY",
3 "jobId": "229e2dd7-2f24-43d8-84fa-bce997fefb02"
4}
HTTP(S) Task Update
- method:PUT
- URL:/csm/api/v1/userId/{userId}/site/http/update
/csm/api/v1/userId/{userId}/site/https/update
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| httpTask | HttpTask | HTTP Task Information | Yes | Query Parameters |
HttpTask
| Name | Types | Description | Required or not |
|---|---|---|---|
| taskName | String | Task name | Yes |
| taskId | String | Unique Task ID | Yes |
| address | String | Monitor URL | Yes |
| method | String | Request Type (get/post) | Yes |
| postContent | String | Send Content | No |
| cycle | Integer | Detection Period | Yes |
| idc | String | Probe Points, separated by commas | Yes |
| timeout | int | Timeout Setting, in seconds | Yes |
| advanceConfig | Boolean | Whether Advanced | Yes |
| ipType | String | Protocol Type (IPv4/IPv6) | Yes |
| agentCount | int | Uniformly set the count of probe points per provincial operator (1-5) | Yes |
When advanceConfig is true, the following parameters must be included
| Name | Types | Description | Required or not |
|---|---|---|---|
| cookies | String | Request Cookie | No |
| host | String | Request Host | No |
| userAgent | String | Request UserAgent | No |
| responseCode | String | Expected Response Code | No |
| responseCheck | String | Expected Response Body | No |
| userName | String | Username | No |
| password | String | Password | No |
Request example
1PUT /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/http/update
2request body:
3{
4 "taskId": "evsjafcgXzRfBpfJAlkKlgSXCkRbYVfx",
5 "userId": "453bf9588c9e488f9ba2c984129090dc",
6 "taskName": "bb_fpm",
7 "address": "baidu.com",
8 "method": "get",
9 "postContent": "",
10 "advanceConfig": false,
11 "cycle": 600,
12 "idc": "heilongjiang-CMNET,liaoning-CMNET,henan-CMNET",
13 "timeout": 50,
14 "ipType": "ipv4",
15 "agentCount": 2
16}
Response example
1{
2 "taskId": "evsjafcgXzRfBpfJAlkKlgSXCkRbYVfx",
3 "jobId": "fafe236d-d94a-4425-911e-253cce2a19e8"
4}
HTTP(S) Task Details
- method:GET
- URL:/csm/api/v1/userId/{userId}/site/http/detail
/csm/api/v1/userId/{userId}/site/https/detail
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| taskId | String | Task ID | Yes | Request Parameters |
Request example
1GET /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/http/detail?
2taskId=BbjmjhalUMMeFXfZTUccWWEHchuMbewY
Response example
1{
2 "scope": "BCM_SITE",
3 "taskName": "bb2_fpm",
4 "address": "http://baidu.com",
5 "type": "http",
6 "cycle": 300,
7 "idc": "shaanxi-CMNET,heilongjiang-CMNET,liaoning-CMNET,jilin-CMNET,henan-CMNET",
8 "idcObjs": [
9 {
10 "id": "shaanxi-CMNET",
11 "name": "Shaanxi Mobile"
12 },
13 {
14 "id": "heilongjiang-CMNET",
15 "name": "Heilongjiang Mobile"
16 },
17 {
18 "id": "liaoning-CMNET",
19 "name": "Liaoning Mobile"
20 },
21 {
22 "id": "jilin-CMNET",
23 "name": "Jilin Mobile"
24 },
25 {
26 "id": "henan-CMNET",
27 "name": "Henan Mobile"
28 }
29 ],
30 "timeout": 10,
31 "advanceConfig": false,
32 "method": "get",
33 "postContent": "",
34 "responseCode": "200",
35 "responseCheck": "",
36 "userName": "",
37 "password": "",
38 "ipType": "ipv4",
39 "agentCount": 2,
40 "agentTotalCount": 10
41}
Ping Task Related APIs
Ping Task Creation
- method:POST
- URL:/csm/api/v1/userId/{userId}/site/ping/create
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| pingTask | PingTask | Ping Task Configuration | Yes | Query Parameters |
PingTask
| Name | Types | Description | Required or not |
|---|---|---|---|
| taskName | String | Task name | Yes |
| address | String | Monitor URL | Yes |
| packetCount | int | Number of Packets Sent | No |
| packetLossRate | int | Packet Loss Rate | No |
| cycle | Integer | Detection Period | Yes |
| idc | String | Probe Points, separated by commas | Yes |
| timeout | int | Timeout Setting, in seconds | Yes |
| ipType | String | Protocol Type (IPv4/IPv6) | Yes |
| agentCount | int | Uniformly set the count of probe points per provincial operator (1-5) | Yes |
Request example
1POST /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/ping/create
2request body:
3{
4 "userId": "453bf9588c9e488f9ba2c984129090dc",
5 "taskName": "bb2_ping",
6 "address": "www.baidu.com",
7 "packetCount": 1,
8 "packetLossRate": 5,
9 "cycle": 300,
10 "idc": "shaanxi-CMNET,heilongjiang-CMNET,liaoning-CMNET,jilin-CMNET,henan-CMNET",
11 "timeout": 300,
12 "ipType": "ipv4",
13 "agentCount": 2
14}
Response example
1{
2 "taskId": "YARlqqyiivVTUbHXTLQcIpFaLyGSXkKU",
3 "jobId": "179a7408-297b-4a1e-9a51-c733267edc29"
4}
Ping Task Update
- method:PUT
- URL:/csm/api/v1/userId/{userId}/site/ping/update
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| pingTask | PingTask | Ping Task Configuration | Yes | Query Parameters |
PingTask
| Name | Types | Description | Required or not |
|---|---|---|---|
| taskName | String | Task name | Yes |
| taskId | String | Task Unique Identifier | Yes |
| address | String | Monitor URL | Yes |
| packetCount | int | Number of Packets Sent | No |
| packetLossRate | int | Packet Loss Rate | No |
| cycle | Integer | Detection Period | Yes |
| idc | String | Probe Points, separated by commas | Yes |
| timeout | int | Timeout Setting, in seconds | Yes |
| ipType | String | Protocol Type (IPv4/IPv6) | Yes |
| agentCount | int | Uniformly set the count of probe points per provincial operator (1-5) | Yes |
Request example
1PUT /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/ping/update
2requestbody:
3{
4 "taskId": "OHroEJHEfVuniTNrIUifzAPGYOuawAdW",
5 "userId": "453bf9588c9e488f9ba2c984129090dc",
6 "taskName": "bb_ping",
7 "address": "www.baidu.com",
8 "packetCount": 1,
9 "packetLossRate": 6,
10 "cycle": 300,
11 "idc": "shaanxi-CMNET,heilongjiang-CMNET,liaoning-CMNET,liaoning-UNICOM,jilin-UNICOM",
12 "timeout": 10,
13 "ipType": "ipv4",
14 "agentCount": 2
15}
Response example
1{
2 "taskId": "OHroEJHEfVuniTNrIUifzAPGYOuawAdW",
3 "jobId": "539eb344-d4c1-4d60-a8ba-69980dee2d0e"
4}
Ping Task Details
- method:GET
- URL:/csm/api/v1/userId/{userId}/site/ping/detail
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| taskId | String | Task ID | Yes | Request Parameters |
Request example
1GET /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/ping/detail?
2taskId=OHroEJHEfVuniTNrIUifzAPGYOuawAdW
Response example
1{
2 "scope": "BCM_SITE",
3 "taskName": "bb_ping",
4 "address": "www.baidu.com",
5 "type": "ping",
6 "cycle": 300,
7 "idc": "shaanxi-CMNET,heilongjiang-CMNET,liaoning-CMNET,liaoning-UNICOM,jilin-UNICOM",
8 "idcObjs": [
9 {
10 "id": "shaanxi-CMNET",
11 "name": "Shaanxi Mobile"
12 },
13 {
14 "id": "heilongjiang-CMNET",
15 "name": "Heilongjiang Mobile"
16 },
17 {
18 "id": "liaoning-CMNET",
19 "name": "Liaoning Mobile"
20 },
21 {
22 "id": "liaoning-UNICOM",
23 "name": "Liaoning Unicom"
24 },
25 {
26 "id": "jilin-UNICOM",
27 "name": "Jilin Unicom"
28 }
29 ],
30 "timeout": 10,
31 "packetCount": 1,
32 "packetLossRate": 6,
33 "ipType": "ipv4",
34 "agentCount": 2,
35 "agentTotalCount": 10
36}
TCP Task Related APIs
TCP Task Creation
- method:POST
- URL:/csm/api/v1/userId/{userId}/site/tcp/create
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| tcpTask | TcpTask | TCP Task Configuration | Yes | Query Parameters |
TcpTask
| Name | Types | Description | Required or not |
|---|---|---|---|
| taskName | String | Task name | Yes |
| address | String | Monitor URL | Yes |
| cycle | Integer | Detection Period | Yes |
| idc | String | Probe Points, separated by commas | Yes |
| timeout | int | Timeout Setting, in seconds (TCP supports timeout range [1,10]) | Yes |
| advanceConfig | Boolean | Whether Advanced | Yes |
| port | int | Port No. | Yes |
| inputType | int | Input Type (1: Text 2: Hexadecimal Format 0: None) | Yes |
| outputType | int | Output Type (1: Text 2: Hexadecimal Format 0: None) | Yes |
| input | String | Request content | No |
| expectedOutput | String | Expected Output | No |
| ipType | String | Protocol Type (IPv4/IPv6) | Yes |
| agentCount | int | Uniformly set the count of probe points per provincial operator (1-5) | Yes |
Request example
1POST /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/tcp/create
2{
3 "userId": "453bf9588c9e488f9ba2c984129090dc",
4 "taskName": "bb2_tcp",
5 "address": "www.taobao.com",
6 "port": 80,
7 "advanceConfig": false,
8 "inputType": 0,
9 "input": "",
10 "outputType": 0,
11 "expectedOutput": "",
12 "cycle": 300,
13 "idc": "shaanxi-CMNET,heilongjiang-CMNET,liaoning-CMNET,liaoning-UNICOM,shanghai-UNICOM",
14 "timeout": 5,
15 "ipType": "ipv4",
16 "agentCount": 2
17}
Response example
1{
2 "taskId": "qztvcDiQydeiPmLgFNmpHrpuBNsRSvyU",
3 "jobId": "771291b7-2d83-42c7-966a-d3a7250fa93f"
4}
TCP Task Update
- method:PUT
- URL:/csm/api/v1/userId/{userId}/site/tcp/update
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| tcpTask | TcpTask | TCP Task Configuration | Yes | Query Parameters |
TcpTask
| Name | Types | Description | Required or not |
|---|---|---|---|
| taskName | String | Task name | Yes |
| taskId | String | Unique Task ID | Yes |
| address | String | Monitor URL | Yes |
| cycle | Integer | Detection Period | Yes |
| idc | String | Probe Points, separated by commas | Yes |
| timeout | int | Timeout Setting, in seconds (TCP supports timeout range [1,10]) | Yes |
| advanceConfig | Boolean | Whether Advanced | Yes |
| port | int | Port No. | Yes |
| inputType | int | Input Type (1: Text 2: Hexadecimal Format 0: None) | Yes |
| outputType | int | Output Type (1: Text 2: Hexadecimal Format 0: None) | Yes |
| input | String | Request content | No |
| expectedOutput | String | Expected Output | No |
| ipType | String | Protocol Type (IPv4/IPv6) | Yes |
| agentCount | int | Uniformly set the count of probe points per provincial operator (1-5) | Yes |
Request example
1PUT /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/tcp/update
2requestbody:
3{
4 "taskId": "zdBBpHOftpxxdPxwKLZHobmFQyMlHoIK",
5 "userId": "453bf9588c9e488f9ba2c984129090dc",
6 "taskName": "bb_tcp",
7 "address": "www.taobao.com",
8 "port": 80,
9 "advanceConfig": false,
10 "inputType": 0,
11 "input": "",
12 "outputType": 0,
13 "expectedOutput": "",
14 "cycle": 600,
15 "idc": "shaanxi-CMNET,heilongjiang-CMNET,liaoning-CMNET,liaoning-UNICOM,shanghai-UNICOM",
16 "timeout": 5,
17 "ipType": "ipv4",
18 "agentCount": 2
19}
Response example
1{
2 "taskId": "zdBBpHOftpxxdPxwKLZHobmFQyMlHoIK",
3 "jobId": "7dfc6342-fb4d-4644-98b2-7401b79983e6"
4}
TCP task details
- method:GET
- URL:/csm/api/v1/userId/{userId}/site/tcp/detail
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| taskId | String | Task ID | Yes | Request Parameters |
Request example
1GET /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/tcp/detail?
2taskId=zdBBpHOftpxxdPxwKLZHobmFQyMlHoIK
Response example
1{
2 "scope": "BCM_SITE",
3 "taskName": "bb_tcp",
4 "address": "www.taobao.com",
5 "type": "tcp",
6 "cycle": 600,
7 "idc": "shaanxi-CMNET,heilongjiang-CMNET,liaoning-CMNET,liaoning-UNICOM,shanghai-UNICOM",
8 "idcObjs": [
9 {
10 "id": "shaanxi-CMNET",
11 "name": "Shaanxi Mobile"
12 },
13 {
14 "id": "heilongjiang-CMNET",
15 "name": "Heilongjiang Mobile"
16 },
17 {
18 "id": "liaoning-CMNET",
19 "name": "Liaoning Mobile"
20 },
21 {
22 "id": "liaoning-UNICOM",
23 "name": "Liaoning Unicom"
24 },
25 {
26 "id": "shanghai-UNICOM",
27 "name": "Shanghai Unicom"
28 }
29 ],
30 "timeout": 5,
31 "advanceConfig": false,
32 "port": 80,
33 "inputType": 0,
34 "outputType": 0,
35 "input": "",
36 "expectedOutput": "",
37 "ipType": "ipv4",
38 "agentCount": 2,
39 "agentTotalCount": 10
40}
UDP Task Related APIs
UDP Task Creation
- method:POST
- URL:/csm/api/v1/userId/{userId}/site/udp/create
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| udpTask | UdpTask | UDP Task Configuration | Yes | Query Parameters |
UdpTask
| Name | Types | Description | Required or not |
|---|---|---|---|
| taskName | String | Task name | Yes |
| address | String | Monitor URL | Yes |
| cycle | Integer | Detection Period | Yes |
| idc | String | Probe Points, separated by commas | Yes |
| timeout | int | Timeout Setting, in seconds | Yes |
| advanceConfig | Boolean | Whether Advanced | Yes |
| port | int | Port No. | Yes |
| inputType | int | Input Type (1: Text 2: Hexadecimal Format 0: None) | Yes |
| outputType | int | Output Type (1: Text 2: Hexadecimal Format 0: None) | Yes |
| input | String | Request content | No |
| expectedOutput | String | Expected Output | No |
| ipType | String | Protocol Type (IPv4/IPv6) | Yes |
| agentCount | int | Uniformly set the count of probe points per provincial operator (1-5) | Yes |
Request example
1POST /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/udp/create
2requestbody:{
3 "userId": "453bf9588c9e488f9ba2c984129090dc",
4 "taskName": "bb2_udp",
5 "address": "www.taobao.com",
6 "port": 80,
7 "inputType": 0,
8 "input": "",
9 "outputType": 0,
10 "expectedOutput": "",
11 "cycle": 300,
12 "idc": "shanghai-CHINANET,shanghai-UNICOM,jiangsu-UNICOM,chongqing-UNICOM,beijing-UNICOM",
13 "timeout": 200,
14 "ipType": "ipv4",
15 "agentCount": 2
16}
Response example
1{
2 "taskId": "aMpuQakYljfaFgwXTABOPTcZdycGCeVk",
3 "jobId": "e0718dda-dfe5-4392-97d2-58580dbf13e0"
4}
UDP Task Update
- method:PUT
- URL:/csm/api/v1/userId/{userId}}/site/udp/update
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| udpTask | UdpTask | UDP Task Configuration | Yes | Query Parameters |
UdpTask
| Name | Types | Description | Required or not |
|---|---|---|---|
| taskName | String | Task name | Yes |
| taskId | String | Unique Task ID | Yes |
| address | String | Monitor URL | Yes |
| cycle | Integer | Detection Period | Yes |
| idc | String | Probe Points, separated by commas | Yes |
| timeout | int | Timeout Setting, in seconds | Yes |
| advanceConfig | Boolean | Whether Advanced | Yes |
| port | int | Port No. | Yes |
| inputType | int | Input Type (1: Text 2: Hexadecimal Format 0: None) | Yes |
| outputType | int | Output Type (1: Text 2: Hexadecimal Format 0: None) | Yes |
| input | String | Request content | No |
| expectedOutput | String | Expected Output | No |
| ipType | String | Protocol Type (IPv4/IPv6) | Yes |
| agentCount | int | Uniformly set the count of probe points per provincial operator (1-5) | Yes |
Request example
1PUT /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/udp/update
2requestbody:
3{
4 "taskId": "aMpuQakYljfaFgwXTABOPTcZdycGCeVk",
5 "userId": "453bf9588c9e488f9ba2c984129090dc",
6 "taskName": "bb2_udp",
7 "address": "www.taobao.com",
8 "port": 8081,
9 "inputType": 0,
10 "input": "",
11 "outputType": 0,
12 "expectedOutput": "",
13 "cycle": 600,
14 "idc": "shanghai-UNICOM,jiangsu-UNICOM,chongqing-UNICOM,beijing-UNICOM,ningxia-CMNET",
15 "timeout": 150,
16 "ipType": "ipv4",
17 "agentCount": 2
18}
Response example
1{
2 "taskId": "aMpuQakYljfaFgwXTABOPTcZdycGCeVk",
3 "jobId": "86acd46f-4a04-4b56-bacf-1f943366b6ea"
4}
UDP Task Details
- method:GET
- URL:/csm/api/v1/userId/{userId}}/site/udp/detail
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| taskId | String | Task ID | Yes | Request Parameters |
Request example
1GET /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/udp/detail?
2taskId=aMpuQakYljfaFgwXTABOPTcZdycGCeVk
Response example
1{
2 "scope": "BCM_SITE",
3 "taskName": "bb2_udp",
4 "address": "www.taobao.com",
5 "type": "udp",
6 "cycle": 600,
7 "idc": "shanghai-UNICOM,jiangsu-UNICOM,chongqing-UNICOM,beijing-UNICOM,ningxia-CMNET",
8 "idcObjs": [
9 {
10 "id": "shanghai-UNICOM",
11 "name": "Shanghai Unicom"
12 },
13 {
14 "id": "jiangsu-UNICOM",
15 "name": "Jiangsu Unicom"
16 },
17 {
18 "id": "chongqing-UNICOM",
19 "name": "Chongqing Unicom"
20 },
21 {
22 "id": "beijing-UNICOM",
23 "name": "Beijing Unicom"
24 },
25 {
26 "id": "ningxia-CMNET",
27 "name": "Ningxia Mobile"
28 }
29 ],
30 "timeout": 150,
31 "port": 8081,
32 "inputType": 0,
33 "outputType": 0,
34 "input": "",
35 "expectedOutput": "",
36 "ipType": "ipv4",
37 "agentCount": 2,
38 "agentTotalCount": 10
39}
FTP task-related APIs
FTP task creation
- method:POST
- URL:/csm/api/v1/userId/{userId}/site/ftp/create
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| ftpTask | FtpTask | FTP task configuration | Yes | Query Parameters |
FtpTask
| Name | Types | Description | Required or not |
|---|---|---|---|
| taskName | String | Task name | Yes |
| address | String | Monitor URL | Yes |
| cycle | Integer | Detection Period | Yes |
| idc | String | Probe Points, separated by commas | Yes |
| timeout | int | Timeout Setting, in seconds | Yes |
| port | int | Ports | Yes |
| anonymousLogin | Boolean | Whether to log in anonymously | Yes |
| userName | String | Username | No |
| password | String | Password | No |
| ipType | String | Protocol Type (IPv4/IPv6) | Yes |
| agentCount | int | Uniformly set the count of probe points per provincial operator (1-5) | Yes |
Request example
1POST /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/ftp/create
2requestbody:
3{
4 "userId": "453bf9588c9e488f9ba2c984129090dc",
5 "taskName": "bb2_ftp",
6 "address": "www.baidu.com",
7 "port": 80,
8 "anonymousLogin": true,
9 "userName": "",
10 "password": "",
11 "cycle": 300,
12 "idc": "shaanxi-CMNET,heilongjiang-CMNET,hubei-CMNET,guizhou-CMNET,shanxi-CMNET",
13 "timeout": 100,
14 "ipType": "ipv4",
15 "agentCount": 2
16}
Response example
1{
2 "taskId": "rYwPZMATMzXbTXYauUXbQGDUyoGQnGWH",
3 "jobId": "65367017-4fe1-451f-a566-4df7583e762c"
4}
FTP task update
- method:PUT
- URL:/csm/api/v1/userId/{userId}/site/ftp/update
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| ftpTask | FtpTask | FTP task configuration | Yes | Query Parameters |
FtpTask
| Name | Types | Description | Required or not |
|---|---|---|---|
| taskName | String | Task name | Yes |
| taskId | String | Unique Task ID | Yes |
| address | String | Monitor URL | Yes |
| cycle | Integer | Detection Period | Yes |
| idc | String | Probe Points, separated by commas | Yes |
| timeout | int | Timeout Setting, in seconds | Yes |
| port | int | Ports | Yes |
| anonymousLogin | Boolean | Whether to log in anonymously | Yes |
| userName | String | Username | No |
| password | String | Password | No |
| ipType | String | Protocol Type (IPv4/IPv6) | Yes |
| agentCount | int | Uniformly set the count of probe points per provincial operator (1-5) | Yes |
Request example
1PUT /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/ftp/update
2requestbody:
3{
4 "taskId": "rYwPZMATMzXbTXYauUXbQGDUyoGQnGWH",
5 "userId": "453bf9588c9e488f9ba2c984129090dc",
6 "taskName": "bb2_ftp",
7 "address": "www.taobao.com",
8 "port": 80,
9 "anonymousLogin": true,
10 "userName": "",
11 "password": null,
12 "cycle": 300,
13 "idc": "shaanxi-CMNET,heilongjiang-CMNET,hubei-CMNET,guizhou-CMNET,shanxi-CMNET",
14 "timeout": 200,
15 "ipType": "ipv4",
16 "agentCount": 2
17}
Response example
1{
2 "taskId": "rYwPZMATMzXbTXYauUXbQGDUyoGQnGWH",
3 "jobId": "849293a0-fa5d-44f4-93eb-2ab3f0679da8"
4}
FTP Task Details
- method:GET
- URL:/csm/api/v1/userId/{userId}}/site/ftp/detail
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| taskId | String | Task ID | Yes | Request Parameters |
Request example
1GET /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/ftp/detail?taskId=rYwPZMATMzXbTXYauUXbQGDUyoGQnGWH
Response example
1{
2 "scope": "BCM_SITE",
3 "taskName": "bb2_ftp",
4 "address": "www.taobao.com",
5 "type": "ftp",
6 "cycle": 300,
7 "idc": "shaanxi-CMNET,heilongjiang-CMNET,hubei-CMNET,guizhou-CMNET,shanxi-CMNET",
8 "idcObjs": [
9 {
10 "id": "shaanxi-CMNET",
11 "name": "Shaanxi Mobile"
12 },
13 {
14 "id": "heilongjiang-CMNET",
15 "name": "Heilongjiang Mobile"
16 },
17 {
18 "id": "hubei-CMNET",
19 "name": "Hubei Mobile"
20 },
21 {
22 "id": "guizhou-CMNET",
23 "name": "Guizhou Mobile"
24 },
25 {
26 "id": "shanxi-CMNET",
27 "name": "Shanxi Mobile"
28 }
29 ],
30 "timeout": 200,
31 "port": 80,
32 "anonymousLogin": true,
33 "userName": "",
34 "password": null,
35 "ipType": "ipv4",
36 "agentCount": 2,
37 "agentTotalCount": 10
38}
DNS Task Related APIs
DNS Task Creation
- method:POST
- URL:/csm/api/v1/userId/{userId}/site/dns/create
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| dnsTask | DnsTask | DNS Task Configuration | Yes | Query Parameters |
DnsTask
| Name | Types | Description | Required or not |
|---|---|---|---|
| taskName | String | Task name | Yes |
| address | String | Monitor URL | Yes |
| cycle | Integer | Detection Period | Yes |
| idc | String | Probe Points, separated by commas | Yes |
| timeout | int | Timeout Setting, in seconds | Yes |
| server | String | DNS server (No setup required if not needed) | Yes |
| resolveType | String | RECURSION: Recursive resolution; ITERATION: iterative resolution | Yes |
| kidnapWhite | String | Hijacking Allow List | No |
| ipType | String | Protocol Type (IPv4/IPv6) | Yes |
| agentCount | int | Uniformly set the count of probe points per provincial operator (1-5) | Yes |
Request example
1POST /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/dns/create
2requestbody:
3{
4 "scope": "BCM_SITE",
5 "taskName": "pyy_dns_test",
6 "address": "www.baidu.com",
7 "cycle": 60,
8 "idc": "beijing-CMNET,liaoning-CMNET",
9 "timeout": 10,
10 "type": "dns",
11 "server": "8.8.8.8",
12 "resolveType": "RECURSION",
13 "kidnapWhite": "www.baidu.com:196.168.1.*|2400:A480:aa:400:a1:b2:C3:0~FFFF|*"
14 "ipType": "ipv4",
15 "agentCount": 2
16}
Response example
1{
2 "taskId": "rYwPZMATMzXbTXYauUXbQGDUyoGQnGWH",
3 "jobId": "65367017-4fe1-451f-a566-4df7583e762c"
4}
DNS Task Update
- method:PUT
- URL:/csm/api/v1/userId/{userId}/site/dns/update
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| dnsTask | FtpTask | DNS Task Configuration | Yes | Query Parameters |
DnsTask
| Name | Types | Description | Required or not |
|---|---|---|---|
| taskName | String | Task name | Yes |
| taskId | String | Unique Task ID | Yes |
| address | String | Monitor URL | Yes |
| cycle | Integer | Detection Period | Yes |
| idc | String | Probe Points, separated by commas | Yes |
| timeout | int | Timeout Setting, in seconds | Yes |
| server | String | DNS server (No setup required if not needed) | Yes |
| resolveType | String | RECURSION: Recursive resolution; ITERATION: iterative resolution | Yes |
| kidnapWhite | String | Hijacking Allow List | No |
| ipType | String | Protocol Type (IPv4/IPv6) | Yes |
| agentCount | int | Uniformly set the count of probe points per provincial operator (1-5) | Yes |
Request example
1PUT /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/dns/update
2requestbody:
3{
4 "taskId": "rYwPZMATMzXbTXYauUXbQGDUyoGQnGWH",
5 "userId": "453bf9588c9e488f9ba2c984129090dc",
6 "taskName": "bb2_ftp",
7 "address": "www.taobao.com",
8 "port": 80,
9 "anonymousLogin": true,
10 "userName": "",
11 "password": null,
12 "cycle": 300,
13 "idc": "shaanxi-CMNET,heilongjiang-CMNET,hubei-CMNET,guizhou-CMNET,shanxi-CMNET",
14 "timeout": 200,
15 "ipType": "ipv4",
16 "agentCount": 2
17}
Response example
1{
2 "taskId": "rYwPZMATMzXbTXYauUXbQGDUyoGQnGWH",
3 "jobId": "849293a0-fa5d-44f4-93eb-2ab3f0679da8"
4}
DNS Task Details
- method:GET
- URL:/csm/api/v1/userId/{userId}}/site/dns/detail
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| taskId | String | Task ID | Yes | Request Parameters |
Request example
1GET /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/dns/detail?taskId=rYwPZMATMzXbTXYauUXbQGDUyoGQnGWH
Response example
1{
2 "taskName": "pyy_dns_test",
3 "address": "www.baidu.com",
4 "cycle": 60,
5 "idc": "beijing-CMNET",
6 "idcObjs": [
7 {
8 "id": "beijing-CMNET",
9 "name": "Beijing Mobile"
10 }
11 ],
12 "timeout": 10,
13 "ipType": "ipv4",
14 "server": "8.8.8.8",
15 "resolveType": "RECURSION",
16 "kidnapWhite": "www.baidu.com:196.168.1.*|2400:A480:aa:400:a1:b2:C3:0~FFFF|*",
17 "ipType": "ipv4",
18 "agentCount": 2,
19 "agentTotalCount": 10
20}
Site Monitor Task List API
- method:GET
- URL:/csm/api/v1/userId/{userId}}/site/list
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| query | String | Query parameters: when no search criteria exist, pass NAME: | No | Request Parameters |
| type | String | Task types: HTTP, TCP, etc. | No | Request Parameters |
| pageNo | int | Number of pages | Yes | Request Parameters |
| pageSize | int | Page size | Yes | Request Parameters |
query
| Types | Requires passing values | Example |
|---|---|---|
| Query by Name | NAME: value | NAME:test |
| As per monitor URL | TARGET: value | TARGET:www.baidu.com |
Request example
1GET /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/list?
2pageNo=1&
3pageSize=10&
4query=NAME:
Response example
1{
2 "content": [
3 {
4 "taskId": "rYwPZMATMzXbTXYauUXbQGDUyoGQnGWH",
5 "taskName": "bb2_ftp",
6 "cycle": 300,
7 "type": "FTP",
8 "address": "www.taobao.com",
9 "status": null
10 },
11 {
12 "taskId": "qztvcDiQydeiPmLgFNmpHrpuBNsRSvyU",
13 "taskName": "bb2_tcp",
14 "cycle": 300,
15 "type": "TCP",
16 "address": "www.taobao.com",
17 "status": null
18 },
19 {
20 "taskId": "zdBBpHOftpxxdPxwKLZHobmFQyMlHoIK",
21 "taskName": "bb_tcp",
22 "cycle": 600,
23 "type": "TCP",
24 "address": "www.taobao.com",
25 "status": null
26 }
27 ],
28 "query": null,
29 "fields": [],
30 "orderBy": [
31 "-id"
32 ],
33 "pageNumber": 1,
34 "pageSize": 10,
35 "pageElements": 10,
36 "last": true,
37 "first": true,
38 "totalPages": 1,
39 "totalElements": 10
40}
Site Monitor Task Deletion API
- method:DELETE
- URL:/csm/api/v1/userId/{userId}}/site/delete
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| taskId | String | Task ID | Yes | Request Parameters |
Request example
1DELETE /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/delete?
2taskId=qztvcDiQydeiPmLgFNmpHrpuBNsRSvyU
Response example
1{
2 "requestId": null,
3 "code": "OK",
4 "message": null
5}
Site Monitor Task Query API
- method:GET
- URL:/csm/api/v1/userId/{userId}}/site/{siteId}
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| siteId | String | Site Task ID | Yes | Path Parameters |
Request example
1GET /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/rYwPZMATMzXbTXYauUXbQGDUyoGQnGWH
Response example
1{
2 "name": "bb2_ftp",
3 "address": "www.taobao.com",
4 "method": "ftp",
5 "siteId": "rYwPZMATMzXbTXYauUXbQGDUyoGQnGWH"
6}
Site Monitor Alarm Configuration Related APIs
Create Site Monitor Alarm Strategy
- method:POST
- URL:/csm/api/v1/userId/{userId}/site/alarm/config/create
Request parameters:
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| alarmConfig | SiteAlarmConfig | Site Alarm Configuration | Yes | Query Parameters |
SiteAlarmConfig
| Name | Types | Description | Required or not |
|---|---|---|---|
| taskId | String | Task Unique Identifier | Yes |
| comment | String | Annotation | No |
| aliasName | String | Alarm Strategy Name | Yes |
| namespace | String | BCM_SITE | Yes |
| level | AlarmLevel | Alarm level: NOTICE, WARNING, CRITICAL, MAJOR, CUSTOM | Yes |
| actionEnabled | Boolean | Notification Status | Yes |
| resumeActions | Set |
Recovery Action | Yes |
| insufficientActions | Set |
No Data Action | Yes |
| insufficientCycle | int | No-data alarm judgment period | No |
| rules | List |
Alarm Rule | Yes |
| region | String | Region | No |
| callbackUrl | String | Alarm callback address | No |
| callbackToken | String | Alarm callback token | No |
| method | String | Task type | No |
| siteMonitor | String | Monitor Object: Task Type + Task Name + Probe Address | No |
| tag | String | Identify old/new strategies, bmc2.0 indicates the old strategy | No |
| incidentAction | Set |
Alarm action | Yes |
SiteAlarmRule
| Name | Types | Description | Required or not |
|---|---|---|---|
| metric | String | Name of metrics | Yes |
| metricAlias | String | Alias for metrics | Yes |
| statistics | String | average: mean value; max: maximum value; min: minimum value; sum: sum value | Yes |
| thresholed | String | Threshold | Yes |
| comparisonOperator | String | Comparison Method | Yes |
| cycle | int | Detection Period | Yes |
| count | int | Count | Yes |
| function | String | THRESHOLD: Normal Alarm CHAIN: MoM Alarm | Yes |
| actOnIdcs | List |
Acting Probe Points | Yes |
| actOnIsps | List |
Acting Operator | No |
| versionSite | String | Task Version | Not required for addition, but required for updates |
Request example
1POST /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/alarm/config/create
2request body :
3{
4 "taskId": "UWeNWIjgqLUofLNfiXArVEQAdqKtkeEA",
5 "alarmName": "bb_test",
6 "userId": "453bf9588c9e488f9ba2c984129090dc",
7 "namespace": "BCM_SITE",
8 "level": "MAJOR",
9 "actionEnabled": true,
10 "rules": [ {
11 "metric": "connectTime",
12 "metricAlias": "Connection Establishment Time",
13 "cycle": 300,
14 "statistics": "average",
15 "threshold": "100",
16 "comparisonOperator": ">",
17 "count": 1,
18 "function": "THRESHOLD",
19 "actOnIdcs": ["average", "shaanxi-CHINANET", "shaanxi-UNICOM", "shaanxi-CMNET", "jiangsu-CMNET"],
20 "actOnIsps": []
21 },
22 {
23 "metric": "dnsTime",
24 "metricAlias": "DNS Resolution Time",
25 "cycle": 300,
26 "statistics": "average",
27 "threshold": "100",
28 "comparisonOperator": ">",
29 "count": 1,
30 "function": "THRESHOLD",
31 "actOnIdcs": ["average", "shaanxi-CHINANET", "shaanxi-UNICOM", "shaanxi-CMNET", "jiangsu-CMNET"],
32 "actOnIsps": []
33 } ],
34 "region": "bj",
35 "incidentActions": ["cb15e004-c9c5-4498-8ba0-20319161a1c6"],
36 "resumeActions": ["cb15e004-c9c5-4498-8ba0-20319161a1c6"],
37 "insufficientCycle": 0,
38 "callbackUrl": "",
39 "callbackToken": ""
40}
Delete site monitor alarm strategy
- method:DELETE
- URL:/csm/api/v1/userId/{userId}/site/alarm/config/delete
Request parameters:
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| alarmName | SiteAlarmNamesRequest | Alarm Strategy Name to Be Deleted | Yes | Query Parameters |
SiteAlarmNamesRequest
| Name | Types | Description | Required or not |
|---|---|---|---|
| alarmNames | List |
List of Alarm Strategy Names to Be Deleted | Yes |
Request example:
1DELETE /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/alarm/config/delete
2request body:
3{
4 "alarmNames":["b87ffe8c1c584b09b2baf15e6244d55d"]
5}
Update site monitor alarm strategy
- method:PUT
- URL:/csm/api/v1/userId/{userId}/site/alarm/config/update
Request parameters:
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| alarmConfig | SiteAlarmConfig | Site Alarm Configuration | Yes | Query Parameters |
SiteAlarmConfig
| Name | Types | Description | Required or not |
|---|---|---|---|
| taskId | String | Policy name | Yes |
| comment | String | Annotation | No |
| userId | String | User ID | Yes |
| alarmName | String | Alarm Strategy Name | Yes |
| namespace | String | BCM_SITE | Yes |
| level | AlarmLevel | Alarm level: NOTICE, WARNING, CRITICAL, MAJOR, CUSTOM | Yes |
| actionEnabled | Boolean | Notification Status | Yes |
| resumeActions | Set |
Recovery Action | Yes |
| insufficientActions | Set |
No Data Action | Yes |
| insufficientCycle | int | No-data alarm judgment period | No |
| rules | List |
Alarm Rule | Yes |
| region | String | Region | No |
| callbackUrl | String | Alarm callback address | No |
| callbackToken | String | Alarm callback token | No |
| method | String | Task type | No |
| siteMonitor | String | Monitor Object: Task Type + Task Name + Probe Address | No |
| tag | String | Identify old/new strategies, bmc2.0 indicates the old strategy | No |
| incidentAction | Set |
Alarm action | Yes |
SiteAlarmRule
| Name | Types | Description | Required or not |
|---|---|---|---|
| metric | String | Name of metrics | Yes |
| metricAlias | String | Alias for metrics | Yes |
| statistics | String | average: mean value; max: maximum value; min: minimum value; sum: sum value | Yes |
| thresholed | String | Threshold | Yes |
| comparisonOperator | String | Comparison Method | Yes |
| cycle | int | Detection Period | Yes |
| count | int | Count | Yes |
| function | String | THRESHOLD: Normal Alarm CHAIN: MoM Alarm | Yes |
| actOnIdcs | List |
Acting Probe Points | Yes |
| actOnIsps | List |
Acting Operator | No |
| versionSite | String | Task Version | Not required for addition, but required for updates |
Request example:
1PUT /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/alarm/config/update
2request body:
3{
4 "taskId": "UWeNWIjgqLUofLNfiXArVEQAdqKtkeEA",
5 "alarmName": "b87ffe8c1c584b09b2baf15e6244d55d",
6 "userId": "453bf9588c9e488f9ba2c984129090dc",
7 "namespace": "BCM_SITE",
8 "level": "MAJOR",
9 "actionEnabled": true,
10 "rules": [{
11 "metric": "redirectTime",
12 "metricAlias": "Redirection time",
13 "cycle": 300,
14 "statistics": "average",
15 "threshold": "100",
16 "comparisonOperator": ">",
17 "count": 2,
18 "function": "THRESHOLD",
19 "actOnIdcs": ["average", "shaanxi-CHINANET", "shaanxi-UNICOM", "shaanxi-CMNET", "jiangsu-CMNET"],
20 "actOnIsps": [],
21 "versionSite": "PvwWOucRnClSYewY"
22 }],
23 "region": "bj",
24 "incidentActions": ["cb15e004-c9c5-4498-8ba0-20319161a1c6"],
25 "resumeActions": ["cb15e004-c9c5-4498-8ba0-20319161a1c6"],
26 "insufficientCycle": 0,
27 "callbackUrl": "",
28 "callbackToken": ""
29}
Details of site monitor alarm strategy
- method:GET
- URL:/csm/api/v1/userId/{userId}/site/alarm/config/detail
Request parameters:
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| alarmName | String | Alarm Strategy Name to Be Viewed | Yes | Request Parameters |
Request example
1GET /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/alarm/config/detail?
2alarmName=b87ffe8c1c584b09b2baf15e6244d55d
Response example
1{
2 "taskId": "UWeNWIjgqLUofLNfiXArVEQAdqKtkeEA",
3 "comment": "",
4 "userId": "453bf9588c9e488f9ba2c984129090dc",
5 "alarmName": "b87ffe8c1c584b09b2baf15e6244d55d",
6 "namespace": "BCM_SITE",
7 "level": "MAJOR",
8 "actionEnabled": true,
9 "incidentActions": [
10 "cb15e004-c9c5-4498-8ba0-20319161a1c6"
11 ],
12 "resumeActions": ["cb15e004-c9c5-4498-8ba0-20319161a1c6"],
13 "insufficientActions": [],
14 "insufficientCycle": 0,
15 "rules": [
16 {
17 "id": null,
18 "index": 0,
19 "metric": "redirectTime",
20 "metricAlias": "Redirection time",
21 "statistics": "average",
22 "threshold": "100",
23 "comparisonOperator": ">",
24 "cycle": 300,
25 "count": 2,
26 "function": "THRESHOLD",
27 "sequence": 0,
28 "actOnIdcs": [
29 "average",
30 "shaanxi-CHINANET",
31 "shaanxi-UNICOM",
32 "shaanxi-CMNET",
33 "jiangsu-CMNET"
34 ],
35 "actOnIsps": [],
36 "versionSite": "PvwWOucRnClSYewY"
37 }
38 ],
39 "region": "bj",
40 "callbackUrl": "",
41 "callbackToken": "",
42 "method": "HTTP",
43 "siteMonitor": "HTTP,lh_t_v1,http://baidu.com",
44 "tag": ""
45}
Site Monitor Alarm Strategy List
- method:GET
- URL:/csm/api/v1/userId/{userId}/site/alarm/config/list
Request parameters:
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| taskId | String | Site Monitor Task ID | No | Request Parameters |
| aliasName | String | Alarm Strategy Name | No | Request Parameters |
| actionEnabled | Boolean | Notification Status | No | Request Parameters |
| pageNo | int | Page number | Yes | Request Parameters |
| pageSize | int | Page size | Yes | Request Parameters |
Request example
1GET /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/alarm/config/list?
2taskId=UWeNWIjgqLUofLNfiXArVEQAdqKtkeEA&
3pageNo=1&
4pageSize=10
Response example
1{
2 "orderBy": "",
3 "order": "",
4 "pageNo": 1,
5 "pageSize": 10,
6 "totalCount": 1,
7 "result": [
8 {
9 "taskId": "UWeNWIjgqLUofLNfiXArVEQAdqKtkeEA",
10 "comment": "",
11 "userId": "453bf9588c9e488f9ba2c984129090dc",
12 "alarmName": "bb_test",
13 "namespace": "BCM_SITE",
14 "level": "MAJOR",
15 "actionEnabled": true,
16 "incidentActions": [
17 "lh_v1"
18 ],
19 "resumeActions": [],
20 "insufficientActions": [],
21 "insufficientCycle": 0,
22 "rules": [
23 {
24 "id": null,
25 "index": 0,
26 "metric": "redirectTime",
27 "metricAlias": "Redirection time",
28 "statistics": "average",
29 "threshold": "100",
30 "comparisonOperator": ">",
31 "cycle": 300,
32 "count": 2,
33 "function": "THRESHOLD",
34 "sequence": 0,
35 "actOnIdcs": [
36 "average",
37 "shaanxi-CHINANET",
38 "shaanxi-UNICOM",
39 "shaanxi-CMNET",
40 "jiangsu-CMNET"
41 ],
42 "actOnIsps": [],
43 "versionSite": "PvwWOucRnClSYewY"
44 }
45 ],
46 "region": "bj",
47 "callbackUrl": "",
48 "callbackToken": "",
49 "method": "HTTP",
50 "siteMonitor": "HTTP,lh_t_v1,http://baidu.com",
51 "tag": ""
52 }
53 ]
54}
Disable Site Monitor Alarm Strategy
- method:POST
- URL:/csm/api/v1/userId/{userId}/site/alarm/config/block
Request parameters:
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| namespace | String | BCM_SITE | Yes | Request Parameters |
| alarmName | String | Alarm Strategy Name | Yes | Request Parameters |
Request example
1POST /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/alarm/config/block?
2namespace=BCM_SITE&
3alarmName=bb_test2
Response example
1{"result":{},"success":true}
Enable Site Alarm Strategy
- method:POST
- URL:/csm/api/v1/userId/{userId}/site/alarm/config/unblock
Request parameters:
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| namespace | String | BCM_SITE | Yes | Request Parameters |
| alarmName | String | Alarm Strategy Name | Yes | Request Parameters |
Request example
1POST /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/alarm/config/unblock?
2namespace=BCM_SITE&
3alarmName=bb_test2
Response example
1{"result":{},"success":true}
API to Retrieve Site Task Information by Alarm Strategy Name
- method:GET
- URL:/csm/api/v1/userId/{userId}/site/alarm/config/{alarmName}
Request parameters:
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| alarmName | String | Alarm Strategy Name | Yes | Path Parameters |
Request example
1GET /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/alarm/config/bb_test
Response example
1{
2 "name": "lh_t_v1",
3 "address": "http://baidu.com",
4 "method": "http",
5 "siteId": "UWeNWIjgqLUofLNfiXArVEQAdqKtkeEA"
6}
Overview Related APIs
Overall Trend Chart/Probe Point Trend Chart/Operator Trend Chart
- method:GET
- URL:/csm/api/v1/userId/{userId}/site/metricSiteData
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| metricName | String | Metric name | Yes | Request Parameters |
| statistics | String[] | Statistic Method | Yes | Request Parameters |
| startTime | String | UTC Time, Start Time | Yes | Request Parameters |
| endTime | String | UTC Time, End Time | Yes | Request Parameters |
| cycle | int | Period, default 60s | Yes | Request Parameters |
| taskId | String | Task ID | Yes | Request Parameters |
| dimensions | String | Dimension | No | Request Parameters |
Dimensions Description
| API | dimensions |
|---|---|
| Overall Trend Chart | Empty |
| Probe Point Trend Chart | beijing-UNICOM |
| Operator trend chart | UNICOM |
Request example
1GET /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/metricSiteData?metricName=totalTime&
2statistics=average&
3startTime=2021-04-16T07:05:00Z&
4endTime=2021-04-16T07:10:00Z&
5taskId=NsErRtUYHVtDRZYNfESnBfZLHjnflXsF&
6cycle=60&
7dimensions=beijing-UNICOM
Response example
1[
2 {
3 "namespace": "NsErRtUYHVtDRZYNfESnBfZLHjnflXsF___bj.BCM_SITE.453bf9588c9e488f9ba2c984129090dc",
4 "dimensions": [
5 {
6 "name": "prov",
7 "value": "beijing"
8 },
9 {
10 "name": "isp",
11 "value": "UNICOM"
12 }
13 ],
14 "dataPoints": [
15 {
16 "timestamp": "2021-04-16T07:05:00Z"
17 },
18 {
19 "timestamp": "2021-04-16T07:06:00Z"
20 },
21 {
22 "timestamp": "2021-04-16T07:07:00Z"
23 },
24 {
25 "timestamp": "2021-04-16T07:08:00Z"
26 },
27 {
28 "timestamp": "2021-04-16T07:09:00Z"
29 }
30 ]
31 }
32]
Overview API
- method:GET
- URL:/csm/api/v1/userId/{userId}/site/idc/overallView
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| taskId | String | Task ID | Yes | Request Parameters |
Request example
1GET /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/idc/overallView?
2taskId=BuqyMbmIgIBtAOBjWCCqkGBAJYYxlYrH
Response example
1[
2 {
3 "id": "CMNET",
4 "name": "Mobile",
5 "availability": "0.0",
6 "responseTime": 0.0
7 },
8 {
9 "id": "UNICOM",
10 "name": "Unicom",
11 "availability": "0.0",
12 "responseTime": 0.0
13 },
14 {
15 "id": "CHINANET",
16 "name": "Telecom",
17 "availability": "0.0",
18 "responseTime": 0.0
19 }
20]
Province-specific view API
- method:GET
- URL:/csm/api/v1/userId/{userId}/site/idc/provincialView
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| taskId | String | Task ID | Yes | Request Parameters |
| isp | String | Operator | Yes | Request Parameters |
Request example
1GET /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/idc/provincialView?
2taskId=BuqyMbmIgIBtAOBjWCCqkGBAJYYxlYrH&
3isp=beijing
Response example
1[
2 {
3 "id": "beijing-UNICOM",
4 "name": "Beijing Unicom",
5 "availability": "98.33",
6 "responseTime": 158.05084745762713
7 }
8]
Probe node-related APIs
Probe Point Organization
| Province | Probe Point Name |
|---|---|
| Anhui | anhui |
| Beijing | beijing |
| Fujian | fujian |
| Gansu | gansu |
| Guangdong | guangdong |
| Guangxi | guangxi |
| Guizhou | guizhou |
| Hainan | hainan |
| Hebei | hebei |
| Henan | henan |
| Heilongjiang | heilongjiang |
| Hubei | hubei |
| Hunan | hunan |
| Jilin | jilin |
| Jiangsu | jiangsu |
| Jiangxi | jiangxi |
| Liaoning | liaoning |
| Inner Mongolia | neimenggu |
| Ningxia | ningxia |
| Qinghai | qinghai |
| Shandong | shandong |
| Shanxi | shanxi |
| Shaanxi | shanxi |
| Shanghai | shanghai |
| Sichuan | sichuan |
| Tianjin | tianjin |
| Tibet | xizang |
| Xinjiang | xinjiang |
| Yunnan | yunnan |
| Zhejiang | zhejiang |
| Chongqing | chongqing |
| Operator | Name |
|---|---|
| Telecom | CHINANET |
| mobile | CMNET |
| Unicom | UNICOM |
Note: Probe points exist except for Jilin Mobile, Tibet Unicom, and Tibet Mobile
API to Retrieve All Probe Points
- method:GET
- URL:/csm/api/v1/userId/{userId}/site/agent/list
Request parameters
| Name | Types | Description | Required or not | Location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
Request example:
1GET /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/agent/list
Response example
1[
2 {
3 "agentId": "shaanxi-CMNET",
4 "agentName": "Shaanxi Mobile"
5 },
6 {
7 "agentId": "heilongjiang-CMNET",
8 "agentName": "Heilongjiang Mobile"
9 },
10 {
11 "agentId": "jilin-CHINANET",
12 "agentName": "Jilin Telecom"
13 },
14 {
15 "agentId": "henan-CMNET",
16 "agentName": "Henan Mobile"
17 },
18 {
19 "agentId": "liaoning-CHINANET",
20 "agentName": "Liaoning Telecom"
21 },
22 {
23 "agentId": "henan-UNICOM",
24 "agentName": "Henan Unicom"
25 }
26]
API to Retrieve the Probe Point and Operator for a Task
method:GET
URL:/csm/api/v1/userId/{userId}/site/agent/idcIsp
Request parameters
| Name | Types | Description | Required or not | Location |
|---|---|---|---|---|
| userId | String | User ID | Yes | Path Parameters |
| taskId | String | Task ID | Yes | Request Parameters |
Request example
1GET /csm/api/v1/userId/453bf9588c9e488f9ba2c984129090dc/site/agent/idcIsp?
2taskId=BuqyMbmIgIBtAOBjWCCqkGBAJYYxlYrH
Response example
1{
2 "idcs": [
3 {
4 "id": "average",
5 "name": "Network-wide Average"
6 },
7 {
8 "id": "shanghai-CMNET",
9 "name": "Shanghai Mobile"
10 },
11 {
12 "id": "beijing-UNICOM",
13 "name": "Beijing Unicom"
14 },
15 {
16 "id": "guangdong-CHINANET",
17 "name": "Guangdong Telecom"
18 }
19 ],
20 "isps": [
21 {
22 "id": "CMNET",
23 "name": "Mobile"
24 },
25 {
26 "id": "CHINANET",
27 "name": "Telecom"
28 },
29 {
30 "id": "UNICOM",
31 "name": "Unicom"
32 }
33 ]
34}
