Skip to main content

update-custom-theme

dci update-custom-theme <id> [body]

Updates the custom theme specified by the Id. Requires Cloud Analytics Admin permission.

  • id — Custom theme ID as shown by dci list-custom-themes; the theme name is accepted too.

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

Examples

# Rename a theme.
dci update-custom-theme <custom-theme-id> name: "Team Backyard v2"
# Change only the primary color (quoted so the shell does not read `#` as a comment).
dci update-custom-theme <custom-theme-id> primaryColor: "#188038"
# Replace both palettes; `dark` and `light` must be sent together.
dci update-custom-theme <custom-theme-id> colors{dark: ["#8AB4F8", "#81C995"], light: ["#0B57D0", "#188038"]}
# Update from a JSON file.
dci update-custom-theme <custom-theme-id> < theme.json
# theme.json
{"name": "Team Backyard v2", "primaryColor": "#188038",
"colors": {"dark": ["#8AB4F8", "#81C995"], "light": ["#0B57D0", "#188038"]}}

Request

Content-Type: application/json

FieldTypeRequiredDescription
namestringThe display name of the custom theme.
primaryColorstringA color in hex notation. Accepts #RGB, #RRGGBB, or #RRGGBBAA.
colorsobjectPalettes for light and dark display modes. Each palette must contain between 1 and 32 hex colors.
colors.lightarray of stringyesColors used when the report is displayed in light mode.
colors.darkarray of stringyesColors used when the report is displayed in dark mode.
Raw JSON schema
{
"type": "object",
"description": "Request body for updating a custom theme. Only provided fields are modified.",
"properties": {
"name": {
"type": "string",
"description": "The display name of the custom theme.",
"maxLength": 200,
"nullable": true
},
"primaryColor": {
"type": "string",
"description": "A color in hex notation. Accepts `#RGB`, `#RRGGBB`, or `#RRGGBBAA`.",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
"example": "#1A73E8"
},
"colors": {
"type": "object",
"required": [
"light",
"dark"
],
"description": "Palettes for light and dark display modes. Each palette must contain between 1 and 32 hex colors.",
"properties": {
"light": {
"type": "array",
"minItems": 1,
"maxItems": 32,
"items": {
"type": "string",
"description": "A color in hex notation. Accepts `#RGB`, `#RRGGBB`, or `#RRGGBBAA`.",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
"example": "#1A73E8"
},
"description": "Colors used when the report is displayed in light mode."
},
"dark": {
"type": "array",
"minItems": 1,
"maxItems": 32,
"items": {
"type": "string",
"description": "A color in hex notation. Accepts `#RGB`, `#RRGGBB`, or `#RRGGBBAA`.",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
"example": "#1A73E8"
},
"description": "Colors used when the report is displayed in dark mode."
}
}
}
}
}

Output

OK - Custom theme updated.

By default dci renders the result as a table. Use --output json to get the full structure described below — see Output formats.

FieldTypeDescription
idstringThe unique identifier of the custom theme.
namestringThe display name of the custom theme.
primaryColorstringA color in hex notation. Accepts #RGB, #RRGGBB, or #RRGGBBAA.
colorsobjectPalettes for light and dark display modes. Each palette must contain between 1 and 32 hex colors.
colors.lightarray of stringColors used when the report is displayed in light mode.
colors.darkarray of stringColors used when the report is displayed in dark mode.
createTimestring (date-time)The creation time of the custom theme.
updateTimestring (date-time)The time when the custom theme was last updated.
Raw JSON schema
{
"required": [
"id",
"name",
"primaryColor",
"colors"
],
"type": "object",
"description": "A custom color theme applied to Cloud Analytics reports.",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the custom theme."
},
"name": {
"type": "string",
"description": "The display name of the custom theme.",
"maxLength": 200
},
"primaryColor": {
"type": "string",
"description": "A color in hex notation. Accepts `#RGB`, `#RRGGBB`, or `#RRGGBBAA`.",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
"example": "#1A73E8"
},
"colors": {
"type": "object",
"required": [
"light",
"dark"
],
"description": "Palettes for light and dark display modes. Each palette must contain between 1 and 32 hex colors.",
"properties": {
"light": {
"type": "array",
"minItems": 1,
"maxItems": 32,
"items": {
"type": "string",
"description": "A color in hex notation. Accepts `#RGB`, `#RRGGBB`, or `#RRGGBBAA`.",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
"example": "#1A73E8"
},
"description": "Colors used when the report is displayed in light mode."
},
"dark": {
"type": "array",
"minItems": 1,
"maxItems": 32,
"items": {
"type": "string",
"description": "A color in hex notation. Accepts `#RGB`, `#RRGGBB`, or `#RRGGBBAA`.",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
"example": "#1A73E8"
},
"description": "Colors used when the report is displayed in dark mode."
}
}
},
"createTime": {
"type": "string",
"format": "date-time",
"description": "The creation time of the custom theme."
},
"updateTime": {
"type": "string",
"format": "date-time",
"description": "The time when the custom theme was last updated."
}
}
}

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.

Aliases: updatecustomtheme