get-label
dci get-label id
Returns a label by the specified Id.
Output
OK - Label returned.
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 | The unique identifier of the label. |
name | string | The name of the label. |
color | string | The color of the label. One of: "blue", "skyBlue", "teal", "mint", "lime", "softYellow", "apricot", "lavender", "purple", "rosePink", "slateGrey". |
type | string | The type of the label (custom or preset). One of: "custom", "preset". |
createTime | string (date-time) | The time when the label was created. |
updateTime | string (date-time) | The time when the label was last updated. |
Raw JSON schema
{
"required": [
"id",
"name",
"color"
],
"type": "object",
"description": "Label metadata.",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the label."
},
"name": {
"type": "string",
"description": "The name of the label."
},
"color": {
"type": "string",
"enum": [
"blue",
"skyBlue",
"teal",
"mint",
"lime",
"softYellow",
"apricot",
"lavender",
"purple",
"rosePink",
"slateGrey"
],
"description": "The color of the label."
},
"type": {
"type": "string",
"enum": [
"custom",
"preset"
],
"description": "The type of the label (custom or preset)."
},
"createTime": {
"type": "string",
"format": "date-time",
"description": "The time when the label was created."
},
"updateTime": {
"type": "string",
"format": "date-time",
"description": "The time when the label 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 | 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. |
Aliases: getlabel