百度智能云

All Product Document

          Cloud Monitor

          Instant Probe

          Probe task

          Create probe task

          Request structure

          • method:POST
          • URL:/csm/api/v1/site/once/{protocolType}/taskCreate

          Request parameters

          protocolType String Protocol type to be created, in uppercase, options: HTTP/HTTPS/PING/FTP/TCP/UDP/DNS Yes Path
          userId String User ID Yes RequestBody
          address String Probe address, e.g.: www.baidu.com Yes RequestBody
          advancedFlag Boolean Whether to enable advanced configuration. HTTP/HTTPS/TCP is applicable No RequestBody
          ipType String Probe node type: ipv4/ipv6 Yes RequestBody
          idc String Probe nodes are obtainable via the 2.1 Probe Node List API. Multiple points are comma-separated, e.g., beijing-CMNET, beijing-UNICOM Yes RequestBody
          timeout int Timeout duration Yes RequestBody
          protocolType String Protocol type to be created, in uppercase. Options: HTTP/HTTPS/PING/FTP/TCP/UDP/DNS. It must match the protocolType specified in the request path. Yes RequestBody
          onceConfig OnceConfig Regular task configuration Yes RequestBody
          advancedConfig AdvancedConfig Advanced task configuration No RequestBody
          groupId String Tasks created by reprobing belong to the same group No RequestBody
          taskType String Task type currently only supports: NET_QUALITY (network quality) Yes RequestBody

          OnceConfig

          Name Types Description
          anonymousLogin boolean Whether to log in anonymously, optional
          method String HTTP/HTTPS parameters, request method, required
          postContent String HTTP/HTTPS parameters, POST request content, (optional)
          kidnapWhite String DNS parameters, DNS allow list, optional
          resolveType String DNS parameters, query method, optional: * RECURSION, optional
          server String DNS parameters, DNS server, e.g., 114.114.114.114, optional
          packetCount int Ping parameters, Ping packet count, required
          port int TCP/UDP/FTP parameters, port number, e.g., 21, required
          inputType int UDP parameters, input type: 1: Text 2: Hexadecimal format 0: None, optional
          input String UDP parameters, request content, optional
          outputType int UDP parameters, input type: 1: Text 2: Hexadecimal format 0: None, optional
          expectedOutput String UDP parameters, expected output, optional
          username String FTP parameters, username, optional
          password String FTP parameters, login password, optional

          AdvancedConfig

          Name Types Description
          cookies String HTTP/HTTPS parameters, Cookie field in request headers, optional
          userAgent String HTTP/HTTPS parameters, User-Agent field in request headers, optional
          host String HTTP/HTTPS parameters, HSOT field in request headers, optional
          responseCode String HTTP/HTTPS parameters, response code, optional
          responseCheck String HTTP/HTTPS parameters, response content matching, optional
          username String HTTP/HTTPS parameters, verification username, optional
          password String HTTP/HTTPS parameters, certification password, optional
          inputType int TCP parameters, input type: 1: Text 2: Hexadecimal format 0: None, optional
          input String TCP parameters, request content, optional
          outputType int TCP parameters, input type: 1: Text 2: Hexadecimal format 0: None, optional
          expectedOutput String TCP parameters, expected output, optional

          Request example

          POST /csm/api/v1/site/once/HTTP/taskCreate
          {
              "userId": "453bf9588c9e488f9ba2c984129090dc",
           // Probe address
              "address": "www.baidu.com",
           // Whether to enable advanced configuration. HTTP/HTTPS/TCP is applicable
              "advancedFlag": true,
           // Probe node type ipv4/ipv6
              "ipType": "ipv4",
           // Probe node
              "idc": "beijing-CMNET,beijing-UNICOM,beijing-CHINANET,guangdong-CMNET,fujian-CMNET,henan-CMNET,hebei-CHINANET",
           // Timeout duration
              "timeout": 60,
           // Protocol type
           // Protocol types, in uppercase
              "protocolType": "HTTP",
           // Task type
           // NET_QUAILTY  - Network quality
              "taskType": "NET_QUAILTY",
              "onceConfig": {
                  // HTTP/HTTPS
           // Request method
                  "method": "get",
           // HTTP POST request content
                  "postContent": "",
                  
                  // DNS
           // DNS allow list
                  "kidnapWhite": "192.168.1.1",
           // Query method
                  "resolveType": "RECURSION",
           // DNS server
                  "server": "114.114.114.114",
                  
                  // PING
           // Ping packet count
                  "packetCount": 4,
                  
           // TCP/UDP/FTP port number
                  "port": 22,
                  
                  // UDP
           // UDP request format
                  "inputType": 2,
           // UDP request content
                  "input": "0x11",
           // UDP response matching format
                  "outputType": 2,
           // UDP response content matching
                  "expectedOutput": "0x11",
                  
                  // FTP
           // FTP login name
                  "username": "",
           // FTP login password
                  "password": ""
              },
              "advancedConfig": {
                  // HTTP/HTTPS
           // Cookie field in request headers
                  "cookies": "auth=abc",
           // User-Agent field in request headers
                  "userAgent": "os=macOS",
           // HOST field in request headers
                  "host": "1.1.1.1",
                  // HTTP Code
                  "responseCode": "200",
           // Response content matching
                  "responseCheck": "success",
           // HTTP certification username
                  "username": "admin",
           // HTTP certification password
                  "password": "",
                  
                  // TCP
           // TCP request format
                  "inputType": 2,
           // TCP request content
                  "input": "0x11",
           // TCP response matching format
                  "outputType": 2,
           // TCP response content matching
                  "expectedOutput": "0x11"
              }
          }
          // Response
          {
              "requestId":"90742375b871445d8907be7748397ef4",
              "success":true,
              "result":{
           // Task ID
                  "siteId":"jspjUbhwHVotroGFKeRChlriwxlftkxH",
           // Task group ID
                  "groupId":"be388838-9381-423e-b4ac-afac8dfe70e3"
              },
              "code":200
          }

          Probing record

          Request structure

          • method:POST
          • URL:/csm/api/v1/site/once/taskList

          Request parameters

          Name Types Description Required or not Parameter location
          userId String User ID No RequestBody
          url String Probe address, such as www.baidu.com, direct fuzzy queries No RequestBody
          pageNo int Page number Yes RequestBody
          pageSize int Page size Yes RequestBody
          order String Order of returned list, defaulting to desc, optional asc No RequestBody
          orderBy String Field for sorting the list, defaulting to creation time No RequestBody
          groupId String Tasks created by reprobing belong to the same group No RequestBody

          Request example

          POST /csm/api/v1/site/once/taskList
          {
           // Request page
              "pageNo":1,
           // Request page size
              "pageSize":10,
           // User ID
              "userId": "453bf9588c9e488f9ba2c984129090dc",
           // Search URL, fuzzy matching supported
              "url": "baidu"
          }
          // Response
          {
              "requestId": "8075cc28167807369286310353357a",
              "code": 200,
              "result": {
                  "taskList": [
                      {
           // Task ID
                          "siteId": "PymZbqvHNJfXRcvSEiBOHmcfBWNAjaDB",
           // Group ID, used for querying historical probe
                          "groupId":"be388838-9381-423e-b4ac-afac8dfe70e3",
           // User
                          "userId": "a0d04d7c202140cb80155ff7b6752ce4",
           // Task type, currently only network quality
           // NET_QUALITY   - Network quality
                          "taskType": "NET_QUALITY",
           // Protocol type
                          "protocolType": "HTTP",
           // Probe address
                          "url": "www.baidu.com",
           // Total probe nodes of task
                          "agentNum": 7,
           // Total probe nodes in response result
                          "sumSampleNum": 7,
           // Overall availability rate, calculated from all probe nodes
                          "success": 100,
           // Probe time, when the probe result is completed
                          "monitorTime": "2023-03-06 10:40:14",
           // Creation time
                          "createTime": "2023-03-06 10:40:14",
           // Task status
           // PROBING - in progress
           // FINISH   - completed
           // FAILED   - failed
                          "status": "FINISH"
                      }
                  ],
           // Current page
                  "pageNo": 1,
           // Page size
                  "pageSize": 10,
           // Total records
                  "totalCount": 1
              },
              "success": true,
              "message": "success"
          }

          Delete probe records

          Request structure

          • method:POST
          • URL:/csm/api/v1/site/once/taskDelete

          Request parameters

          Name Types Description Required or not Parameter location
          userId String User ID Yes RequestBody
          siteId String Probe task ID Yes RequestBody

          Request example

          POST /csm/api/v1/site/once/taskDelete
          {
           // User ID
              "userId":"453bf9588c9e488f9ba2c984129090dc",
           // Probe task ID
              "siteId":"vLZFWRbcubOVuPgQVgNdZsBiNRuuHIIr"
          }
          // Response
          {
              "requestId": "aa2431ff8cb74ba2b9a26d788209a77b",
              "message": "",
              "success": true,
              "result": {
           "siteId": "vLZFWRbcubOVuPgQVgNdZsBiNRuuHIIr",  // Deleted task ID
                  "groupId": "d13f2b4a-1892-44cb-a3f4-0c7ede23826d"
              },
              "code": 200
          }

          Probe task result

          Request structure

          • method:POST
          • URL: /csm/api/v1/site/once/loadData

          Request parameters

          Name Types Description Required or not Parameter location
          userId String User ID Yes RequestBody
          siteId String Task ID Yes RequestBody
          pageNo int Page number Yes RequestBody
          pageSize int Page size Yes RequestBody
          order String asc/desc No RequestBody
          orderBy String Sorting field, only Metric names corresponding to the protocol type can be passed No RequestBody
          filterArea String Filter probe results by province/city, higher priority, choose between this or filterIsp No RequestBody
          filterIsp String Filter probe results by operator, choose between this or area No RequestBody

          Request example

           POST /csm/api/v1/site/once/loadData
          {
           // Request page
              "pageNo":1,
           // Request page size
              "pageSize":10,
           // Filter probe results by province/city, higher priority
              "filterArea": "beijing",
          
           // User ID
              "userId":"453bf9588c9e488f9ba2c984129090dc",
           // Probe task ID
              "siteId":"vLZFWRbcubOVuPgQVgNdZsBiNRuuHIIr"
          }
          // Response
          {
              "requestId": "aa2431ff8cb74ba2b9a26d788209a77b",
              "code": 200,
              "result": {
           // Total probe nodes
                  "totalNum": 1,
           // Page
                  "pageNo": 1,
           // Page size
                  "pageSize": 10,
           // Sorting order
                  "order": "desc",
           // Sorting field
                  "orderBy": "monitorTime",
           // Task status
           // PROBING - in progress
           // FINISH   - completed
           // FAILED - Failed
                  "status": "FINISH",
           // Protocol type
                  "protocolType": "HTTP",
           // Probe address
                  "url": "www.baidu.com",
           // Task type
           // NET_QUALITY   - Network quality
                  "taskType": "NET_QUALITY",
           // Filter probe results by province/city, higher priority
                  "filterArea": "beijing",
           // Filter probe results by operator, choose between this or area
                  "filterIsp": "CMNET",
           // Site task ID
                  "siteId": "id",
           // NMP-side task ID
                  "jobId": "id",
           // Task group ID
                  "groupId": "id",
           // User ID
                  "userId": "id",
           // Task type metrics names, with fixed order
                  "metricOrder": [
                      "totalTime",
                      "dnsTime",
                      "dnsKidnap"
                  ],
           // Province/city collection
                  "allAreas": [
                      "hebei",
                      "tianjin",
                      "hubei",
                      "beijing",
                      "fujian"
                  ],
           // Metric overview
                  "overviewData": {
           // Those included in the protocol types of the task will only be returned in the metrics section
                      "metrics": {
           // Connection establishment time
                          "connectTime": 17.2,
           // DNS resolution event
                          "dnsTime": 0.005
                      },
           // Availability rate
                      "success": 89,
           // Total probe nodes
                      "sumSampleNum": 7,
           // Success count
                      "rightSampleNum": 7,
           // Failure count
                      "errSampleNum": 0
                  },
           // Probe details, probe node list
                  "detailData": [
                      {
           // Probe node data ID
                          "id": 123,
           // Region
                          "agentProv": "shanghai",
           // Operator
                          "agentIsp": "CHINANET",
           // Probe endpoint ID
                          "clientId": "122.137.20.16.1",
           // Probe endpoint city
           "clientCity": "Shanghai",
           // Resolved IP
                          "remoteAddr": "220.181.38.150",
           // Location of resolved IP
           "remoteCity": "Baoding",
           // Province of resolved IP
           "remoteArea": "Hebei",
           // County/district of resolved IP
           "remoteCounty": "Shunping",
           // Protocol type: ipv4/ipv6
                          "ipProtocol": "ipv4",
           // Task URL
                          "url": "www.baidu.com",
           // DNS resolved result
                          "analysisResult": [
                              "112.53.42.114",
                              "112.53.42.52",
                              "2402:4e00:1020:1404:0:9227:71a3:83d2",
                              "2402:4e00:1020:1404:0:9227:71ab:2b74",
                              "ins-r23tsuuf.ias.tencent-cloud.net."
                          ],
           // Metrics corresponding to protocol type
                          "metrics": {
           // DND resolution time
                              "dnsTime": 0.02,
           // Packet loss rate
                              "packetLostRate": 0,
           // Connection establishment time
                              "connectTime": 44,
           // Redirection time
                              "redirectTime": 0,
           // Total task duration
                              "totalTime": 395
                          },
           // Availability rate
                          "success": 100,
           // Probe time
                          "monitorTime": "2023-03-06 10:40:55",
           // Task status
           // PROBING - in progress
           // FINISH   - completed
           // FAILED   - failed
                          "status": "FINISH"
                      }
                  ],
           // Task configuration, all fields identical to the Request when creating a task
                  "taskConfig": {
                      ...
                  }
              },
              "success": true,
              "message": "success"
          }

          Probe details

          Request structure

          • Method:POST
          • URL:/csm/api/v1/site/once/groupTask

          Request parameters

          Name Types Description Required or not Parameter location
          userId String User ID Yes RequestBody
          siteId String Task ID No RequestBody
          siteIds List<String> Task ID list, only one field can take effect with groupId field, higher priority of groupId No RequestBody
          groupId String Group ID, tasks from the same source belong to one group No RequestBody
          pageNo int Page number Yes RequestBody
          pageSize int Page size Yes RequestBody
          order String asc/desc No RequestBody
          orderBy String Sorting field, only Metric names corresponding to the protocol type can be passed No RequestBody
          filterArea String Filter probe results by province/city, higher priority, choose between this or filterIsp No RequestBody
          filterIsp String Filter probe results by operator, choose between this or area No RequestBody

          Response example

          POST /csm/api/v1/site/once/groupTask
          {
           // Group ID, tasks from the same source belong to one group
              "groupId": "groub0716ac8-9bf5-4a65-819c-a708f88cd013pId",
          
           // User ID
              "userId": "453bf9588c9e488f9ba2c984129090dc",
           // ID displayed in Task Details, group results need to filter the current task
              "siteId": "jspjUbhwHVotroGFKeRChlriwxlftkxH",
           // Page
              "pageNo": 1,
           // Page size
              "pageSize": 10,
           // Sorting order
              "order": "desc",
           // Sorting field
           // When null, the first metrics name in metrics will be taken by default
              "orderBy": "monitorTime"
           // Filter probe results by operator, choose between this or area
              "filterIsp": "CMNET",
          }
          // Response
          {
              "requestId": "aa2431ff8cb74ba2b9a26d788209a77b",
              "code": 200,
              "result": {
           // Historical task count
                  "totalNum": 1,
           // Total probe nodes for the task
                  "sumSampleNum":66
           // Page
                  "pageNo": 1,
           // Page size
                  "pageSize": 10,
           // Sorting order
                  "order": "desc",
           // Sorting field
                  "orderBy": "monitorTime",
           // Protocol type
                  "protocolType": "HTTP",
           // Probe address
                  "url": "www.baidu.com",
           // Task type
           // NET_QUALITY   - Network quality
                  "taskType": "NET_QUALITY",
           // Filter probe results by province/city, higher priority
                  "filterArea": "beijing",
           // Filter probe results by operator, choose between this or area
                  "filterIsp": "CMNET",
           // Group ID
                  "groupId": "id",
           // Province/city collection of probe results
                  "allAreas": [
                      "hebei",
                      "tianjin",
                      "hubei",
                      "beijing",
                      "fujian"
                  ],
           // Metric overview
                  "overviewData": {
           // Those included in the protocol types of the task will only be returned in the metrics section
                      "metrics": {
           // Connection establishment time
                          "connectTime": 17.2,
           // DNS resolution event
                          "dnsTime": 0.005
                      },
           // Availability rate
                      "success": 89,
           // Total probe nodes
                      "sumSampleNum": 7,
           // Success count
                      "rightSampleNum": 7,
           // Failure count
                      "errSampleNum": 0
                  },
           // Probe details, probe node list
                  "detailData": [
                      {
           // Probe node data ID
                          "id": 123,
           // Region
                          "region":"EAST",
           // Region
                          "agentProv": "shanghai",
           // Operator
                          "agentIsp": "CHINANET",
           // Probe IP
                          "clientId": "122.137.20.16.1",
           // Target IP for probe
                          "remoteAddr": "220.181.38.150",
           // Probe IP city
           "clientCity": "Shanghai",
           // Location of resolved IP
           "remoteCity": "Baoding",
           // Province of resolved IP
           "remoteArea": "Hebei",
           // County/district of resolved IP
           "remoteCounty": "Shunping",
           // Protocol type: ipv4/ipv6
                          "ipProtocol": "ipv4",
           // Task URL
                          "url": "www.baidu.com",
           // DNS resolved result
                          "analysisResult": [
                              "112.53.42.114",
                              "112.53.42.52",
                              "2402:4e00:1020:1404:0:9227:71a3:83d2",
                              "2402:4e00:1020:1404:0:9227:71ab:2b74",
                              "ins-r23tsuuf.ias.tencent-cloud.net."
                          ],
           // Metrics corresponding to protocol type
                          "metrics": {
           // DND resolution time
                              "dnsTime": 0.02,
           // Packet loss rate
                              "packetLostRate": 0,
           // Connection establishment time
                              "connectTime": 44,
           // Redirection time
                              "redirectTime": 0,
           // Total task duration
                              "totalTime": 395
                          },
           // Availability rate
                          "success": 100,
           // Probe time
                          "monitorTime": "2023-03-06 10:40:55",
           // Task status
           // PROBING - in progress
           // FINISH   - completed
           // FAILED   - failed
                          "status": "FINISH"
                      }
                  ]
              },
              "success": true,
              "message": "success"
          }

          Reprobe

          Request structure

          • Method:POST
          • URL:/csm/api/v1/site/once/createFromTask

          Request parameters

          Name Types Description Required or not Parameter location
          userId String User ID Yes RequestBody
          siteId String ID displayed in Task Details, group results need to filter the current task Yes RequestBody

          Response example

          POST /csm/api/v1/site/once/createFromTask
          {
           // Task ID to be reprobed
              "siteId": "SVierfbmcidTWxysYCsvsHwANzaFh***",
           // User ID
              "userId": "a0d04d7c202140cb80155ff7b6752***",
          }
          // Response
          {
              "requestId": "10c6cc006a544477918e3440e4a8b026",
              "message": "",
              "success": true,
              "result": {
           // New task ID
                  "siteId": "LToOrLqHTPhrhTRppTzHJAtMtPNhrmHL",
           // Group ID, used to obtain historical probe
                  "groupId": "dadb06bb-bffe-449d-99b6-d52af98634d4"
              },
              "code": 200
          }

          Historical probe list

          Request structure

          • Method:POST
          • URL:/csm/api/v1/site/once/groupTaskList

          Request parameters

          Name Types Description Required or not Parameter location
          userId String User ID No RequestBody
          siteId String ID displayed in Task Details, group results need to filter the current task No RequestBody
          groupId String Group ID No RequestBody

          Response example

          POST /csm/api/v1/site/once/groupTaskList
          {
           // User ID
              "userId": "453bf9588c9e488f9ba2c984129090dc",
           // Group ID
              "groupId": "de3cf1fa-a53c-45b0-a331-6a054218b1e4",
           // ID of the current probe task, which should be filtered out in the historical probe list
              "siteId" : "YjrgZFVzXOidYPSgkOzSJZAKuazZAKGH",
          }
          // Response
          {
              "requestId": "8075cc28167807369286310353357a",
              "code": 200,
              "result": {
                  "taskList": [
                      {
           // Task ID
                          "siteId": "YjrgZFVzXOidYPSgkOzSJZAKuazZAKGH",
           // Group ID, used for querying historical probe
                          "groupId":"de3cf1fa-a53c-45b0-a331-6a054218b1e4",
           // Probe address
                          "url": "www.baidu.com",
           // Creation time
                          "createTime": "2023-03-06 10:40:14",
                      }
                  ],
           // Total records
                  "totalCount": 1
              },
              "success": true,
              "message": "success"
          }

          Probe node API

          Get the current probe node

          Request structure

          • Method:GET
          • URL:/csm/api/v1/site/once/siteAgent

          Request parameters

          Name Types Description Required or not Parameter location
          userId String User ID Yes Query
          ipType String IP type, either ipv6 or ipv4 No Query

          Response example

          GET /csm/api/v1/site/once/siteAgent?userId=453bf9588c9e488f9ba2c984129090dc
          // Response
          {
              "requestId": "6d1cfdc92bc14f99862e1b7fa05713a5",
              "success": true,
              "result": {
                  {
                      "whiteUser": true,
                      "siteAgents": [
                          {
                              "agentId": "shandong-CMNET",
           "agentName": "Shandong Branch of China Mobile",
           // NORTH -- North China
           // EAST      -- East China
           // SOUTH     -- South China
           // NORTHEAST -- Northeast China
           // CENTRAL   -- Central China
           // NORTHWEST -- Northwest China
           // SOUTHWEST -- Southwest China
                              "region": "EAST"
           // Valid ipv4 probe nodes
                              "status": 10,
           // Valid ipv6 probe nodes
                              "ipv6Status": 1,
                          },
                          {
                              "agentId": "xizang-CMNET",
           "agentName": "Tibet Branch of China Mobile",
                              "region": "NORTHWEST"
                              "status": 10,
                              "ipv6Status": 1,
                          }
                      ]
                  },
                  "code": 200
             }
          Previous
          Instance Group Interface
          Next
          Notification Template