update-folder
dci update-folder <id> [body]
Updates the specified folder. All fields are optional.
To reparent the folder, set parentFolderId to the target folder ID
(use "root" for the top level). If a sibling at the target has the same
name, the folder is auto-renamed.
To move reports or allocations into or out of a folder, update the item's
folderId field via the report or allocation PATCH endpoint.
id— Folder ID as shown bydci list-folders.
Pass the request body as name: value arguments or pipe JSON on stdin — see Command structure.
This command moves the folder itself. To move a report into or out of a
folder, set the report's folderId with dci update-report; allocations
likewise with dci update-allocation.
Examples
# Rename a folder.
dci update-folder <folder-id> name: "Shared reports"
# Move a folder under another folder (a same-named sibling gets the folder auto-renamed).
dci update-folder <folder-id> parentFolderId: <parent-folder-id>
# Move a folder back to the top level.
dci update-folder <folder-id> parentFolderId: root
# Set a description.
dci update-folder <folder-id> description: "Monthly reviews for the platform team"
Request
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Folder name. | |
description | string | Folder description. | |
parentFolderId | string | Identifier of the new parent folder. Use "root" to move the folder to the top level. If a sibling at the new parent has the same name, the folder is auto-renamed (e.g. "Foo" → "Foo (1)"). Default: "root". |
Raw JSON schema
{
"type": "object",
"description": "Request body for updating a folder. All fields are optional; only fields\nthe caller wants to change should be set.",
"properties": {
"name": {
"type": "string",
"description": "Folder name."
},
"description": {
"type": "string",
"description": "Folder description."
},
"parentFolderId": {
"type": "string",
"description": "Identifier of the new parent folder. Use \"root\" to move the folder to the top level. If a sibling at the new parent has the same name, the folder is auto-renamed (e.g. \"Foo\" → \"Foo (1)\").",
"default": "root",
"example": "root"
}
}
}
Output
OK - Folder updated.
By default dci renders the result as a table. Use --output json to get the full structure described below — see Output formats.
| Field | Type | Description |
|---|---|---|
id | string | Folder ID. |
name | string | Folder name. |
description | string | Folder description. |
parentFolderId | string | Identifier of the parent folder. Set to "root" if the folder is at the top level. Default: "root". |
Raw JSON schema
{
"type": "object",
"description": "A Cloud Analytics folder.",
"properties": {
"id": {
"type": "string",
"description": "Folder ID."
},
"name": {
"type": "string",
"description": "Folder name."
},
"description": {
"type": "string",
"description": "Folder description."
},
"parentFolderId": {
"type": "string",
"description": "Identifier of the parent folder. Set to \"root\" if the folder is at the top level.",
"default": "root",
"example": "root"
}
}
}
Errors
On failure, dci prints a single error message — with a hint when one is available — and exits with a typed code your scripts can branch on. See Errors and exit codes for the full contract.
HTTP status to exit code mapping
| HTTP status | Exit code | Error code | Meaning |
|---|---|---|---|
| 400 | 30 | VALIDATION_ERROR | The arguments or request body were rejected. Review the command's flags and payload. |
| 401 | 10 | AUTHENTICATION_FAILED | Not signed in, or the API token is invalid. Run dci login or check DCI_API_KEY. |
| 403 | 11 | PERMISSION_DENIED | The DoiT user or the active customer context does not have access. |
| 404 | 20 | RESOURCE_NOT_FOUND | The requested resource does not exist. Check the identifier argument. |
| 500 | 40 | API_SERVER_ERROR | The API failed to process the request. Retryable; contact DoiT support if it persists. |
Related
- get-folder — Get a folder
- list-folders — List folders
- create-folder — Create a folder
- delete-folder — Delete a folder
- update-report — Update a report
- API reference: PATCH /analytics/v1/folders/{id}
Aliases: updatefolder