c8y(1)

πŸ“¦ version 2.56.1, in nixpkgs unstable

okay bestie, welcome to the c8y(1) manual page for c8y-alarms-deleteCollection β€” this is the one that deletes a whole collection of alarms, and yes, it eats πŸ’…βœ¨


πŸŽ€ NAME πŸŽ€

c8y-alarms-deleteCollection β€” Delete alarm collection 🫢


✨ SYNOPSIS ✨

c8y alarms deleteCollection [flags]

πŸ’… DESCRIPTION πŸ’…

This command deletes a collection of alarms by a filter you give it. Lowkey powerful, highkey dangerous if your filter is too loose β€” so vibe check your flags first, bestie 😭


🌸 OPTIONS 🌸

  • --createdFrom="" β€” start date, or date and time, of when the alarm was created. Version >= 10.11 ✨
  • --createdTo="" β€” end date, or date and time, of when the alarm was created. Version >= 10.11 ✨
  • --dateFrom="" β€” start date, or date and time, of when the alarm occurred. πŸ•°οΈ
  • --dateTo="" β€” end date, or date and time, of when the alarm occurred. πŸ•°οΈ
  • --device=[] β€” source device id. This one accepts pipeline, iykyk 🫢
  • -h, --help[=false] β€” help for deleteCollection. Your little emergency exit button πŸ’–
  • --processingMode="" β€” Cumulocity processing mode βš™οΈ
  • --resolved[=false] β€” when set to true, only resolved alarms will be removed β€” the one with status CLEARED. false means alarms with status ACTIVE or ACKNOWLEDGED. Read that twice, bestie 🚨
  • --severity="" β€” alarm severity, for example CRITICAL, MAJOR, MINOR or WARNING. πŸ’…
  • --status=[] β€” comma separated alarm statuses, for example ACTIVE,CLEARED. ✨
  • --type="" β€” alarm type. πŸŽ€
  • --withSourceAssets[=false] β€” when set to true, alarms for related source assets will also be removed. When you provide this parameter, source must also be defined. No source, no slay πŸ™ˆ
  • --withSourceDevices[=false] β€” when set to true, alarms for related source devices will also be removed. When you provide this parameter, source must also be defined. Same vibe, same rule πŸ™ˆ

πŸ¦‹ OPTIONS INHERITED FROM PARENT COMMANDS πŸ¦‹

  • --abortOnErrors=10 β€” abort the batch when it reaches the specified number of errors. πŸ›‘
  • --allowEmptyPipe[=false] β€” don't fail when piped input is empty (stdin). Empty pipe, no drama 🫢
  • --cache[=false] β€” enable cached responses. 🧚
  • --cacheBodyPaths=[] β€” cache should limit hashing of selected paths in the json body. Empty indicates all values. πŸ“
  • --cacheTTL="60s" β€” cache time-to-live (TTL) as a duration, i.e. 60s, 2m. ⏳
  • -c, --compact[=false] β€” compact instead of pretty-printed output when using json output. Pretty print is the default if output is the terminal. ✨
  • --confirm[=false] β€” prompt for confirmation. Safety check, bestie 🫢
  • --confirmText="" β€” custom confirmation text. Make it say whatever you need πŸ’…
  • --currentPage=0 β€” current page which should be returned. πŸ“„
  • --customQueryParam=[] β€” add custom URL query parameters. i.e. --customQueryParam 'withCustomOption=true,myOtherOption=myvalue' 🌈
  • --debug[=false] β€” set very verbose log messages. Turn it up, detective πŸ”
  • --delay="0ms" β€” delay after each request, i.e. 5ms, 1.2s. πŸ•°οΈ
  • --delayBefore="0ms" β€” delay before each request, i.e. 5ms, 1.2s. πŸ•°οΈ
  • --dry[=false] β€” dry run. Don't send any data to the server. Fake it till you make it, safely πŸ’€
  • --dryFormat="markdown" β€” dry run output format. i.e. json, dump, markdown or curl. πŸŽ€
  • --examples[=false] β€” show examples for the current command. Show me the moves ✨
  • --filter=[] β€” apply a client side filter to response before returning it to the user. πŸ¦‹
  • --flatten[=false] β€” flatten json output by replacing nested json properties with properties where their names are represented by dot notation. 🌸
  • -f, --force[=false] β€” do not prompt for confirmation. Ignored when using --confirm. Bold of you, bestie πŸ’…
  • -H, --header=[] β€” custom headers. i.e. --header "Accept: value, AnotherHeader: myvalue" πŸ“¬
  • --includeAll[=false] β€” include all results by iterating through each page. All of it, no crumbs πŸ‘‘
  • -k, --insecure[=false] β€” allow insecure server connections when using SSL. Bestie, this is literally the insecure option β€” be careful ⚠️
  • -l, --logMessage="" β€” add custom message to the activity log. πŸ“
  • --maxJobs=0 β€” maximum number of jobs. 0 = unlimited (use with caution!). Like, genuinely caution, bestie 🚨
  • --noAccept[=false] β€” ignore Accept header will remove the Accept header from requests, however PUT and POST requests will only see the effect. πŸ™ˆ
  • --noCache[=false] β€” force disabling of cached responses (overwrites cache setting). 🧚
  • -M, --noColor[=false] β€” don't use colors when displaying log entries on the console. monochrome moment πŸ–€
  • --noLog[=false] β€” disables the activity log for the current command. πŸ“΄
  • --noProgress[=false] β€” disable progress bars. No little loading guys 😭
  • --noProxy[=false] β€” ignore the proxy settings. πŸšͺ
  • -n, --nullInput[=false] β€” don't read the input (stdin). Useful if using in shell for/while loops. πŸ”
  • -o, --output="table" β€” output format i.e. table, json, csv, csvheader. Pick your aesthetic ✨
  • --outputFile="" β€” save JSON output to file (after select/view). πŸ“
  • --outputFileRaw="" β€” save raw response to file (before select/view). πŸ“
  • --outputTemplate="" β€” jsonnet template to apply to the output. πŸŽ€
  • -p, --pageSize=5 β€” maximum results per page. πŸ“
  • --progress[=false] β€” show progress bar. This will also disable any other verbose output. πŸ‘€
  • --proxy="" β€” proxy setting, i.e. http://10.0.0.1:8080. 🌐
  • -r, --raw[=false] β€” show raw response. This mode will force output=json and view=off. Raw and unfiltered, periodt πŸ’…
  • --retries=3 β€” max number of attempts when a failed http call is encountered. Try again, bestie πŸ”
  • --select=[] β€” comma separated list of properties to return. wildcards and globstar accepted, i.e. --select 'id,name,type,**.serialNumber'. 🌟
  • --session="" β€” session configuration. πŸ”
  • --sessionMode="" β€” override default session mode for a single command which would normally be disabled. 🧚
  • -P, --sessionPassword="" β€” override session password. 🀫
  • -U, --sessionUsername="" β€” override session username. i.e. peter or t1234/peter (with tenant). πŸ‘€
  • --silentExit[=false] β€” silent status codes do not affect the exit code. 🀐
  • --silentStatusCodes="" β€” status codes which will not print out an error message. πŸ™ˆ
  • --timeout="600s" β€” request timeout duration, i.e. 60s, 2m. ⏰
  • --totalPages=0 β€” total number of pages to get. πŸ“š
  • -v, --verbose[=false] β€” verbose logging. Tell me everything πŸ”
  • --view="auto" β€” use views when displaying data on the terminal. Disable using --view off. πŸ‘€
  • --withError[=false] β€” errors will be printed on stdout instead of stderr. Plot twist πŸ’€
  • --withTotalElements[=false] β€” request Cumulocity to include the total elements in the response statistics under .statistics.totalElements (introduced in 10.13). πŸ”’
  • -t, --withTotalPages[=false] β€” request Cumulocity to include the total pages in the response statistics under .statistics.totalPages. πŸ“„
  • --workers=1 β€” number of workers. πŸ‘―

πŸ“ EXAMPLE πŸ“

First vibe: remove alarms on the device with the severity set to MAJOR πŸ‘‘

$ c8y alarms deleteCollection --device 12345 --severity MAJOR

Then this one: remove alarms on the device which are active and created in the last 10 minutes ⏳

$ c8y alarms deleteCollection --device 12345 --dateFrom "-10m" --status ACTIVE

🌈 SEE ALSO 🌈

c8y-alarms(1) β€” go read that one too, bestie 🫢


that's the whole page, bestie β€” signing off from the Jan 1980 edition of c8y(1) πŸŽ€βœ¨πŸ’…

πŸ“¦ where this page comes from