---
schema_version: "1"
id: cc5d5743c2f1e9b608ceae067a19ef777f59217b0b5fbb264d11626a288506cd
title: Package
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_package.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_package.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 5d952adb9f34df915bfb7468c8c005fbf9e993a291c09a1efe1d077b9fdf5c92
description: Specifies which metadata components to retrieve as part of a retrieve() call or defines a package of components.
---
# Package

Specifies which metadata components to retrieve as part of a retrieve() call or defines a package of components.

<table class="featureTable sort_table" summary="">



        <thead class="thead sorted" align="left">
          <tr>
            <th class="featureTableHeader  " id="d731507e54">Name</th>

            <th class="featureTableHeader  " id="d731507e57">Type</th>

            <th class="featureTableHeader  " id="d731507e60">Description</th>

          </tr>

        </thead>

        <tbody class="tbody">
          <tr>
            <td class="entry" headers="d731507e54" data-title="Name"><span class="keyword parmname">apiAccessLevel</span></td>

            <td class="entry" headers="d731507e57" data-title="Type">APIAccessLevel (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type
              string)</td>

            <td class="entry" headers="d731507e60" data-title="Description">Package components have access via dynamic Apex and the API to standard and
              custom objects in the organization where they’re installed. Administrators who install
              packages can restrict this access after installation for improved security. The valid
              values are:<ul class="ul bulletList">
                <li class="li">Unrestricted—Package components have the same API access to standard objects as
                  the user who is logged in when the component sends a request to the API.</li>

                <li class="li">Restricted—The administrator can select which standard objects the components
                  can access. Further, the components in restricted packages can only access custom
                  objects in the current package if the user's permissions allow access to
                  them.</li>

              </ul>
            </td>

          </tr>

          <tr>
            <td class="entry" headers="d731507e54" data-title="Name"><span class="keyword parmname">description</span></td>

            <td class="entry" headers="d731507e57" data-title="Type">string</td>

            <td class="entry" headers="d731507e60" data-title="Description"><span class="ph" id="field_description"><a name="field_description"><!-- --></a>A short description of the package.</span></td>

          </tr>

          <tr>
            <td class="entry" headers="d731507e54" data-title="Name"><span class="keyword parmname">fullName</span></td>

            <td class="entry" headers="d731507e57" data-title="Type">string</td>

            <td class="entry" headers="d731507e60" data-title="Description">The package name used as a unique identifier for API access. The
              <span class="keyword parmname">fullName</span> can contain only underscores and alphanumeric
              characters. It must be unique, begin with a letter, not include spaces, not end with
              an underscore, and not contain two consecutive underscores. This field is inherited
              from the <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/metadata.htm" title="The base class for all metadata types. You can’t edit this object. A component is an instance of a metadata type.">Metadata</a>
              component.
            </td>

          </tr>

          <tr>
            <td class="entry" headers="d731507e54" data-title="Name"><span class="keyword parmname">namespacePrefix</span></td>

            <td class="entry" headers="d731507e57" data-title="Type">string</td>

            <td class="entry" headers="d731507e60" data-title="Description"><span class="ph" id="field_namespaceprefix"><a name="field_namespaceprefix"><!-- --></a>The namespace of the developer organization where
                the package was created.</span></td>

          </tr>

          <tr>
            <td class="entry" headers="d731507e54" data-title="Name"><span class="keyword parmname">objectPermissions</span></td>

            <td class="entry" headers="d731507e57" data-title="Type">
              <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_profile.htm#profileobjectpermissions_title">ProfileObjectPermissions</a>[]
            </td>

            <td class="entry" headers="d731507e60" data-title="Description"><span class="ph" id="field_objectPermissions_desc"><a name="field_objectPermissions_desc"><!-- --></a>Indicates which objects are accessible to
                the package, and the kind of access available (create, read, update,
                delete).</span></td>

          </tr>

          <tr>
            <td class="entry" headers="d731507e54" data-title="Name"><span class="keyword parmname">packageType</span></td>

            <td class="entry" headers="d731507e57" data-title="Type">string</td>

            <td class="entry" headers="d731507e60" data-title="Description">Reserved for future use.</td>

          </tr>

          <tr>
            <td class="entry" headers="d731507e54" data-title="Name"><span class="keyword parmname">postInstallClass</span></td>

            <td class="entry" headers="d731507e57" data-title="Type">string</td>

            <td class="entry" headers="d731507e60" data-title="Description">The name of the Apex class that specifies the actions to execute after the
              package has been installed or upgraded. The Apex class must be a member of the package
              and must implement the Apex <samp class="codeph apex_code">InstallHandler</samp>
              interface. In patch upgrades, you can't change the class name in this field but you
              can change the contents of the Apex class. The class name can be changed in major
              upgrades.<p class="p">This field is available in API version 24.0 and later.</p>
            </td>

          </tr>

          <tr>
            <td class="entry" headers="d731507e54" data-title="Name"><span class="keyword parmname">setupWeblink</span></td>

            <td class="entry" headers="d731507e57" data-title="Type">string</td>

            <td class="entry" headers="d731507e60" data-title="Description"><span class="ph" id="field_setupWeblink"><a name="field_setupWeblink"><!-- --></a>The weblink used to describe package
                installation.</span></td>

          </tr>

          <tr>
            <td class="entry" headers="d731507e54" data-title="Name"><span class="keyword parmname">types</span></td>

            <td class="entry" headers="d731507e57" data-title="Type">
              <a class="xref" href="#packagetypemembers">PackageTypeMembers</a>[]
            </td>

            <td class="entry" headers="d731507e60" data-title="Description">The type of component being retrieved.</td>

          </tr>

          <tr>
            <td class="entry" headers="d731507e54" data-title="Name"><span class="keyword parmname">uninstallClass</span></td>

            <td class="entry" headers="d731507e57" data-title="Type">string</td>

            <td class="entry" headers="d731507e60" data-title="Description">The name of the Apex class that specifies the actions to execute after the
              package has been uninstalled. The Apex class must be a member of the package and must
              implement the Apex <samp class="codeph apex_code">UninstallHandler</samp> interface.
              In patch upgrades, you can't change the class name in this field but you can change
              the contents of the Apex class. The class name can be changed in major
              upgrades.<p class="p">This field is available in API version 25.0 and later.</p>
            </td>

          </tr>

          <tr>
            <td class="entry" headers="d731507e54" data-title="Name"><span class="keyword parmname">version</span></td>

            <td class="entry" headers="d731507e57" data-title="Type">string</td>

            <td class="entry" headers="d731507e60" data-title="Description">Required. The version of the component type.</td>

          </tr>

        </tbody>

      </table>

## PackageTypeMembers

Use to specify the name and type of components to be retrieved in a package.

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d731507e279">Name</th>

              <th class="featureTableHeader  " id="d731507e282">Type</th>

              <th class="featureTableHeader  " id="d731507e285">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d731507e279" data-title="Name"><span class="keyword parmname">members</span></td>

              <td class="entry" headers="d731507e282" data-title="Type">string</td>

              <td class="entry" headers="d731507e285" data-title="Description">
                <p class="p">One or more named components, or the wildcard character (<samp class="codeph java">*</samp>) to retrieve all metadata components of the type
                  specified in the <samp class="codeph xml"><span class="tag">&lt;name</span>&gt;</samp> element. To retrieve
                  a standard object, specify it by name. For example, <samp class="codeph xml"><span class="tag">&lt;members</span>&gt;Account<span class="tag">&lt;/members</span>&gt;</samp> retrieves the standard Account
                  object.</p>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d731507e279" data-title="Name"><span class="keyword parmname">name</span></td>

              <td class="entry" headers="d731507e282" data-title="Type">string</td>

              <td class="entry" headers="d731507e285" data-title="Description">
                <p class="p">The type of metadata component to be retrieved. For example, <samp class="codeph xml"><span class="tag">&lt;name</span>&gt;CustomObject<span class="tag">&lt;/name</span>&gt;</samp> retrieves one or more
                  custom objects as specified in the <samp class="codeph xml"><span class="tag">&lt;members</span>&gt;</samp>
                  element.</p>

              </td>

            </tr>

          </tbody>

        </table>

## Wildcard Support in the Manifest File

This metadata type doesn’t support the wildcard character \* (asterisk) in the package.xml manifest file. For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).

#### See Also

- [Sample package.xml Manifest Files](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/manifest_samples.htm "This section includes sample package.xml manifest files that show you how to work with different subsets of metadata. A manifest file can include multiple <types> elements so you could combine the individual samples into one package.xml manifest file if you want to work with all the metadata in one batch.")