{"id":1031,"date":"2026-10-26T16:13:12","date_gmt":"2026-10-26T16:13:12","guid":{"rendered":"https:\/\/phonefarm.tech\/?st-import=290f971b6cbe949e58a118f3e1528b96"},"modified":"2026-10-27T10:15:12","modified_gmt":"2026-10-27T10:15:12","slug":"api-action-create-execute-script","status":"publish","type":"post","link":"https:\/\/phonefarm.tech\/es\/api-action-create-execute-script\/","title":{"rendered":"actionCreate: Execute Action Script"},"content":{"rendered":"<p>Trigger and schedule recorded action scripts across specified devices.<\/p>\n<h2>Request Parameters<\/h2>\n<table class=\\\"wp-block-table\\\">\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Type<\/th>\n<th>Required<\/th>\n<th>Example<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>action<\/td>\n<td>string<\/td>\n<td>Yes<\/td>\n<td>\\&#8221;actionCreate\\&#8221;<\/td>\n<td>Command action name.<\/td>\n<\/tr>\n<tr>\n<td>devices<\/td>\n<td>string<\/td>\n<td>Yes<\/td>\n<td>\\&#8221;all\\&#8221; | \\&#8221;serial\\&#8221;<\/td>\n<td>Target devices.<\/td>\n<\/tr>\n<tr>\n<td>data[0].actionName<\/td>\n<td>string<\/td>\n<td>Yes<\/td>\n<td>\\&#8221;Workflow 1\\&#8221;<\/td>\n<td>Action script name.<\/td>\n<\/tr>\n<tr>\n<td>data[0].count<\/td>\n<td>int<\/td>\n<td>Yes<\/td>\n<td>2<\/td>\n<td>Number of repeat executions.<\/td>\n<\/tr>\n<tr>\n<td>data[0].startTimes<\/td>\n<td>array<\/td>\n<td>No<\/td>\n<td>[\\&#8221;2026-10-10 12:00:00\\&#8221;]<\/td>\n<td>Optional scheduled start times.<\/td>\n<\/tr>\n<tr>\n<td>data[0].taskInterval<\/td>\n<td>array<\/td>\n<td>Yes<\/td>\n<td>[1000, 5000]<\/td>\n<td>Random delay interval range (ms).<\/td>\n<\/tr>\n<tr>\n<td>data[0].deviceInterval<\/td>\n<td>string<\/td>\n<td>Yes<\/td>\n<td>1000<\/td>\n<td>Stagger interval between devices (ms).<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Request Example<\/h2>\n<pre><code class=\\\"language-json\\\">{\n  \\\"action\\\": \\\"actionCreate\\\",\n  \\\"devices\\\": \\\"all\\\",\n  \\\"data\\\": [\n    {\n      \\\"actionName\\\": \\\"Workflow 1\\\",\n      \\\"count\\\": 2,\n      \\\"startTimes\\\": [\\\"2026-10-10 13:25:10\\\"],\n      \\\"taskInterval\\\": [1000, 5000],\n      \\\"deviceInterval\\\": 1000\n    }\n  ]\n}<\/code><\/pre>\n<h2>Response Example<\/h2>\n<pre><code class=\\\"language-json\\\">{\n  \\\"code\\\": 10000,\n  \\\"message\\\": \\\"SUCCESS\\\",\n  \\\"data\\\": null\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Trigger and schedule recorded action scripts across specified devices. Request Parameters Parameter Type Required Example Description action string Yes \\&#8221;actionCreate\\&#8221; [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":3789,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[55],"tags":[118,116,119],"class_list":["post-1031","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-task-automation","tag-actions","tag-automation","tag-run"],"_links":{"self":[{"href":"https:\/\/phonefarm.tech\/es\/wp-json\/wp\/v2\/posts\/1031","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/phonefarm.tech\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/phonefarm.tech\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/phonefarm.tech\/es\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/phonefarm.tech\/es\/wp-json\/wp\/v2\/comments?post=1031"}],"version-history":[{"count":2,"href":"https:\/\/phonefarm.tech\/es\/wp-json\/wp\/v2\/posts\/1031\/revisions"}],"predecessor-version":[{"id":3899,"href":"https:\/\/phonefarm.tech\/es\/wp-json\/wp\/v2\/posts\/1031\/revisions\/3899"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/phonefarm.tech\/es\/wp-json\/wp\/v2\/media\/3789"}],"wp:attachment":[{"href":"https:\/\/phonefarm.tech\/es\/wp-json\/wp\/v2\/media?parent=1031"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phonefarm.tech\/es\/wp-json\/wp\/v2\/categories?post=1031"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phonefarm.tech\/es\/wp-json\/wp\/v2\/tags?post=1031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}