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
|`unknown_flag`| Cobra could not resolve a flag. |
193
193
|`command_failed`| Fallback for failures without a more specific stable code. |
194
194
195
-
Successful JSON responses for migrated commands return an `input` object, a `results` array, and a `warnings` array. Result payloads are command-specific. For commands such as `mkdir`, each result reports what happened to the requested path:
195
+
Successful JSON responses for migrated commands return `ok: true`, `schema_version: "1"`, `command`, an `input` object, a `results` array, and a `warnings` array. Result payloads are command-specific. Public top-level schemas live under [docs/json-schema/v1](docs/json-schema/v1/). If a multi-target or recursive command fails after some side effects have already happened, dbxcli returns a JSON error envelope and does not include partial success results. For commands such as `mkdir`, each result reports what happened to the requested path:
196
196
197
197
```json
198
198
{
199
+
"ok": true,
200
+
"schema_version": "1",
201
+
"command": "mkdir",
199
202
"input": {
200
203
"path": "/new-folder",
201
204
"parents": false
@@ -224,9 +227,14 @@ For `cp` and `mv`, each result input object uses `from_path` and `to_path`:
224
227
225
228
```json
226
229
{
230
+
"ok": true,
231
+
"schema_version": "1",
232
+
"command": "cp",
227
233
"input": {},
228
234
"results": [
229
235
{
236
+
"status": "copied",
237
+
"kind": "file",
230
238
"input": {
231
239
"from_path": "/Reports/old.pdf",
232
240
"to_path": "/Reports/copy.pdf"
@@ -249,9 +257,14 @@ For commands such as `rm`, `input` uses command-specific path and flag fields:
249
257
250
258
```json
251
259
{
260
+
"ok": true,
261
+
"schema_version": "1",
262
+
"command": "rm",
252
263
"input": {},
253
264
"results": [
254
265
{
266
+
"status": "deleted",
267
+
"kind": "file",
255
268
"input": {
256
269
"path": "/old-file.txt",
257
270
"permanent": false,
@@ -276,6 +289,9 @@ For commands such as `rm`, `input` uses command-specific path and flag fields:
276
289
277
290
```json
278
291
{
292
+
"ok": true,
293
+
"schema_version": "1",
294
+
"command": "put",
279
295
"input": {
280
296
"source": "README.md",
281
297
"target": "/README.md",
@@ -311,6 +327,9 @@ Entry-list commands such as `ls`, `search`, and `revs` use the operation-style w
311
327
312
328
```json
313
329
{
330
+
"ok": true,
331
+
"schema_version": "1",
332
+
"command": "ls",
314
333
"input": {
315
334
"path": "/Reports",
316
335
"recursive": false,
@@ -324,6 +343,7 @@ Entry-list commands such as `ls`, `search`, and `revs` use the operation-style w
324
343
{
325
344
"status": "listed",
326
345
"kind": "file",
346
+
"input": {},
327
347
"result": {
328
348
"type": "file",
329
349
"path_display": "/Reports/q1.pdf",
@@ -342,9 +362,13 @@ Version, account, and usage commands use the operation-style wrapper with a sing
342
362
343
363
```json
344
364
{
365
+
"ok": true,
366
+
"schema_version": "1",
367
+
"command": "version",
345
368
"input": {},
346
369
"results": [
347
370
{
371
+
"status": "reported",
348
372
"kind": "version",
349
373
"input": {},
350
374
"result": {
@@ -360,9 +384,13 @@ Version, account, and usage commands use the operation-style wrapper with a sing
360
384
361
385
```json
362
386
{
387
+
"ok": true,
388
+
"schema_version": "1",
389
+
"command": "account",
363
390
"input": {},
364
391
"results": [
365
392
{
393
+
"status": "found",
366
394
"kind": "account",
367
395
"input": {},
368
396
"result": {
@@ -380,9 +408,13 @@ Version, account, and usage commands use the operation-style wrapper with a sing
380
408
381
409
```json
382
410
{
411
+
"ok": true,
412
+
"schema_version": "1",
413
+
"command": "du",
383
414
"input": {},
384
415
"results": [
385
416
{
417
+
"status": "reported",
386
418
"kind": "space_usage",
387
419
"input": {},
388
420
"result": {
@@ -402,13 +434,17 @@ Shared-link commands use the same operation-style wrapper. `share-link create`,
402
434
403
435
```json
404
436
{
437
+
"ok": true,
438
+
"schema_version": "1",
439
+
"command": "share-link create",
405
440
"input": {
406
441
"path": "/Reports/old.pdf"
407
442
},
408
443
"results": [
409
444
{
410
445
"status": "created",
411
446
"kind": "file",
447
+
"input": {},
412
448
"result": {
413
449
"type": "file",
414
450
"url": "https://www.dropbox.com/s/...",
@@ -429,11 +465,15 @@ The legacy `share list folder` command also supports operation-style JSON. It us
429
465
430
466
```json
431
467
{
468
+
"ok": true,
469
+
"schema_version": "1",
470
+
"command": "share list folder",
432
471
"input": {},
433
472
"results": [
434
473
{
435
474
"status": "listed",
436
475
"kind": "shared_folder",
476
+
"input": {},
437
477
"result": {
438
478
"type": "shared_folder",
439
479
"name": "Reports",
@@ -454,11 +494,15 @@ Team commands use the same operation-style wrapper. `team info` returns a single
454
494
455
495
```json
456
496
{
497
+
"ok": true,
498
+
"schema_version": "1",
499
+
"command": "team list-members",
457
500
"input": {},
458
501
"results": [
459
502
{
460
503
"status": "listed",
461
504
"kind": "team_member",
505
+
"input": {},
462
506
"result": {
463
507
"type": "team_member",
464
508
"team_member_id": "dbmid:...",
@@ -480,6 +524,8 @@ In JSON mode, command errors are written to stdout as JSON, including errors fro
480
524
```json
481
525
{
482
526
"ok": false,
527
+
"schema_version": "1",
528
+
"command": "rm",
483
529
"error": {
484
530
"message": "path exists and is not a folder: /old-file.txt",
0 commit comments