Skip to content

Conversation

reubenmiller
Copy link
Owner

@reubenmiller reubenmiller commented Oct 9, 2024

Align to Cumulocity REST API spec where the value is not a required parameter for the following commands:

  • c8y tenantoptions create
  • c8y tenantoptions update

The above command include the following changes:

  • Allow users to specify an empty string via the --value flag
  • Allow users to create an option without using the --value flag (e.g. it is no longer required)

Examples

# Create an option
c8y tenantoptions create --category "measurement.series.latestvalue" \
    --key "c8y_Temperature.*" --value "" --dry

# Update an option
c8y tenantoptions update --category "measurement.series.latestvalue" \
    --key "c8y_Temperature.*" --value "" --dry

@haraldmeyer
Copy link

The example looks like I would expect it. Initially I wanted to challenge making the "value" parameter optional but checking the API it is indeed not required.

@reubenmiller
Copy link
Owner Author

The example looks like I would expect it. Initially I wanted to challenge making the "value" parameter optional but checking the API it is indeed not required.

Yeah that surprised me too. Thanks for checking

@reubenmiller reubenmiller merged commit df99bdc into v2 Oct 10, 2024
4 checks passed
@reubenmiller reubenmiller deleted the fix-support-empty-tenant-option-values branch October 10, 2024 06:09
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.

2 participants