org list metadata
List the metadata components and properties of a specified type.
Use this command to identify individual components in your manifest file or if you want a high-level view of particular metadata types in your org. For example, you can use this command to return a list of names of all the CustomObject or Layout components in your org, then use this information in a retrieve command that returns a subset of these components.
The username that you use to connect to the org must have the Modify All Data or Modify Metadata Through Metadata API Functions permission.
force:mdapi:listmetadata
| Flag Name (Long) | Flag Name (Short) | Description |
|---|---|---|
‑‑api‑version | N/A | Type: Value API version to use; default is the most recent API version. Override the api version used for api requests made by this command |
‑‑flags‑dir | N/A | Type: Value Import flag values from a directory. |
‑‑folder | N/A | Type: Value Folder associated with the component; required for components that use folders; folder names are case-sensitive. Examples of metadata types that use folders are Dashboard, Document, EmailTemplate, and Report. |
‑‑json | N/A | Type: Boolean Format output as json. |
‑‑metadata‑type | ‑m | Type: Value Required Metadata type to be retrieved, such as CustomObject; metadata type names are case-sensitive. |
‑‑output‑file | ‑f | Type: Value Pathname of the file in which to write the results. |
‑‑target‑org | ‑o | Type: Value Required Username or alias of the target org. Not required if the target-org configuration variable is already set. |
List the CustomObject components, and their properties, in the org with alias “my-dev-org”:
List the CustomObject components in your default org, write the output to the specified file, and use API version 57.0:
List the Dashboard components in your default org that are contained in the “folderSales” folder, write the output to the specified file, and use API version 57.0: