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