Creates label definitions that can be used across different resource types. The label definitions are uniquely identified by their external id.
List of label definitions to create
required | Array of objects (ExternalLabelDefinition) [ 1 .. 1000 ] items unique |
A list of label definitions.
The response for a failed request.
from cognite.client.data_classes import LabelDefinitionWrite labels = [LabelDefinitionWrite(external_id="ROTATING_EQUIPMENT", name="Rotating equipment"), LabelDefinitionWrite(external_id="PUMP", name="pump")] res = client.labels.create(labels)
{- "items": [
- {
- "externalId": "my.known.id",
- "name": "string",
- "description": "string",
- "dataSetId": 1,
- "createdTime": 1730204346000
}
]
}