org list metadata

List the metadata components and properties of a specified type.

Description for org list metadata 

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.

Aliases for org list metadata 

force:mdapi:listmetadata

Flags 

Flag Name (Long)Flag Name (Short)Description
‑‑api‑versionN/AType: 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‑dirN/AType: Value

Import flag values from a directory.
‑‑folderN/AType: 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.
‑‑jsonN/AType: Boolean

Format output as json.
‑‑metadata‑type‑mType: Value
Required

Metadata type to be retrieved, such as CustomObject; metadata type names are case-sensitive.
‑‑output‑file‑fType: Value

Pathname of the file in which to write the results.
‑‑target‑org‑oType: Value
Required

Username or alias of the target org. Not required if the target-org configuration variable is already set.

Examples for org list metadata 

List the CustomObject components, and their properties, in the org with alias “my-dev-org”:

1sf org list metadata --metadata-type CustomObject --target-org my-dev-org

List the CustomObject components in your default org, write the output to the specified file, and use API version 57.0:

1sf org list metadata --metadata-type CustomObject --api-version 57.0 --output-file /path/to/outputfilename.txt

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:

1sf org list metadata --metadata-type Dashboard --folder folderSales --api-version 57.0 --output-file /path/to/outputfilename.txt