patch

Updates a device registry configuration.

Note: This is a regional API.

You can find the URL, SystemKey, and token required in the call by clicking API Keys (key icon) at the top-right of the Registry Details page. Use the Registry Keys section.

HTTP request

PATCH {URL}/api/v/4/webhook/execute/{SystemKey}/cloudiot

Query parameters

Parameters

Parameters

deviceRegistry.name

string

The resource path name. For example, projects/example-project/locations/us-central1/registries/my-registry

or

my-registry

updateMask

string (FieldMask format)

Only updates the deviceRegistry fields indicated by this mask. The field mask must not be empty and contain immutable fields or only be set by the server. Mutable top-level fields: event_notification_config, httpConfig, mqttConfig, and stateNotificationConfig.

A comma-separated list of fully qualified field names. Example: "user.displayName,photo".

Header parameters

Parameters

Parameters

ClearBlade-UserToken

See the note at the start of this document on where to find the token.

Request body

The request body contains a DeviceRegistry instance.

Response status codes

Code

Meaning

Code

Meaning

200

Success

Response body

If successful, the response body contains a DeviceRegistry instance.

Example curl

curl 'https://us-central1.clearblade.com/api/v/4/webhook/execute/aae9b9b30c8aa4e49081c7eeb9bb07/cloudiot?name=test-reg&updateMask=mqttConfig.mqtt_enabled_state' -H 'ClearBlade-UserToken: {Token}' -X PATCH -d '{ "mqttConfig": { "mqttEnabledState": "MQTT_ENABLED" }}'


Using the instructions at the start of this document, replace the following: https://us-central1.clearblade.com with your URL. aae9b9b30c8aa4e49081c7eeb9bb07 with your SystemKey. {Token} with your token.

Notice the updateMask query parameter’s value. Ensure the MQTT is enabled for this registry. The updateMask ensures that fields other than the ones listed are unchanged.