c8y(1)

๐Ÿ“ฆ version 2.56.1, in nixpkgs unstable

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 for findByText. ๐Ÿซถ
  • --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 to false to improve query performance. ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง
  • --withChildrenCount[=false] โ€” When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices). ๐Ÿ”ข
  • --withGroups[=false] โ€” When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. ๐Ÿซ‚
  • --withLatestValues=false โŸจFEATURE_PREVIEWโŸฉ โ€” Include c8y_LatestMeasurements fragment, 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, markdown or curl. ๐Ÿ“
  • --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 the Accept header from requests, however PUT and POST requests 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 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. ๐Ÿ‘ท

๐ŸŒˆ 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