const labels = [
{ externalId: 'PUMP', name: "Pump" },
{ externalId: 'ROTATING_EQUIPMENT', name: 'Rotating equipment', description: 'Asset with rotating parts' }
];
const createdLabels = await client.labels.create(labels);{
"items": [
{
"externalId": "my.known.id",
"name": "<string>",
"createdTime": 1730204346000,
"description": "<string>",
"dataSetId": 4503599627370496
}
]
}Required capabilities:
labelsAcl:WRITE
Creates label definitions that can be used across different resource types. The label definitions are uniquely identified by their external id.
const labels = [
{ externalId: 'PUMP', name: "Pump" },
{ externalId: 'ROTATING_EQUIPMENT', name: 'Rotating equipment', description: 'Asset with rotating parts' }
];
const createdLabels = await client.labels.create(labels);{
"items": [
{
"externalId": "my.known.id",
"name": "<string>",
"createdTime": 1730204346000,
"description": "<string>",
"dataSetId": 4503599627370496
}
]
}Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.
List of label definitions to create
1 - 1000 elementsShow child attributes
A list of label definitions.
1 - 1000 elementsShow child attributes
Was this page helpful?