メインコンテンツへスキップ

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 by dci list-folders.

Pass the request body as name: value arguments or pipe JSON on stdin — see Command structure.

Moving contents, not folders

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

FieldTypeRequiredDescription
namestringFolder name.
descriptionstringFolder description.
parentFolderIdstringIdentifier 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.

FieldTypeDescription
idstringFolder ID.
namestringFolder name.
descriptionstringFolder description.
parentFolderIdstringIdentifier 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 statusExit codeError codeMeaning
40030VALIDATION_ERRORThe arguments or request body were rejected. Review the command's flags and payload.
40110AUTHENTICATION_FAILEDNot signed in, or the API token is invalid. Run dci login or check DCI_API_KEY.
40311PERMISSION_DENIEDThe DoiT user or the active customer context does not have access.
40420RESOURCE_NOT_FOUNDThe requested resource does not exist. Check the identifier argument.
50040API_SERVER_ERRORThe API failed to process the request. Retryable; contact DoiT support if it persists.

Aliases: updatefolder