Releases: reubenmiller/go-c8y-cli
Cumulocity CLI 2.20.0
Changelog
Note
For more details/examples on the features click on the PR links
New commands
c8y configuration send
to send a configuration to a device #199
Improvements
- Support multiple data flag usage #192
- Support null values when using data flag #191
- software/firmware allow empty version and url values #198
- Allow enabling insecure mode when creating a new session file (used mostly for thick edges) #194
- New
has
andnothas
client-side filter operators in the globalfilter
flag #200 - Tunnel/proxy compatibility improvements #201
Full Changelog: v2.19.0...v2.20.0
Cumulocity CLI 2.19.0
Changelog
Note
For more details/examples on the features click on the PR links
New features
-
Add child/parent flags to all inventory get commands (#190)
Some Examples
# include parents in response c8y devices get --id 12345 --withParents # include count of children (only support from v10.13 onwards) c8y inventory children list --id 12345 --childType device --withChildrenCount
Thanks @ksbn7 for the hint about the missing flags and for reviewing the PR
Full Changelog: v2.18.1...v2.19.0
Cumulocity CLI 2.18.1
Changelog
Fixes
- 🐛 Removed accidental log statement which was shown when using the
--data
flag on any command (#189)
Full Changelog: v2.18.0...v2.18.1
Cumulocity CLI 2.18.0
Changelog
Note
For more details/examples on the features click on the PR links
New features
- Improved alias support (completions and error handling) (#184)
- Improve table output format (#185)
- Support multiple
templateVars
flag usage in same command line (#188) - Support
CI
env variable by default (#187)
Packaging
- Include windows arm64 binary (#186)
Full Changelog: v2.17.0...v2.18.0
Cumulocity CLI 2.17.0
Changelog
Note
For more details/examples on the features click on the PR links
New concepts
Custom pipeline to flag mapping (not supported in PSc8y) (#181)
Support mapping piped input (standard input) to flags other than the default "accepts pipeline" flag.
Example
# Pick plain text input
echo "t12345" | c8y applications list --providedFor -
# => GET /application/applications?providedFor=t12345
# Pick providerFor value from json input from either from .name or .tenant properties
echo "{\"tenant\":\"t12345\"}" | c8y applications list --providedFor -.name,.tenant
# => GET /application/applications?providedFor=t12345
The feature is documented under the Chaining commands concept page in the documentation.
Full Changelog: v2.16.0...v2.17.0
Cumulocity CLI 2.16.0
Changelog
Note
For more details/examples on the features click on the PR links
New commands
c8y notification2
- initial support notification2 (#176)c8y devices services
- Support for managing device services (new in Cumulocity version >=10.14) (#177)c8y inventory parents get
- Get managed object parents from an existing managed object (#178)
New global flags
withTotalElements
support showing the total elements in the.statistics
fragment for collection type responses (#180)noProgress
disable binary progress bar (#174)
Misc.
- Show progress bar when uploading/downloading binaries (#174)
Full Changelog: v2.15.0...v2.16.0
Cumulocity CLI 2.15.2
Changelog
New commands
c8y microservices loglevels
Renamed Commands
Group child commands and added query support #167, #164
Child devices are now made more generic so they are easier to use and maintain
c8y inventory children [command] --childType <asset|device|addition>
c8y devices children [command] --childType <asset|device|addition>
c8y devicegroups children [command] --childType <asset|device|addition>
As a result of the grouping the following commands have been deprecated. The commands will continue to work however they will not show up in any documentation or in command completion.
c8y devicegroups assignDevice
=>c8y devicegroups children assign --childType asset
c8y devicegroups assignGroup
=>c8y devicegroups children assign --childType asset
c8y devicegroups listAssets
=>c8y devicegroups children list --childType asset
c8y devicegroups unassignDevice
=>c8y devicegroups children unassign --childType asset
c8y devicegroups unassignGroup
=>c8y devicegroups children unassign --childType asset
c8y devices assignDevice
=>c8y devices children assign --childType device
c8y devices getChild
=>c8y devices children get --childType device
c8y devices listAssets
=>c8y devices children list --childType asset
c8y devices listChildren
=>c8y devices children list --childType device
c8y devices unassignChild
=>c8y devices children unassign --childType device
c8y inventory additions
=>c8y inventory children [command] --childType addition
c8y inventory assets
=>c8y inventory children [command] --childType asset
PowerShell: New commands to managed
The following cmdlets were added to PowerShell to managed child assets/additions/devices. Though please note that it is highly recommended to use native c8y
commands rather than the PowerShell module PSc8y
support may be dropped.
Add-DeviceChild
Add-DeviceGroupChild
Get-DeviceChild
Get-DeviceChildCollection
Get-DeviceGroupChild
Get-DeviceGroupChildCollection
New-DeviceChild
New-DeviceGroupChild
Remove-DeviceChild
Remove-DeviceGroupChild
Add-ManagedObjectChild
Get-ManagedObjectChild
Get-ManagedObjectChildCollection
New-ManagedObjectChild
Remove-ManagedObjectChild
The following PowerShell commands have been removed from PSc8y
Get-DeviceChildAssetCollection
=>Get-DeviceChildCollection -ChildType asset
Get-DeviceGroupChildAssetCollection
=>Get-DeviceGroupChildCollection -ChildType asset
Remove-Asset
=>Remove-ManagedObjectChild -ChildType asset
Add-DeviceToGroup
=>Add-DeviceGroupChild -ChildType asset
Remove-DeviceFromGroup
=>Remove-DeviceGroupChild -ChildType asset
New-ChildAddition
=>Remove-ManagedObjectChild -ChildType addition
Improvements
c8y applications createHostedApplication
- Create hosted app manifest support (#166)
c8y inventory find
- Added new flags to make it easier to filter by common fragments (similar to c8y devices list)
Add support for extending query flags
The following commands now support --query
, --queryTemplate
and --orderBy
flags. Some commands include additional query helper flags, check out the documentation for more details.
- c8y deviceprofiles list
- c8y configuration list
- c8y firmware list
- c8y firmware patches list
- c8y firmware versions list
- c8y software list
- c8y software versions list
Caching
- All types of HTTP requests are set to be cached when using
--cache
global flag, e.g.GET PUT DELETE POST
(#169) - New global flag
--cacheBodyPaths name,type
which limits which json body fragments are used in the uniqueness calculation (#158) - Only responses with a status code of less than 300 are cached (#169)
Misc.
-
docker image includes coreutils (#157)
-
dry run skips mode checks (#154)
-
customQueryParam
fixed parsing error when using--customQueryParam
with an ISO-8601 date string.Example:
c8y api GET /measurement/measurements --customQueryParam 'dateFrom=2022-08-11T22:43:00.405+02:00'
-
fix homebrew packaging bug
New Contributors
Full Changelog: v2.14.0...v2.15.1
Cumulocity CLI 2.14.0
Changelog
Improvements
Flag: OutputFileRaw
Support setting the output file name based on some variables set based on the response/request.
{filename}
- Filename found in the Content-Disposition response header{id}
- An id like value found in the request path (/event/events/12345/binaries
=>12345
){basename}
- The last path section of the request path (/some/nested/url/withafilename.json
=>withafilename.json
)
Examples
# Download a list of files and use the filename which was used when it was uploaded
c8y binaries list --pageSize 5 | c8y binaries get --outputFileRaw "{filename}"
# Download a list of managed object binaries and use custom name which references the binary id and the filename.
c8y binaries list --pageSize 5 | c8y binaries get --outputFileRaw "output/binary-{id}-{filename}"
Note: This does NOT include support for a complex template evaluation (like the --template flag).
c8y binaries create
- New
--name STRING
flag. Set the name of the binary file. This will be the name of the file when it is downloaded in the UI
c8y events createBinary
- New
--name STRING
flag. Set the name of the binary file. This will be the name of the file when it is downloaded in the UI
Fixes
c8y binaries update
- Fixed bug where the binaries would include a multipart/form-data delimiters which modified the binary unexpectedly
c8y events updateBinary
- Fixed bug where the binaries would include a multipart/form-data delimiters which modified the binary unexpectedly
c8y devices list
and c8y agents list
(#151)
Added support for relative datetime filtering on creationTime for c8y devices list
and c8y agents list
.
- creationTimeDateFrom string - Filter creationTime.date from a specific date
- creationTimeDateTo string - Filter creationTime.date to a specific date
Examples
$ c8y devices list --creationTimeDateFrom -7d
Get devices which where registered longer than 7 days ago
$ c8y devices list --creationTimeDateTo -1d
Get devices which where registered in the last day
Cumulocity CLI 2.13.0
Changelog
New commands
c8y devicemanagement certificates (#150)
Manage the trusted certificates which are used by devices.
Usage:
c8y devicemanagement certificates [command]
Available Commands:
create Upload trusted device certificate
delete Delete device certificate
get Get trusted device certificate
list List device certificates
update Update trusted device certificate
Note: "dm" is an alias for "devicemanagement", so it can also be used with c8y dm certificates
Fixes
- pwsh
Get-DeviceStatisticsCollection
- added support for common collection parameters like PageSize - pwsh: tenant tab completion now included the current tenant by default
Cumulocity CLI 2.12.1
Changelog
Build
- Switch git branch from
master
tov2
to align golang standards.- Installing via go install is now possible using
go install github.com/reubenmiller/go-c8y-cli/v2/cmd/c8y@latest
and the resulting package will match a v2.x.x version.
- Installing via go install is now possible using