
.. _structure-manifest:

:index:`Manifest Structure`
---------------------------

A Manifest structure is returned from :meth:`~jetstream.sendinterface.SendInterface.createManifest`, :meth:`~jetstream.sendinterface.SendInterface.getManifest` and :meth:`~jetstream.sendinterface.SendInterface.getManifests`.

.. glossary::
   :sorted:

   :index:`errorMessage <pair: Manifest Structure; errorMessage>`
      If unsuccessful, this contains a description of the error that occurred. See ``status``.

   :index:`manifestId <pair: Manifest Structure; manifestId>`
       A manifest ID. Manifest IDs are returned from :meth:`~jetstream.sendinterface.SendInterface.createManifest`, and used in other methods to refer to a specific manifest.

   :index:`owner <pair: Manifest Structure; owner>`
      The owner of this manifest. A manifest may be monitored or modified only by its owner, or by a superuser.

   :index:`ownerToken <pair: Manifest Structure; ownerToken>`
      The owner of this manifest, if this manifest was created by a token. A manifest is only visible to its token, owner, or a superuser.

   :index:`ownerTokenSession <pair: Manifest Structure; ownerTokenSession>`
      The token session of this token that created this manifest.
   
   :index:`processing <pair: Manifest Structure; processing>`
      If ``True``, the JetStream server is still processing this item. Use the :meth:`~jetstream.sendinterface.SendInterface.getManifest()` or :meth:`~jetstream.sendinterface.SendInterface.waitForManifest()` method to monitor its progress.

   :index:`status <pair: Manifest Structure; status>`
      The status may be one of the following values:

      :index:`complete <triple: Manifest Structure; status; complete>`
         The manifest is complete, and eligible for use with :meth:`~jetstream.sendinterface.SendInterface.createTransfer`.

      :index:`error <triple: Manifest Structure; status; error>`
         The creation of the manifest failed. The reason for the failure is written to the ``errorMessage`` field.

      :index:`pending <triple: Manifest Structure; status; pending>`
         The manifest is still being processed by the server, and is not yet eligible for use with :meth:`~jetstream.sendinterface.SendInterface.createTransfer`.

   :index:`totalFiles <pair: Manifest Structure; totalFiles>`
      The total number of files in a manifest.

   :index:`totalSize <pair: Manifest Structure; totalSize>`
      The total size, in bytes, of a manifest.

   :index:`userData <pair: Destination Structure; userData>`
      Key-value map of user attached metadata. Use :meth:`~jetstream.sendinterface.SendInterface.updateObjectUserData` and :meth:`~jetstream.sendinterface.SendInterface.deleteObjectUserData` to manipulate object user data.


.. versionchanged:: 2.4.0 Added `ownerToken`, `ownerTokenSession` keys.