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
Structured success output is rolling out command by command. Currently migrated commands are `account`, `du`, `ls`, `search`, `revs`, `cp`, `mv`, `share-link create`, `share-link list`, `share-link info`, `share-link update`, `share-link revoke`, `share-link download`, `mkdir`, `rm`, and `restore`. Commands that have not been migrated return a JSON error whose `error.message` is `structured output is not supported for this command yet` when used with `--output=json`.
156
+
Structured success output is rolling out command by command. Currently migrated commands are `account`, `du`, `ls`, `search`, `revs`, `cp`, `mv`, `put`, `share-link create`, `share-link list`, `share-link info`, `share-link update`, `share-link revoke`, `share-link download`, `mkdir`, `rm`, and `restore`. Commands that have not been migrated return a JSON error whose `error.message` is `structured output is not supported for this command yet` when used with `--output=json`.
156
157
157
158
Command results are written to stdout. Status, progress, warnings, diagnostics, and verbose logs are written to stderr.
158
159
@@ -221,6 +222,38 @@ For commands such as `rm`, `input` uses command-specific path and flag fields:
221
222
}
222
223
```
223
224
225
+
`put` always returns a `results` array, including single-file and stdin uploads. The top-level `input` describes the command request; each result reports whether a file was `uploaded`, `skipped`, or a directory was `created` or already `existing`:
226
+
227
+
```json
228
+
{
229
+
"input": {
230
+
"source": "README.md",
231
+
"target": "/README.md",
232
+
"recursive": false,
233
+
"if_exists": "overwrite",
234
+
"stdin": false
235
+
},
236
+
"results": [
237
+
{
238
+
"status": "uploaded",
239
+
"kind": "file",
240
+
"input": {
241
+
"source": "README.md",
242
+
"target": "/README.md"
243
+
},
244
+
"result": {
245
+
"type": "file",
246
+
"path_display": "/README.md",
247
+
"path_lower": "/readme.md",
248
+
"id": "id:...",
249
+
"rev": "...",
250
+
"size": 123
251
+
}
252
+
}
253
+
]
254
+
}
255
+
```
256
+
224
257
Commands that return entry lists, such as `ls`, `search`, and `revs`, return an `input` object and an `entries` array. `ls` input includes the listed path; `search` input includes the query and optional path scope; `revs` input includes the file path:
0 commit comments