c8y(1)

πŸ“¦ version 2.56.1, in nixpkgs unstable

🌸 c8y β€” the Cumulocity command line interface πŸ’…

ok so real quick bestie, this page is c8y(1) β€” the manual for the c8y command. buckle up, it's a big one, but it's literally just your new fave CLI 🫢


✨ NAME ✨

c8y β€” Cumulocity command line interface. yes that's it. that's the name. iconic behavior honestly πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

c8y [flags]

πŸ’– DESCRIPTION πŸ’–

so c8y is a command line interface that lets you interact with the Cumulocity REST API ✨ and ngl it's the vibe. it's described as ideal for three things, and I'm quoting the source here because it's not my place to lie to you:

  • quick prototyping πŸ”₯
  • exploring the REST API πŸ”
  • Platform maintainers / power users πŸ‘‘

so like. if you're any of those three things, this is your moment. main character energy fr.


πŸ’… OPTIONS πŸ’…

okay here's the big list. every single flag, every default, no skips, no cap. take a sip of water first πŸ“

  • --abortOnErrors=10 β€” abort the batch once it hits the specified number of errors. like a "okay I'm done" button πŸ›‘
  • --allowEmptyPipe[=false] β€” don't fail when the piped input (stdin) is empty. empty pipe? no drama πŸ’€
  • --cache[=false] β€” enable cached responses ✨
  • --cacheBodyPaths=[] β€” cache should limit hashing to selected paths in the json body. an empty value 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 πŸ™ˆ
  • --confirmText="" β€” custom confirmation text ✍️
  • --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 πŸ‘€
  • --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 🧚
  • --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 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 πŸ’ͺ
  • -H, --header=[] β€” custom headers. i.e. --header "Accept: value, AnotherHeader: myvalue" πŸ“¨
  • -h, --help[=false] β€” help for c8y πŸ†˜
  • --includeAll[=false] β€” include all results by iterating through each page πŸ“š
  • -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 β€” and it literally says (use with caution!) so like… caution, bestie ⚠️
  • --noAccept[=false] β€” ignore the Accept header. this 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 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 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 πŸ‘·
lowkey that's a LOT of flags but you ate that. go drink some water πŸ’œ

πŸŽ€ EXAMPLE πŸŽ€

here's the part you actually came for, the receipts ✨

$ c8y devices list
$ c8y devices list --type "myDevice" | c8y devices update --data "myValue=1"
$ c8y operations list --device myDeviceName

the pipe in the middle one? that's the whole vibe. listing then updating in one line, we love a one-liner πŸ‘‘


🌈 SEE ALSO 🌈

so many siblings, a whole family, iykyk πŸ’–

c8y-activitylog(1), c8y-agents(1), c8y-alarms(1), c8y-alias(1), c8y-api(1), c8y-applications(1), c8y-assert(1), c8y-auditrecords(1), c8y-binaries(1), c8y-bulkoperations(1), c8y-cache(1), c8y-cli(1), c8y-completion(1), c8y-configuration(1), c8y-currentapplication(1), c8y-currenttenant(1), c8y-currentuser(1), c8y-databroker(1), c8y-datahub(1), c8y-devicegroups(1), c8y-devicemanagement(1), c8y-deviceprofiles(1), c8y-deviceregistration(1), c8y-devices(1), c8y-events(1), c8y-extensions(1), c8y-features(1), c8y-firmware(1), c8y-identity(1), c8y-inventory(1), c8y-measurements(1), c8y-microservices(1), c8y-notification2(1), c8y-operations(1), c8y-realtime(1), c8y-remoteaccess(1), c8y-retentionrules(1), c8y-scripts(1), c8y-sessions(1), c8y-settings(1), c8y-smartgroups(1), c8y-software(1), c8y-systemoptions(1), c8y-template(1), c8y-tenantoptions(1), c8y-tenants(1), c8y-tenantstatistics(1), c8y-ui(1), c8y-usergroups(1), c8y-userreferences(1), c8y-userroles(1), c8y-users(1), c8y-util(1), c8y-version(1)


and that's the whole page, bestie 🫢 no notes, slay πŸ’…

kisses, this was c8y(1) β€” dated Jan 1980 (yes really, that date is doing its own thing and we respect it) πŸŒΈβœ¨πŸŽ€

πŸ“¦ where this page comes from