You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/rest.md
+17-5Lines changed: 17 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,17 +4,19 @@ This is the CopyCommander2 Rest API Documentation.
4
4
5
5
CopyCommander REST API only supports JSON as data format. To see how to enable / setup the REST functionality visit the [rest api](how_to_use.md#rest-api) section in the how_to_use document.
6
6
7
-
There are 2 kinds of paths supported by CopyCommander2
7
+
There are 2 kinds of paths supported by CopyCommander2.
8
8
9
9
#### Normal paths:
10
10
Normal paths are always available and can be used to get status, start jobs, ...
11
11
12
12
#### Zombie paths:
13
13
Zombie paths are used to control the application (visible to the user), to enable these paths you need to pass in a extra command line paramter.
14
14
15
+
## List of available methods / paths
15
16
| Method | Overview | Kind | Description
16
17
| --- | --- | --- | --- |
17
18
| GET | [/API/status](#get-apistatus) | normal | get current state of application
19
+
| GET | [/API/view/list](#get-apiviewlist) | normal | get list of content from a spezific view
18
20
| POST | [/API/zombie/setdir](#post-apizombiesetdir) | zombie | set directory path for left or right view
19
21
20
22
## GET /API/status
@@ -27,6 +29,10 @@ Returns the current status of the application.
27
29
**Path:**`/API/status`
28
30
**Content-Type:** Not applicable
29
31
32
+
### Query Parameters
33
+
34
+
none
35
+
30
36
### Response
31
37
32
38
**Content-Type:**`application/json`
@@ -40,6 +46,12 @@ Returns the current status of the application.
40
46
|`LeftDir`| string | Path to the left directory |
41
47
|`RightDir`| string | Path to the right directory |
42
48
49
+
### Example Request
50
+
51
+
```
52
+
GET /API/status
53
+
```
54
+
43
55
### Example Response
44
56
45
57
```json
@@ -111,11 +123,11 @@ Sets the directory path for either the left or right view.
111
123
**Path:**`/API/zombie/setdir`
112
124
**Content-Type:**`application/json`
113
125
114
-
### Request Schema
126
+
### Post Request Schema
115
127
116
128
| Field | Type | Required | Description |
117
129
|-------|------|----------|-------------|
118
-
|`view`| string |Yes| Must be either "left" or "right" |
130
+
|`view`| string |No| Must be either "left" or "right", default (left)|
119
131
|`dir`| string | Yes | Directory path to set |
120
132
121
133
### Example Request
@@ -127,8 +139,8 @@ Sets the directory path for either the left or right view.
127
139
}
128
140
```
129
141
130
-
### Response
142
+
### Example Response
131
143
132
144
**Status Codes:**
133
145
-`204 No Content` - Directory successfully set
134
-
-`422 Unprocessable Entity` - Invalid request data / target dir, does not exist.
146
+
-`422 Unprocessable Entity` - Invalid request data / target dir, does not exist.
0 commit comments