I would like to change the settings for a single device using the API.
According to the OpenAPI documentation, I’m using the PUT /v1/projects/{projectId}/settings/{settingId} endpoint, but it updates the setting value for all my devices.
Is there a query parameter I can add to specify the device ID?
You’re hitting the right Settings endpoint, but in your query, you’re using the Settings ID from the Project-wide Device Settings instead of the override specific to that device.
Just to clarify: each Project-wide setting has its own Settings ID. When a setting is overridden at the device level, a separate Settings ID is created for that device. This means you can update project settings globally or override them on a per-device basis.
A GET request to /v1/projects/{projectId}/settings will return only the Project-wide Settings IDs. In contrast, a GET to /v1/projects/{projectId}/devices/{deviceId}/settings will return both: the inherited Project-wide Settings and any device-specific overrides (if they differ from the project defaults).
So, to override a setting at the device level, use the same API endpoint but pass the device-specific Settings ID instead.
I’m using the /v1/projects/{projectId}/devices/{deviceId}/settings request and I insert the “id” value as setting ID in the /v1/projects/{projectId}/settings/{settingId}.
Wich object should i use in the first request’s response ?
To override a device-specific setting, you should use the "id" field from the object where the "deviceId" is present. In the response you shared, the presence of the "deviceId" field indicates that the setting is specific to a particular device — meaning the corresponding "id" refers to a device-level override.
If the "deviceId" field is missing, then the "id" belongs to a project-wide setting instead.
If you’re trying to override a setting for a specific device, use the "id" from the object where "deviceId" matches the device you’re targeting.
If no such device-specific setting exists yet, you’ll need to create an override by sending a POST request to:
So if I want to update the setting just for that device, I should use the second object (the one that includes the deviceId) in the PUT request, correct?
From what I understand, if I want to apply a different value for a setting on a specific device, I need to override it with the request /v1/projects/{projectId}/settings. Is that the expected behavior?
I manually changed one of the settings through the interface.
Yes, you can either do that manually via the Console or programmatically with a POST request to /v1/projects/{projectId}/settings, where in the request body you provide the deviceId.
So if I want to update the setting just for that device, I should use the second object (the one that includes the deviceId) in the PUT request, correct?
Exactly — if you’re targeting a specific device, use the object that includes a deviceId and send a PUT request to /v1/projects/{projectId}/settings/{settingId}.
From what I understand, if I want to apply a different value for a setting on a specific device, I need to override it with the request /v1/projects/{projectId}/settings. Is that the expected behavior?
You should use a PUT request to the /v1/projects/{projectId}/settings/{settingId} endpoint — the only difference is whether the settingId you provide corresponds to a device-specific override or a project-level setting.