c8y(1)
π 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 foraddUserToGroup. 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,markdownorcurlπ--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 shellfor/whileloops π-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 forceoutput=jsonandview=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.peterort1234/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 in10.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 π§
c8y-userreferences(1)β go check out the parent command, it's the whole family tree π³
bestie reminder:--groupand--userare 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
- nixpkgs unstable: go-c8y-cli 2.56.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms