# Users - Tag Manager - [API documentation](#api-documentation) - [Notes](#notes) - [Definitions](#definitions) - [Display Tag Manager Accounts](#display-tag-manager-accounts) - [Display Tag Manager Containers](#display-tag-manager-containers) - [Display Tag Manager Workspaces](#display-tag-manager-workspaces) - [Display Tag Manager Tags](#display-tag-manager-tags) - [Display Tag Manager User Permissions](#display-tag-manager-user-permissions) ## API documentation * [Tag Manager API](https://developers.google.com/tag-manager/reference/rest) ## Notes To use these commands you must add the 'Tag Manager API' to your project and update your service account authorization. ``` gam update project gam user user@domain.com update serviceaccount [*] 41) Tag Manager API - Accounts, Containers, Workspaces, Tags - read only [*] 42) Tag Manager API - Users ``` ## Definitions * [``](Collections-of-Users) * [` | `](Collections-of-Items) ``` ::= ::= accounts/ ::= "(,)*" ::= | (select |) | ::= ::= accounts//containers/ ::= "(,)*" ::= | (select |) | ::= ::= accounts//containers//workspaces/ ::= "(,)*" ::= | (select |) | ::= ::= accounts//containers//workspaces//tags/ ``` ## Display Tag Manager Accounts ``` gam show tagmanageraccounts [includegoogletags []] [formatjson] ``` By default, Gam displays the accounts as an indented list of keys and values. * `formatjson` - Display the account in JSON format ``` gam print tagmanagerccounts [todrive *] [includegoogletags []] [formatjson [quotechar ]] ``` By default, Gam displays the accounts as columns of fields; the following option causes the output to be in JSON format, * `formatjson` - Display the fields in JSON format. By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled. When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output. The `quotechar ` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output. `quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used. ## Display Tag Manager Containers ``` gam show tagmanagercontainers [formatjson] ``` By default, Gam displays the containers as an indented list of keys and values. * `formatjson` - Display the container in JSON format ``` gam print tagmanagercontainers [todrive *] [formatjson [quotechar ]] ``` By default, Gam displays the containers as columns of fields; the following option causes the output to be in JSON format, * `formatjson` - Display the fields in JSON format. By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled. When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output. The `quotechar ` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output. `quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used. ## Display Tag Manager Workspaces ``` gam show tagmanagerworkspaces [formatjson] ``` By default, Gam displays the workspaces as an indented list of keys and values. * `formatjson` - Display the workspace in JSON format ``` gam print tagmanagerworkspaces [todrive *] [formatjson [quotechar ]] ``` By default, Gam displays the workspaces as columns of fields; the following option causes the output to be in JSON format, * `formatjson` - Display the fields in JSON format. By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled. When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output. The `quotechar ` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output. `quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used. ## Display Tag Manager Tags ``` gam show tagmanagertags [formatjson] ``` By default, Gam displays the tags as an indented list of keys and values. * `formatjson` - Display the tag in JSON format ``` gam print tagmanagertags [todrive *] [formatjson [quotechar ]] ``` By default, Gam displays the tags as columns of fields; the following option causes the output to be in JSON format, * `formatjson` - Display the fields in JSON format. By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled. When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output. The `quotechar ` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output. `quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used. ## Display Tag Manager User Permissions ``` gam show tagmanagerpermissions [formatjson] ``` By default, Gam displays the permissions as an indented list of keys and values. * `formatjson` - Display the permission in JSON format ``` gam print tagmanagerpermissions [todrive *] [formatjson [quotechar ]] ``` By default, Gam displays the permissions as columns of fields; the following option causes the output to be in JSON format, * `formatjson` - Display the fields in JSON format. By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled. When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output. The `quotechar ` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output. `quotechar` defaults to `gam.cfg/csv_output_quote_char`. When uploading CSV files to Google, double quote `"` should be used.