c8y(1)

πŸ“¦ version 2.56.1, in nixpkgs unstable

πŸ¦‹ c8y(1) β€” the c8y manual, bestie edition πŸ’…

okay so this is the manual page for c8y, and more specifically for the c8y events list command. it's a whole vibe, it's giving "I read the docs so you don't have to" energy. buckle up πŸŽ€


✨ NAME ✨

c8y-events-list β€” get event collection. that's it. that's the whole name. iconic brevity πŸ’…

✨ SYNOPSIS ✨

c8y events list [flags]

that's your whole incantation. c8y events list, plus whatever flags you're feeling 🌸

✨ DESCRIPTION ✨

bestie, this command grabs you a collection of events, filtered however you like via filter parameters. think of it as the events shelf at the library and you're the main character with a very specific request ✨

✨ OPTIONS ✨

here's your flag menu, no cap. every single one, and what it does πŸ‘‘

  • --createdFrom="" β€” start date (or date and time) of when the event was created. this one's set by the platform during creation, so don't come for it 🫢
  • --createdTo="" β€” end date (or date and time) of when the event was created. also platform-set, also not your business to write 🌸
  • --dateFrom="" β€” start date or date and time of when the event actually occurred. yes, different from created. yes, that matters πŸ’…
  • --dateTo="" β€” end date or date and time of when the event occurred ⭐
  • --device=[] β€” device ID. it also accepts pipeline input, so you can pipe it in like a boss πŸ”₯
  • --fragmentType="" β€” fragment name from the event πŸ¦‹
  • --fragmentValue="" β€” lets you filter events by the fragment's value, but only when you provide it together with fragmentType. it's a package deal, they don't come separately 😭
  • -h, --help[=false] β€” help for list. your little safety net 🧚
  • --lastUpdatedFrom="" β€” start date or date and time of the last update made πŸŽ€
  • --lastUpdatedTo="" β€” end date or date and time of the last update made πŸŽ€
  • --revert[=false] β€” returns the newest events instead of the oldest. must be used with dateFrom and dateTo parameters β€” don't try it solo, it will not slay πŸ™ˆ
  • --type="" β€” event type. your filter's main character moment πŸ‘‘
  • --withSourceAssets[=false] β€” when set to true, events for related source assets get included in the request too. when this parameter is provided a source must be specified ⚠️
  • --withSourceDevices[=false] β€” when set to true, events for related source devices get included in the request too. same rule: when this parameter is provided a source must be specified ⚠️

🌈 OPTIONS INHERITED FROM PARENT COMMANDS 🌈

these bad boys you didn't ask for but you get anyway. they're the family heirlooms πŸ’œ

  • --abortOnErrors=10 β€” aborts the batch when it reaches the specified number of errors πŸ’€
  • --allowEmptyPipe[=false] β€” don't fail when the piped input (stdin) is empty. empty is valid, okay 🫢
  • --cache[=false] β€” enable cached responses ⭐
  • --cacheBodyPaths=[] β€” limits hashing to selected paths in the json body for the cache. empty means all values 🌸
  • --cacheTTL="60s" β€” cache time-to-live 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 πŸ™ˆ
  • --confirmText="" β€” custom confirmation text, for when you wanna ask in your own words πŸ’…
  • --currentPage=0 β€” the 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. it will NOT shut up, and that's the point πŸ‘€
  • --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. all the vibes, none of the consequences 🧚
  • --dryFormat="markdown" β€” dry run output format, i.e. json, dump, markdown or curl πŸŽ€
  • --examples[=false] β€” show examples for the current command 🌟
  • --filter=[] β€” apply a client side filter to the response before returning it to you πŸ¦‹
  • --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 β€” pick a lane bestie 😭
  • -H, --header=[] β€” custom headers, i.e. --header "Accept: value, AnotherHeader: myvalue" πŸ’Œ
  • --includeAll[=false] β€” include all results by iterating through each page. all of them. every last one πŸ‘‘
  • -k, --insecure[=false] β€” allow insecure server connections when using SSL ⚠️
  • -l, --logMessage="" β€” add a custom message to the activity log ✍️
  • --maxJobs=0 β€” maximum number of jobs. 0 = unlimited (use with caution!) πŸ’€
  • --noAccept[=false] β€” ignore the Accept header; this removes the Accept header from requests, however PUT and POST requests will only see the effect 🫠
  • --noCache[=false] β€” force disabling of cached responses (overwrites the cache setting) 🚫
  • -M, --noColor[=false] β€” don't use colors when displaying log entries on the console 🎨
  • --noLog[=false] β€” disables the activity log for the current command πŸ”‡
  • --noProgress[=false] β€” disable progress bars 🚫
  • --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 πŸ“Š
  • --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 πŸ“
  • --retries=3 β€” max number of attempts when a failed http call is encountered πŸ”
  • --select=[] β€” comma separated list of properties to return. wildcards and globstar accepted, i.e. --select 'id,name,type,**.serialNumber' ✨
  • --session="" β€” session configuration πŸŽ€
  • --sessionMode="" β€” override the 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 πŸ—£οΈ
  • --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 🚨
  • --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 🌸

okay these are the actually-useful ones, pay attention bestie πŸ’–

$ c8y events list --type my_CustomType --dateFrom "-10d"
Get events with type 'my_CustomType' that were created in the last 10 days

that's you getting events of type my_CustomType created in the last 10 days. slay ✨

$ c8y events list --device 12345
Get events from a device

and that's you getting events from a device. two lines, both iconic 🫢


πŸŽ€ SEE ALSO πŸŽ€

  • c8y-events(1) β€” the parent, the origin story, the mothership πŸ‘‘

and that's the page!! this lil manual is from Jan 1980 (yes really, that's the date on the tin, we don't question it πŸ’€) and it's part of the c8y(1) manual β€” so go forth, filter your events, and remember: --fragmentValue never travels alone πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from