[Mobile Synthetic Testing] Node Selection Template Details¶
GET /api/v1/dialing_task/mobile/templates/{template_uuid}
Overview¶
Read a single mobile synthetic testing node selection template.
Before Calling and Usage Steps¶
Reads a saved snapshot and does not access the execution platform in real time; it can still be read when the mobile synthetic testing switch is disabled. If the list is not configured, [] is returned; there is no pagination and no guaranteed ordering, and the maximum count is controlled by the save API. A template contains only a name and a node selection, not HTTP/TCP targets or protocol configuration. When using it, copy nodeSelection into a new task.
selectedNodeMappings only supplements static display information for nodes; in groups mode or when mappings are missing, it may be empty. A successful read does not guarantee that these IDs are currently online. For edit/delete, use the templateUUID in the current workspace; modifying a template does not automatically update saved tasks.
Path Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| template_uuid | string | Y | Not a task UUID or a member of nodeSelection.ids. Example: dsel_exampleHow to obtain or enter: Get the templateUUID in the current workspace from the node selection template list. |
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 permission for this operation 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 items that cannot be found are skipped; missing mappings or groups mode returns []. Display information does not indicate real-time availability; the mapping is read only once per list batch. This field is read-only and not persisted, and should not be sent back when saving; the original real-time resource and selection validity checks remain unchanged.
Request Example¶
curl --get 'https://openapi.guance.com/api/v1/dialing_task/mobile/templates/dsel_example' \
-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.templateUUID | string | Template UUID in the dsel_ workspace, not a task or node ID. |
| content.name | string | Trimmed template name. |
| content.nodeSelection | object | Saved node selection snapshot that is 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 with no 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> | Static mappings of selected nodes only; real-time availability is not queried; [] when missing or in groups mode. |
| content.selectedNodeMappings[].nodeId | string | Node string ID. |
| 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 may 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 may 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 may 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 may 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 may 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. |
{
"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 Response¶
For authentication, rate limiting, and common request errors, see Common Error Definitions.
| HTTP Status | errorCode | Trigger Condition | Message or Response Description | Handling |
|---|---|---|---|---|
| 400 | ft.ParamsValidateError | Identifier, node selection structure/range, name, template count, or protocol parameters do not conform to the current contract | Parameter validation failed: {} | Correct according to message and the optional content.reason/field; first retrieve the target again from the list in the current workspace. |
| 500 | ft.InternalServerError | Exception in storage read, historical configuration, or local static mapping formatting | Internal error | Narrow it down to a specific task/template or filter; if the failure persists, retain the traceId to check the read phase. |