c8y(1)

πŸ“¦ version 2.56.1, in nixpkgs unstable

πŸ’… c8y(1) β€” the c8y command, but make it make sense πŸŽ€

okay so bestie, welcome to the c8y manual page (that's the manual name, yes, we're doing this) πŸ’– this particular page is all about one lil subcommand: c8y-userreferences-addUserToGroup β€” user references, adding a user to a group. iconic behaviour, honestly. let's get into it ✨


🌸 NAME 🌸

c8y-userreferences-addUserToGroup β€” add user to group 🫢 that's it, that's the whole job.


πŸ¦‹ SYNOPSIS πŸ¦‹

c8y userreferences addUserToGroup [flags]

so it's c8y, then userreferences, then addUserToGroup, then whatever flags you feel like throwing at it. mwah πŸ’…


✨ DESCRIPTION ✨

Add an existing user to a group. that's the assignment, and it ate πŸ’… no cap, that's literally it β€” the user has to already exist, we're not out here creating anybody new, we're just doing a little matchmaking πŸŽ€


πŸ‘‘ OPTIONS πŸ‘‘

okay the main character options, bestie β€” these belong to addUserToGroup itself:

  • --group=[] β€” the Group ID. required, so like… don't forget it πŸ™ˆ
  • -h, --help[=false] β€” help for addUserToGroup. your emotional support flag πŸ’–
  • --processingMode="" β€” Cumulocity processing mode. yes bestie, we're being fancy ✨
  • --tenant="" β€” the Tenant. whose house are we visiting 🏠
  • --user=[] β€” the user id. required (and it accepts pipeline β€” so you can pipe stuff straight in, we love a shortcut 🫢)

🌈 OPTIONS INHERITED FROM PARENT COMMANDS 🌈

these are the ones you get for free from the parent command β€” the whole family is showing up to support 🫢 there are,,, a lot. buckle up bestie, we're going through all of them, no skipping πŸ’€

  • --abortOnErrors=10 β€” abort the batch when it hits the specified number of errors. like leaving the group chat when it gets too messy 😭
  • --allowEmptyPipe[=false] β€” don't fail when the piped input (stdin) is empty. be nice about it πŸ’œ
  • --cache[=false] β€” enable cached responses. memory of a queen πŸ‘‘
  • --cacheBodyPaths=[] β€” cache should limit hashing of selected paths in the json body. empty means all values 🌸
  • --cacheTTL="60s" β€” cache time-to-live (TTL) as a duration, i.e. 60s, 2m. it's giving expiry date πŸŽ€
  • -c, --compact[=false] β€” compact instead of pretty-printed output when using json output. pretty print is the default if output is the terminal, ngl πŸ’…
  • --confirm[=false] β€” prompt for confirmation. are you sure, bestie? πŸ₯Ί
  • --confirmText="" β€” custom confirmation text. write your own little "r u sure" note ✨
  • --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 we love that πŸ”₯
  • --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 πŸ™ˆ
  • --dryFormat="markdown" β€” dry run output format, i.e. json, dump, markdown or curl πŸ’…
  • --examples[=false] β€” show examples for the current command. yes queen, show us the receipts πŸŽ€
  • --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. squish it flat 🫢
  • -f, --force[=false] β€” do not prompt for confirmation. ignored when using --confirm 🚫
  • -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 left πŸ’€
  • -k, --insecure[=false] β€” allow insecure server connections when using SSL. risky business, but it's your life bestie 🫢
  • -l, --logMessage="" β€” add a custom message to the activity log πŸ“
  • --maxJobs=0 β€” maximum number of jobs. 0 = unlimited (use with caution!). and the manual literally said caution, so like… caution ⚠️
  • --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. monochrome moment πŸ–€
  • --noLog[=false] β€” disables the activity log for the current command πŸ™ˆ
  • --noProgress[=false] β€” disable progress bars. no bar, just vibes πŸ¦‹
  • --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. try again, bestie, you got this πŸ’ͺ
  • --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. 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 πŸ”€
  • --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 bestie, the moment you've been waiting for β€” actual working examples, character for character, go off πŸ‘‘

$ c8y userreferences addUserToGroup --group 1 --user peterpi@example.com
Add a user to a user group

one user, one group, done. slay ✨

$ c8y users list | c8y userreferences addUserToGroup --group admins
Add a list of users to admins group (using pipeline)

pipeline moment!! 🫢 the --user flag accepts pipeline, remember? this is why πŸ’…

$ c8y users list | c8y userreferences addUserToGroup --group business | c8y userreferences addUserToGroup --group admins
Add a list of users to business and admins group (using pipeline)

double pipeline, double group, double iconic 🌈 two addUserToGroup calls chained with | β€” business AND admins, no cap πŸ”₯


🧚 SEE ALSO 🧚


bestie reminder: --group and --user are required. like, actually required. the command will simply not be doing its little task without them πŸ™ˆ

and that's the page!! you read the whole thing, i'm so proud πŸ₯ΉπŸ’œ this was c8y(1) β€” yeah the manual name really is just c8y, we love a humble title β€” source/version c8y(1), dated Jan 1980 (yes, 1980, the lore is deep, don't question it πŸ’€) mwah, go add those users to those groups, periodt πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from