-
Notifications
You must be signed in to change notification settings - Fork 5
/
http-api.html
134 lines (133 loc) · 25.9 KB
/
http-api.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>HTTP APIs | AutoTouch Documents</title>
<meta name="generator" content="VuePress 1.9.9">
<link rel="icon" href="/favicon.ico">
<meta name="description" content="AutoTouch official documents">
<link rel="preload" href="/assets/css/0.styles.144c1593.css" as="style"><link rel="preload" href="/assets/js/app.6767db17.js" as="script"><link rel="preload" href="/assets/js/3.5e6777c5.js" as="script"><link rel="preload" href="/assets/js/10.d28d1778.js" as="script"><link rel="prefetch" href="/assets/js/11.bb7d3036.js"><link rel="prefetch" href="/assets/js/12.959ceb5e.js"><link rel="prefetch" href="/assets/js/13.13e4f3e7.js"><link rel="prefetch" href="/assets/js/14.edb6f86e.js"><link rel="prefetch" href="/assets/js/15.82655811.js"><link rel="prefetch" href="/assets/js/4.8e8ea2dc.js"><link rel="prefetch" href="/assets/js/5.eee79492.js"><link rel="prefetch" href="/assets/js/6.171591a3.js"><link rel="prefetch" href="/assets/js/7.654f752a.js"><link rel="prefetch" href="/assets/js/8.909cdf44.js"><link rel="prefetch" href="/assets/js/9.070cd55f.js"><link rel="prefetch" href="/assets/js/vendors~flowchart.3568dda2.js">
<link rel="stylesheet" href="/assets/css/0.styles.144c1593.css">
</head>
<body>
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><img src="/img/logo.png" alt="AutoTouch Documents" class="logo"> <span class="site-name can-hide">AutoTouch Documents</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="https://autotouch.net" target="_blank" rel="noopener noreferrer" class="nav-link external">
Official Site
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Repos for Cydia" class="dropdown-title"><span class="title">Repositories</span> <span class="arrow down"></span></button> <button type="button" aria-label="Repos for Cydia" class="mobile-dropdown-title"><span class="title">Repositories</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://beta.autotouch.net" target="_blank" rel="noopener noreferrer" class="nav-link external">
Beta Repo
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://apt.autotouch.net" target="_blank" rel="noopener noreferrer" class="nav-link external">
Official Repo
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div><div class="nav-item"><a href="https://license.autotouch.net" target="_blank" rel="noopener noreferrer" class="nav-link external">
Licenses
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="https://autotouch.net" target="_blank" rel="noopener noreferrer" class="nav-link external">
Official Site
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Repos for Cydia" class="dropdown-title"><span class="title">Repositories</span> <span class="arrow down"></span></button> <button type="button" aria-label="Repos for Cydia" class="mobile-dropdown-title"><span class="title">Repositories</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://beta.autotouch.net" target="_blank" rel="noopener noreferrer" class="nav-link external">
Beta Repo
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://apt.autotouch.net" target="_blank" rel="noopener noreferrer" class="nav-link external">
Official Repo
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div><div class="nav-item"><a href="https://license.autotouch.net" target="_blank" rel="noopener noreferrer" class="nav-link external">
Licenses
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group collapsable depth-0"><a href="/" class="sidebar-heading clickable router-link-active"><span>About AutoTouch</span> <span class="arrow right"></span></a> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><a href="/lua" class="sidebar-heading clickable"><span>Lua</span> <span class="arrow right"></span></a> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><a href="/js/" class="sidebar-heading clickable"><span>JavaScript</span> <span class="arrow right"></span></a> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><a href="/js/jsbridge" class="sidebar-heading clickable"><span>JSBridge</span> <span class="arrow right"></span></a> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><a href="/http-api" class="sidebar-heading clickable open active"><span>HTTP APIs</span> <span class="arrow down"></span></a> <ul class="sidebar-links sidebar-group-items"><li><a href="/http-api.html" aria-current="page" class="active sidebar-link">HTTP APIs</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/http-api.html#play-a-script" class="sidebar-link">Play a script</a></li><li class="sidebar-sub-header"><a href="/http-api.html#stop-playing-a-script" class="sidebar-link">Stop playing a script</a></li><li class="sidebar-sub-header"><a href="/http-api.html#list-files-in-a-directory" class="sidebar-link">List files in a directory</a></li><li class="sidebar-sub-header"><a href="/http-api.html#create-a-new-directory" class="sidebar-link">Create a new directory</a></li><li class="sidebar-sub-header"><a href="/http-api.html#create-a-new-file" class="sidebar-link">Create a new file</a></li><li class="sidebar-sub-header"><a href="/http-api.html#delete-a-file" class="sidebar-link">Delete a file</a></li><li class="sidebar-sub-header"><a href="/http-api.html#rename-a-file-or-directory" class="sidebar-link">Rename a file or directory</a></li></ul></li></ul></section></li><li><section class="sidebar-group collapsable depth-0"><a href="/release-notes" class="sidebar-heading clickable"><span>Release Notes</span> <span class="arrow right"></span></a> <!----></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="http-apis"><a href="#http-apis" class="header-anchor">#</a> HTTP APIs</h1> <p><code>Applicable to version 6.1.8 or higher</code></p> <hr> <h1 id="http-apis-2"><a href="#http-apis-2" class="header-anchor">#</a> HTTP APIs</h1> <blockquote><p>There is a series of HTTP APIs for AutoTouch controlling in Local Area Netowork, they are the same APIs <code>Web Server</code> in AutoTouch Settings is using.</p></blockquote> <h2 id="play-a-script"><a href="#play-a-script" class="header-anchor">#</a> Play a script</h2> <blockquote><p>GET /control/start_playing?path=/scriptPath</p></blockquote> <p><code>Parameters</code></p> <table><thead><tr><th>Parameter</th> <th>Specification</th></tr></thead> <tbody><tr><td>path</td> <td>Script path.</td></tr></tbody></table> <p><code>Return</code></p> <p>Successful:</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">"status"</span><span class="token operator">:</span> <span class="token string">"success"</span>
<span class="token punctuation">}</span>
</code></pre></div><p>Failed:</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">"status"</span><span class="token operator">:</span> <span class="token string">"fail"</span><span class="token punctuation">,</span>
<span class="token property">"info"</span><span class="token operator">:</span> <span class="token string">""</span>
<span class="token punctuation">}</span>
</code></pre></div><p><code>Examples</code></p> <div class="language- extra-class"><pre class="language-text"><code>HTTP GET http://192.168.1.99:8080/control/start_playing?path=/scriptPath
</code></pre></div><div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">"status"</span><span class="token operator">:</span> <span class="token string">"fail"</span><span class="token punctuation">,</span>
<span class="token property">"info"</span><span class="token operator">:</span> <span class="token string">"Script doesn't exist."</span>
<span class="token punctuation">}</span>
</code></pre></div><h2 id="stop-playing-a-script"><a href="#stop-playing-a-script" class="header-anchor">#</a> Stop playing a script</h2> <blockquote><p>GET /control/stop_playing?path=/scriptPath</p></blockquote> <p><code>Parameters</code></p> <table><thead><tr><th>Parameter</th> <th>Specification</th></tr></thead> <tbody><tr><td>path</td> <td>Script path.</td></tr></tbody></table> <p><code>Return</code></p> <p>Successful:</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">"status"</span><span class="token operator">:</span> <span class="token string">"success"</span>
<span class="token punctuation">}</span>
</code></pre></div><p>Failed:</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">"status"</span><span class="token operator">:</span> <span class="token string">"fail"</span><span class="token punctuation">,</span>
<span class="token property">"info"</span><span class="token operator">:</span> <span class="token string">""</span>
<span class="token punctuation">}</span>
</code></pre></div><p><code>Examples</code></p> <div class="language- extra-class"><pre class="language-text"><code>HTTP GET http://192.168.1.99:8080/control/start_playing?path=/scriptPath
</code></pre></div><div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">"status"</span><span class="token operator">:</span> <span class="token string">"fail"</span><span class="token punctuation">,</span>
<span class="token property">"info"</span><span class="token operator">:</span> <span class="token string">"Script doesn't exist."</span>
<span class="token punctuation">}</span>
</code></pre></div><h2 id="list-files-in-a-directory"><a href="#list-files-in-a-directory" class="header-anchor">#</a> List files in a directory</h2> <blockquote><p>GET /files?path=/Records</p></blockquote> <p><code>Parameters</code></p> <table><thead><tr><th>Parameter</th> <th>Specification</th></tr></thead> <tbody><tr><td>path</td> <td>Directory path to list.</td></tr></tbody></table> <p><code>Return</code></p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">"files"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
<span class="token punctuation">{</span>
<span class="token property">"filePath"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
<span class="token property">"fileSize"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
<span class="token property">"iconName"</span><span class="token operator">:</span> <span class="token string">""</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
...
<span class="token punctuation">]</span>
<span class="token punctuation">}</span>
</code></pre></div><p><code>Examples</code></p> <div class="language- extra-class"><pre class="language-text"><code>HTTP GET http://192.168.1.99:8080/files?path=/Records
</code></pre></div><div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">"files"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
<span class="token punctuation">{</span>
<span class="token property">"filePath"</span><span class="token operator">:</span> <span class="token string">"/Records/2019-03-10: 12:00:00.lua"</span><span class="token punctuation">,</span>
<span class="token property">"fileSize"</span><span class="token operator">:</span> <span class="token string">"12kb"</span><span class="token punctuation">,</span>
<span class="token property">"iconName"</span><span class="token operator">:</span> <span class="token string">"script"</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
...
<span class="token punctuation">]</span>
<span class="token punctuation">}</span>
</code></pre></div><h2 id="create-a-new-directory"><a href="#create-a-new-directory" class="header-anchor">#</a> Create a new directory</h2> <blockquote><p>GET /file/newFolder?path=/Test</p></blockquote> <p><code>Parameters</code></p> <table><thead><tr><th>Parameter</th> <th>Specification</th></tr></thead> <tbody><tr><td>path</td> <td>New Directory path to create.</td></tr></tbody></table> <p><code>Return</code></p> <p>Successful:</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">"status"</span><span class="token operator">:</span> <span class="token string">"success"</span>
<span class="token punctuation">}</span>
</code></pre></div><p>Failed:</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">"status"</span><span class="token operator">:</span> <span class="token string">"fail"</span><span class="token punctuation">,</span>
<span class="token property">"info"</span><span class="token operator">:</span> <span class="token string">""</span>
<span class="token punctuation">}</span>
</code></pre></div><p><code>Examples</code></p> <div class="language- extra-class"><pre class="language-text"><code>HTTP GET http://192.168.1.99:8080/file/newFolder?path=/Test
</code></pre></div><div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">"status"</span><span class="token operator">:</span> <span class="token string">"success"</span>
<span class="token punctuation">}</span>
</code></pre></div><h2 id="create-a-new-file"><a href="#create-a-new-file" class="header-anchor">#</a> Create a new file</h2> <blockquote><p>GET /file/new?path=/newFilePath</p></blockquote> <p><code>Parameters</code></p> <table><thead><tr><th>Parameter</th> <th>Specification</th></tr></thead> <tbody><tr><td>path</td> <td>New file path to make.</td></tr></tbody></table> <p><code>Return</code></p> <p>Successful:</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">"status"</span><span class="token operator">:</span> <span class="token string">"success"</span>
<span class="token punctuation">}</span>
</code></pre></div><p>Failed:</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">"status"</span><span class="token operator">:</span> <span class="token string">"fail"</span><span class="token punctuation">,</span>
<span class="token property">"info"</span><span class="token operator">:</span> <span class="token string">""</span>
<span class="token punctuation">}</span>
</code></pre></div><p><code>Examples</code></p> <div class="language- extra-class"><pre class="language-text"><code>HTTP GET http://192.168.1.99:8080/file/new?path=/newFilePath
</code></pre></div><div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">"status"</span><span class="token operator">:</span> <span class="token string">"fail"</span><span class="token punctuation">,</span>
<span class="token property">"info"</span><span class="token operator">:</span> <span class="token string">"Invalid file path"</span>
<span class="token punctuation">}</span>
</code></pre></div><h2 id="delete-a-file"><a href="#delete-a-file" class="header-anchor">#</a> Delete a file</h2> <blockquote><p>GET /file/delete?path=/filePathToDelete</p></blockquote> <p><code>Parameters</code></p> <table><thead><tr><th>Parameter</th> <th>Specification</th></tr></thead> <tbody><tr><td>path</td> <td>File path to delete.</td></tr></tbody></table> <p><code>Return</code></p> <p>Successful:</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">"status"</span><span class="token operator">:</span> <span class="token string">"success"</span>
<span class="token punctuation">}</span>
</code></pre></div><p>Failed:</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">"status"</span><span class="token operator">:</span> <span class="token string">"fail"</span><span class="token punctuation">,</span>
<span class="token property">"info"</span><span class="token operator">:</span> <span class="token string">""</span>
<span class="token punctuation">}</span>
</code></pre></div><p><code>Examples</code></p> <div class="language- extra-class"><pre class="language-text"><code>HTTP GET http://192.168.1.99:8080/file/delete?path=/filePathToDelete
</code></pre></div><div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">"status"</span><span class="token operator">:</span> <span class="token string">"fail"</span><span class="token punctuation">,</span>
<span class="token property">"info"</span><span class="token operator">:</span> <span class="token string">"Invalid file path"</span>
<span class="token punctuation">}</span>
</code></pre></div><h2 id="rename-a-file-or-directory"><a href="#rename-a-file-or-directory" class="header-anchor">#</a> Rename a file or directory</h2> <blockquote><p>GET /file/rename?path=/oldFilePath&newPath=newFilePath</p></blockquote> <p><code>Parameters</code></p> <table><thead><tr><th>Parameter</th> <th>Specification</th></tr></thead> <tbody><tr><td>path</td> <td>Old path.</td></tr> <tr><td>newPath</td> <td>New path.</td></tr></tbody></table> <p><code>Return</code></p> <p>Successful:</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">"status"</span><span class="token operator">:</span> <span class="token string">"success"</span>
<span class="token punctuation">}</span>
</code></pre></div><p>Failed:</p> <div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">"status"</span><span class="token operator">:</span> <span class="token string">"fail"</span><span class="token punctuation">,</span>
<span class="token property">"info"</span><span class="token operator">:</span> <span class="token string">""</span>
<span class="token punctuation">}</span>
</code></pre></div><p><code>Examples</code></p> <div class="language- extra-class"><pre class="language-text"><code>HTTP GET http://192.168.1.99:8080/file/rename?path=/oldFilePath&newPath=newFilePath
</code></pre></div><div class="language-json extra-class"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">"status"</span><span class="token operator">:</span> <span class="token string">"fail"</span><span class="token punctuation">,</span>
<span class="token property">"info"</span><span class="token operator">:</span> <span class="token string">"Invalid file path"</span>
<span class="token punctuation">}</span>
</code></pre></div><p><a href="#http-apis">Top</a></p></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">Last Updated:</span> <span class="time">a year ago</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
←
<a href="/js/jsbridge.html" class="prev">
JSBridge
</a></span> <span class="next"><a href="/release-notes/">
Release Notes
</a>
→
</span></p></div> </main></div><div class="global-ui"><!----></div></div>
<script src="/assets/js/app.6767db17.js" defer></script><script src="/assets/js/3.5e6777c5.js" defer></script><script src="/assets/js/10.d28d1778.js" defer></script>
</body>
</html>