> For the complete documentation index, see [llms.txt](https://boomi.markusschmidt.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://boomi.markusschmidt.pro/boomi-console/command-collection/find-all-components-of-specific-types.md).

# Find all Components of specific types

As a developer, I want to get a list of all components of specific types (and sub-types).

For example, you wan to find all **http-connector operations** (`subType="http"`), incl. **patch operations** (`subType="rest-beta"`) and **web-service listener** (`subType="wss"`). You need to following query file, to query to appropriate components.

```json
{
  "QueryFilter": {
    "expression": {
      "operator": "and",
      "nestedExpression": [
        {
          "operator": "or",
          "nestedExpression": [
              { "operator": "EQUALS", "property": "subType", "argument": ["http" ]},
              { "operator": "EQUALS", "property": "subType", "argument": ["rest-beta" ]},
              { "operator": "EQUALS", "property": "subType", "argument": ["wss" ]}
          ]
        },
        { "property": "type", "operator": "EQUALS",   "argument": [ "connector-action" ] },
        { "operator": "EQUALS", "property": "currentVersion", "argument": ["true" ]},
        { "operator": "EQUALS", "property": "deleted",        "argument": ["false" ]}
      ]
    }}
}
```

> It is recommended to use a dedicated Workspace directory to collect all information in that directory: `work\http-operations`.

1. Create that directory in your workspace.
2. Create a file `q-http-ops.json` with the query from above.

```
bc comp get /wd work\http-operations /q q-http-ops.json /children none
```

This command retrieves the metadata of all components matching the query-filter, **incl. their children.**

* [**comp**onent **get**](/boomi-console/commands/arguments/comp-arguments/comp-get-arguments.md) - Resolve and get component metadata incl. their children.
  * Specify `/children none` to omit children, to get only the components returned by the query.
  * Otherwise, in that case, all profiles referenced in the operations will be fetched, too.
* `/wd` Specifies the workspace directory for the current command.
* `/q` Specifies the query file - in the current workspace directory - that is used to resolve the components which are subject to `comp get`.
* `/t compList.csv` will use the *compList.csv* template, to render a complete list with all components.

<figure><img src="/files/5UXHOTq47rLxQm4XtRkt" alt=""><figcaption><p><em>work\http-operations\complist.csv</em> rendered in Excel - use Pivot to get insights</p></figcaption></figure>

### Use a custom template

The default `compList.csv` does not contain a column for *sub-type*, which is quite important for the use-case above.

1. Get the *compList.csv* template from the `Templates\Freemarker` directory where BC is installed (default templates).
2. Paste it into your workspace directory under `Templates\Freemarker` as `compList2.csv`\
   ![](/files/nlfKZBfqjffv9Zyr4ZJj)

```
bc comp get 
    /wd work\http-operations 
    /q q-http-ops.json
    /children none
    /t compList2.csv
```
