Updates a Cumulocity Managed Object. Extends the base CumulocityObject.

This is for updating existing managed objects by external ID, not for creating new ones. Only the fields provided in the payload will be updated; other fields on the managed object are left unchanged. To delete a custom fragment, set its value to null.

interface ManagedObject {
    cumulocityType: "managedObject";
    destination?: string;
    externalSource: ExternalId[];
    payload: {
        c8y_IsDevice?: {};
        c8y_SupportedOperations?: string[];
        name?: string;
        owner?: string;
        type?: string;
        [fragment: string]: any;
    };
}

Hierarchy (View Summary)

Properties

cumulocityType: "managedObject"

Discriminator, always "managedObject".

destination?: string

For messages sent by data preparation, this is "cumulocity" by default, but can be set to other options for other destinations. For messages received by data preparation this is not set.

externalSource: ExternalId[]

Since we usually don't know the C8Y ID to put in the payload, the data preparation rule can specify a single external ID to lookup (and automatically create if it does not exist). it is mandatory to include one item when sending this (unless the internal C8Y "id" is known and passed in the payload, or it's an operation where there's a dedicated field). When a Cumulocity message (e.g. operation) is received, this will contain a list of ALL external ids for this Cumulocity device.

payload: {
    c8y_IsDevice?: {};
    c8y_SupportedOperations?: string[];
    name?: string;
    owner?: string;
    type?: string;
    [fragment: string]: any;
}

The fields to update on the managed object. All fields are optional to support partial updates.

Type declaration

  • [fragment: string]: any

    Custom fragments. Set a fragment to null to delete it from the managed object.

  • Optionalc8y_IsDevice?: {}
  • Optionalc8y_SupportedOperations?: string[]
  • Optionalname?: string
  • Optionalowner?: string
  • Optionaltype?: string