Skip to content

[Mobile Synthetic Test] Node Selection Template List



GET /api/v1/dialing_task/mobile/templates

Overview

Reads the list of mobile synthetic test node selection templates in the current workspace.

Before Calling and Usage Steps

Reads the saved snapshot and does not access the execution platform in real time; it can still be read when the mobile synthetic test switch is off. If no list is configured, [] is returned; there is no pagination and no guaranteed order, and the maximum count is controlled by the save endpoint. A template contains only a name and node selection, not HTTP/TCP targets or protocol configurations. When using it, copy nodeSelection to a new task.

selectedNodeMappings only supplements static display information for nodes; it can be empty for groups or when mappings are missing. A successful read does not guarantee that these IDs are currently online. Use the templateUUID in the current workspace for editing/deletion; modifying a template does not automatically update saved tasks.

Request Headers

Parameter Name Type Required Description
DF-API-KEY string Y OpenAPI authentication credential for the workspace.
Example: <DF-API-KEY>
How to obtain or enter: Obtain an OpenAPI Key with this operation permission from API Key Management in the target workspace.

Additional Parameter Notes

Each returned template item includes a selectedNodeMappings array. Its elements reuse resources.nodes[].mapping: nodeId:string, continent/country/province/city/operator:{code,zh,en}|null, network/client_type:string. Only the current database display mappings for nodeSelection.ids are retrieved; IDs are converted to strings and deduplicated, and those not found are skipped. If mappings are missing or the mode is groups, [] is returned. Display information does not indicate real-time availability; mappings are read only once per list batch. This field is read-only and not persisted, and should not be sent back on save; the existing real-time resource and selection validity checks remain unchanged.

Request Example

curl --get 'https://openapi.guance.com/api/v1/dialing_task/mobile/templates' \
  -H 'DF-API-KEY: <DF-API-KEY>'

Response

HTTP 200, application/json. The example below shows the main fields that can be read directly.

Field Type Description
content array<object> Array of workspace templates; [] if no configuration.
content[].templateUUID string dsel_ template UUID within the workspace, not a task or node ID.
content[].name string Template name after trimming.
content[].nodeSelection object Saved node selection snapshot, copied to a task, not a real-time reference.
content[].nodeSelection.mode string nodes/groups.
content[].nodeSelection.ids array<string> Non-empty array of original node or group IDs without duplicates; duplicates are rejected before saving, original IDs/order are preserved, and region UUIDs cannot be passed.
content[].nodeSelection.ids[] string Corresponding resource ID.
content[].nodeSelection.sampleCount integer Number of independent samples per node, 1..5.
content[].selectedNodeMappings array<object> Selected static mappings for nodes only; real-time availability is not queried; [] when missing or in groups mode.
content[].selectedNodeMappings[].nodeId string Node ID as a string.
content[].selectedNodeMappings[].network string Static network type.
content[].selectedNodeMappings[].client_type string Static client type.
content[].selectedNodeMappings[].continent object or null Static region/operator label; province can be null.
content[].selectedNodeMappings[].continent.code string Source code.
content[].selectedNodeMappings[].continent.zh string Chinese name.
content[].selectedNodeMappings[].continent.en string English name.
content[].selectedNodeMappings[].country object or null Static region/operator label; province can be null.
content[].selectedNodeMappings[].country.code string Source code.
content[].selectedNodeMappings[].country.zh string Chinese name.
content[].selectedNodeMappings[].country.en string English name.
content[].selectedNodeMappings[].province object or null Static region/operator label; province can be null.
content[].selectedNodeMappings[].province.code string Source code.
content[].selectedNodeMappings[].province.zh string Chinese name.
content[].selectedNodeMappings[].province.en string English name.
content[].selectedNodeMappings[].city object or null Static region/operator label; province can be null.
content[].selectedNodeMappings[].city.code string Source code.
content[].selectedNodeMappings[].city.zh string Chinese name.
content[].selectedNodeMappings[].city.en string English name.
content[].selectedNodeMappings[].operator object or null Static region/operator label; province can be null.
content[].selectedNodeMappings[].operator.code string Source code.
content[].selectedNodeMappings[].operator.zh string Chinese name.
content[].selectedNodeMappings[].operator.en string English name.
content[].declaration object Common declaration for each non-empty template.
{
  "code": 200,
  "content": [
    {
      "templateUUID": "dsel_example",
      "name": "生产节点",
      "nodeSelection": {
        "mode": "nodes",
        "ids": [
          "NODE-ID"
        ],
        "sampleCount": 1
      },
      "selectedNodeMappings": [],
      "declaration": {}
    }
  ],
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Responses

For authentication, rate limiting, and common request errors, see Common Error Definitions.

HTTP Status errorCode Trigger Condition Message or Response Description Resolution
500 ft.InternalServerError Storage read, historical configuration, or local static mapping formatting exception Internal error Narrow down to a specific task/template or filter; if it persists, retain traceId to check the read phase.

Feedback

Is this page helpful?