Skip to content

Disable/Enable



POST /api/v1/dialing_task/set_disable

Overview

Enable or stop Synthetic Tests in batches.

Prerequisites and Usage Steps

First verify the configuration and current state using the list/get endpoint, then set them in batches. For regular tasks, resubmit the current full configuration and commit item by item; enabling DNS validates the DNS structure/variables again. Before enabling mobile, the entire batch is prechecked to ensure HTTP uses HTTPS, and the terms are checked; each item is still checked again before actual enablement. Enabling mobile first syncs the current configuration and then sends the switch. Disabling does not require the mobile service to be currently enabled or the terms to be accepted again, but a valid platform binding is still required; it is not a local switch with no remote call.

By default, only non-deleted matching objects in the current workspace are processed; an empty array or a batch with no matches can succeed with true, and no per-item match list is returned. Cross-task/remote and local operations are not an atomic batch: if an earlier item has been committed and a later item fails, the entire batch is not rolled back. After an error, first read back each task.status and check list existence; mobile remoteStatus is always unknown, which does not mean it was not executed. Verify the platform using the error taskUUID/outcomeUnknown. Avoid blind concurrent retries for unknown results.

This OpenAPI module does not have a public endpoint with the same name as Front debugging/import, so do not construct a guessed URL based on it. Enabling a configuration does not mean measurement results have been obtained or notifications have been delivered.

Legacy regular HTTP/TCP/ICMP/SSL/multi/browser/NetPath may still trigger their type validation when a stop or delete is dispatched. Only DNS stop/delete skips the DNS contract; TCP stop/delete only requires the success_when key and does not revalidate timeout/connection. Do not uniformly describe stop/delete as ignoring legacy configurations.

Request Headers

Parameter 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 the required permission for this operation from API Key Management in the target workspace.

Body Request Parameters

Parameter Type Required Description
taskUUIDs[*] string Not a task name, node, or upstream taskId.
Example: dial_example
How to obtain or enter: Take the UUID of a single task in the current workspace.
isDisable boolean Y Required boolean; updates task.status=stop/ok; does not delete the entity or raw synthetic test history.
Allows null: False
Example: true
How to obtain or enter: true to stop, false to enable.
taskUUIDs array Y Required array; recommended to be non-empty; select only dial_ tasks and do not mix in nodes/templates/remote IDs. Non-matching or deleted UUIDs are not reported per item.
Allows null: False
Example: ["dial_example"]
How to obtain or enter: Obtain the UUIDs of non-deleted tasks in the current workspace from the Synthetic Test list.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/dialing_task/set_disable' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"taskUUIDs":["dial_example"],"isDisable":true}'

Response

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

Field Type Description
content boolean true on success; this is not the number of matches/per-item results, and it does not guarantee that the remote end has completed an execution.
{
  "code": 200,
  "content": true,
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Responses

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

The regular SDK maps dialtesting.invalidRegion to ft.DialingRegionError and preserves the actual HTTP status; other downstream 4xx responses preserve the actual HTTP status and error_code/message, and unlisted codes may also occur; regular 5xx responses are uniformly returned as 500 ft.InternalServerError. Mobile failures may include taskUUID/remoteStatus/outcomeUnknown, and earlier items may have been committed when an error is returned. Stop/delete does not force revalidation of the current creation contract for all historical tasks, and this must not be taken to mean that legacy configurations can be re-enabled.

HTTP Status errorCode Trigger Condition Message or Response Description Handling
406 ft.ParameterValidationFailed The request field is missing, or the field value violates the declared validation conditions Parameter parsing failed Verify the parameter location, field name, type, and value.
400 ft.RequestJsonFormatError The request JSON syntax is invalid Request JSON format error Correct the JSON according to content.reason, line, and column.
400 ft.JsonFormatError The body top level is not an object Partial JSON file format error Submit a JSON object containing taskUUIDs and the corresponding switch.
409 ft.MobileDialingOperationBusy A batch containing mobile tasks timed out waiting for the workspace concurrent operation lock; this operation was not executed Another operation is currently in progress in this workspace. This operation was not executed. Please try again later. Retry with backoff according to retryable/operationExecuted.
404 ft.NotFoundDialTask The original mobile task was deleted or the set changed during the wait The specified Synthetic Test was not found Re-read the current list and then select the target.
406 ft.NotFoundWorkspace The target workspace for writing no longer exists The specified workspace was not found Confirm the workspace is valid, and do not retry on a released workspace.
406 ft.DialingBrandNoSetError Regular task dispatch is missing the corresponding service configuration No synthetic testing configuration is set for the {} brand. Have an administrator verify the workspace's synthetic testing service.
400 ft.DialingAKNoSetError Signature information is missing for regular synthetic testing dispatch Synthetic testing AK information is not configured. Check the Launcher activation configuration. Have an administrator verify service activation.
400 ft.DialingServerError Mobile platform binding/remote call failed, or a regular downstream 400 failed Synthetic testing service API call failed Check content.reason/taskUUID/outcomeUnknown and the committed subset to avoid duplicate operations.
400 ft.DialingRegionError A regular synthetic testing downstream 400 determines that a node is invalid Some synthetic testing nodes for the current task are invalid. Update the configuration and save it again. Check the invalid nodes and current task status; stop/delete has a different intent from reconfiguration, and an administrator should handle it if necessary.
500 ft.InternalServerError Regular downstream 5xx/connection exception or an uncaught database, configuration format, or reference handling error Internal error Read back the committed subset and remote status, provide traceId, and handle it by stage.
400 ft.ParamsValidateError Enabling mobile HTTP that is not HTTPS, enabling invalid DNS/TCP configuration, or legacy NetPath/browser not conforming to the contract before enable/stop dispatch Parameter validation failed: {} Fix according to the actual type; DNS stop/delete skips the DNS contract, and TCP stop/delete only checks success_when and does not revalidate all connection conditions.
403 ft.MobileDialTermsNotAccepted The workspace has not accepted the terms before mobile enablement The workspace Owner or administrator must first accept the mobile synthetic testing terms of use. The logged-in workspace Owner/administrator must read and accept them.
400 ft.InvalidAction The capability is not enabled when enabling mobile, or the current operation state does not allow it Invalid operation Check reason and have an administrator confirm availability; stop/delete can still be attempted in the disabled state.
404 ft.ObjectNotExists A variable referenced when enabling DNS does not belong to the valid set of the current workspace The specified object does not exist Fix the variable reference first.
406 ft.InvalidCrontabFormat Legacy NetPath schedule_type=crontab with an invalid expression; it is still validated before enable/stop/delete dispatch Invalid crontab format Correct the full NetPath configuration first or have an administrator handle it; NetPath does not have the DNS/TCP exemption from validation on exit.
406 ft.MissingSuccessWhen Legacy regular HTTP has no script substitute, or saved configurations such as TCP/ICMP/SSL are missing success_when; stop/delete may also validate The usable condition success_when is missing Check the legacy configuration and protocol first. DNS stop/delete skips the DNS contract, and TCP stop/delete still requires this key.
406 ft.MissingMethod Regular HTTP or Multistep HTTP saved steps are missing method, including stop/delete dispatch Request method method is not specified Repair the full legacy configuration or have an administrator handle the abnormal task before proceeding.
400 ft.MissingCustomParameters SSL saved configuration is missing host/port, or required strict NetPath fields are missing {} field is missing Fix according to the original type; stop/delete does not uniformly skip these checks.
406 ft.FirstStepsNotWait An existing Multistep configuration has wait as the first step, and validation fails before re-dispatch or delete/stop Invalid step parameter; the first step cannot be wait Correct the Multistep process or have an administrator handle the legacy configuration.
406 ft.InvalidDialingTask The legacy browser script is empty/invalid, or the legacy multi HTTP step name/URL is invalid Invalid task parameter In the current OpenAPI, browser writes are restricted by an allowlist; repair through a supported entry point/administrator and then retry.

Feedback

Is this page helpful?