Updates an attribute in the organization.
Submit Feedback: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team.
To use this endpoint, select Write Attributes under the Setup & Administration category when creating or editing an API token. Learn More.
curl --request PATCH \
--url https://api.samsara.com/attributes/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entityType": "asset",
"attributeType": "single-select",
"entities": [
{
"dateValues": [
"2023-12-25"
],
"entityId": "<string>",
"externalIds": {
"maintenanceId": "250020",
"payrollId": "ABFS18600"
},
"numberValues": [
123
],
"stringValues": [
"<string>"
]
}
],
"name": "License Certifications",
"numberValues": [
123
],
"stringValues": [
"<string>"
]
}
'{
"data": {
"entities": [
{
"dateValues": [
"<string>"
],
"entityId": 123,
"externalIds": {
"maintenanceId": "250020",
"payrollId": "ABFS18600"
},
"name": "<string>",
"numberValues": [
123
],
"stringValues": [
"<string>"
],
"values": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"stringValue": "CDL"
}
]
}
],
"attributeType": "single-select",
"entityType": "asset",
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "License Certifications",
"numberValues": [
123
],
"stringValues": [
"<string>"
],
"unit": "METER",
"values": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"stringValue": "CDL"
}
]
}
}Documentation Index
Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Samsara-provided UUID of the attribute.
The attribute to update.
A request body to update an Attribute.
Denotes the type of entity, driver or asset.
driver, asset "asset"
Denotes the data type of the attribute's values. Valid values: single-select, multi-select, text, freeform-multi-select, number, date.
single-select, multi-select, text, freeform-multi-select, number, date "single-select"
Entities that will be applied to this attribute
Show child attributes
Name
"License Certifications"
Number values that can be associated with this attribute
String values that can be associated with this attribute
Newly created attribute object with ID.
Show child attributes
curl --request PATCH \
--url https://api.samsara.com/attributes/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entityType": "asset",
"attributeType": "single-select",
"entities": [
{
"dateValues": [
"2023-12-25"
],
"entityId": "<string>",
"externalIds": {
"maintenanceId": "250020",
"payrollId": "ABFS18600"
},
"numberValues": [
123
],
"stringValues": [
"<string>"
]
}
],
"name": "License Certifications",
"numberValues": [
123
],
"stringValues": [
"<string>"
]
}
'{
"data": {
"entities": [
{
"dateValues": [
"<string>"
],
"entityId": 123,
"externalIds": {
"maintenanceId": "250020",
"payrollId": "ABFS18600"
},
"name": "<string>",
"numberValues": [
123
],
"stringValues": [
"<string>"
],
"values": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"stringValue": "CDL"
}
]
}
],
"attributeType": "single-select",
"entityType": "asset",
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "License Certifications",
"numberValues": [
123
],
"stringValues": [
"<string>"
],
"unit": "METER",
"values": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"stringValue": "CDL"
}
]
}
}