Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/support null values in data flag #191

Merged
merged 3 commits into from
Oct 22, 2022

Conversation

reubenmiller
Copy link
Owner

Add support for null values in the data flag.

null values are commonly used when updating managed objects to delete fragments. Previously the data flag was interpreting null as a string.

Example

Remove property from a managed object

Cumulocity support deletion of root fragment by sending an update to the managed object with the root fragment set to null.

c8y devices update --id 12345 --data "myFragment=null" --dry

Body

{
    "myFragment": null
}

If you want to remove the fragment from all managed objects containing this fragment then you can use it in a pipeline

c8y inventory find --query "has(myFragment)" --includeAll | c8y devices update --data "myFragment=null"

@reubenmiller reubenmiller merged commit 0f57c7f into v2 Oct 22, 2022
@reubenmiller reubenmiller deleted the feat/support-null-values-in-data-flag branch October 22, 2022 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant