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: README.md
+19-8Lines changed: 19 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -158,24 +158,35 @@ Structured success output is rolling out command by command. Currently migrated
158
158
159
159
Command results and JSON errors are written to stdout. Status, progress, human-facing warnings, diagnostics, and verbose logs are written to stderr. JSON errors include a `warnings` array for machine-actionable warnings; it is `[]` when no warnings are present. New operation-style JSON payloads should use the same `warnings` field.
160
160
161
-
Successful JSON responses are command-specific. Commands that operate on one path usually return an `input` objectand a `result` metadata object:
161
+
Successful JSON responses are command-specific. Operation commands return an `input` object, a `results` array, and a `warnings` array. For commands such as `mkdir`, each result reports what happened to the requested path:
162
162
163
163
```json
164
164
{
165
165
"input": {
166
166
"path": "/new-folder",
167
167
"parents": false
168
168
},
169
-
"result": {
170
-
"type": "folder",
171
-
"path_display": "/new-folder",
172
-
"path_lower": "/new-folder",
173
-
"id": "id:..."
174
-
}
169
+
"results": [
170
+
{
171
+
"status": "created",
172
+
"kind": "folder",
173
+
"input": {
174
+
"path": "/new-folder",
175
+
"parents": false
176
+
},
177
+
"result": {
178
+
"type": "folder",
179
+
"path_display": "/new-folder",
180
+
"path_lower": "/new-folder",
181
+
"id": "id:..."
182
+
}
183
+
}
184
+
],
185
+
"warnings": []
175
186
}
176
187
```
177
188
178
-
Commands that operate on multiple paths return a `results` array. For `cp` and `mv`, each `input` object uses `from_path` and `to_path`:
189
+
For `cp` and `mv`, each result input object uses `from_path` and `to_path`:
0 commit comments