c8y(1)
This is the c8y(1) manual page for c8y inventory findByText โ aka c8y-inventory-findByText. Pull up a chair, bestie; weโre finding managed objects by text and itโs about to be iconic. ๐
โจ
โจ NAME โจ
c8y-inventory-findByText โ Find managed object by text collection ๐
๐ฆ SYNOPSIS ๐ฆ
The summoning line is literally:
c8y inventory findByText [flags]
๐ DESCRIPTION ๐
Find a collection of managedObjects which match a given text value. Thatโs the whole vibe: you give it text, it hunts for matching managed objects. ๐๐ฆ
๐ OPTIONS ๐
Okay, flag inventory time. Every single one is here, no crumbs left behind:
--fragmentType=""โ ManagedObject fragment type. ๐งฉ-h,--help[=false]โ help forfindByText. ๐ซถ--skipChildrenNames[=false]โ Donโt include the child devices names in the response. This can improve the API response because the names donโt need to be retrieved. ๐ซ๐ถ--text=""โ Search for managed objects where a property value is equal to the given one. The following properties are examined:id,type,name,owner,externalIds. (required) (accepts pipeline) ๐จ--type=""โ ManagedObject type. ๐ท๏ธ--withChildren[=false]โ Determines if children with ID and name should be returned when fetching the managed object. Set it tofalseto improve query performance. ๐จโ๐ฉโ๐ง--withChildrenCount[=false]โ When set totrue, the returned result will contain the total number of children in the respective objects (childAdditions,childAssetsandchildDevices). ๐ข--withGroups[=false]โ When set totrueit returns additional information about the groups to which the searched managed object belongs. This results in setting theassetParentsproperty with additional information about the groups. ๐ซ--withLatestValues=falseโจFEATURE_PREVIEWโฉ โ Includec8y_LatestMeasurementsfragment, which contains the latest measurement values reported by the device to the platform. โก--withParents[=false]โ Include a flat list of all parents and grandparents of the given object. ๐ณ
๐งฌ OPTIONS INHERITED FROM PARENT COMMANDS ๐งฌ
These are the parent-command flags that come along for the ride. All of them, bestie:
--abortOnErrors=10โ Abort batch when reaching specified number of errors. ๐--allowEmptyPipe[=false]โ Donโt fail when piped input is empty (stdin). ๐ซง--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. โ--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,markdownorcurl. ๐--examples[=false]โ Show examples for the current command. ๐ก--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. ๐ช-H,--header=[]โ custom headers. i.e.--header "Accept: value, AnotherHeader: myvalue". ๐จ--includeAll[=false]โ Include all results by iterating through each page. ๐-k,--insecure[=false]โ Allow insecure server connections when using SSL. ๐-l,--logMessage=""โ Add custom message to the activity log. ๐ชต--maxJobs=0โ Maximum number of jobs.0= unlimited (use with caution!) ๐จ--noAccept[=false]โ Ignore Accept header will remove theAcceptheader from requests, howeverPUTandPOSTrequests 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. ๐จ--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 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. ๐--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.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. ๐ฃ๏ธ--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 ๐
Bestie, the examples are literally right here:
$ c8y inventory findByText --text "myText"
Get a list of managed objects
$ echo "myText" | c8y inventory findByText
Find managed objects which contain the text 'myText' (using pipeline)
$ echo "myText" | c8y inventory findByText --fragmentType c8y_IsDevice
Find managed objects which contain the text 'myText' and is a device (using pipeline)
โญ SEE ALSO โญ
This page lives in the c8y(1) manual and is dated Jan 1980 โ bye bestie, go find those managed objects ๐๐ซถ
๐ฆ 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