.. Warning: this file is automatically generated. Edits will be lost .. list-table:: Functions defined in :mod:`MNPackage` :widths: 3 3 10 10 30 :header-rows: 1 * - Tier - Version - REST - Function - Parameters * - Tier 1 - 1.2 - ``GET /packages/{packageType}/{pid}`` - :func:`getPackage` - (:class:`session`, :class:`packageType`, :class:`id`) ``->`` :class:`Types.OctetStream` .. function:: getPackage(session,packageType,id) -> OctetStream Provides all of the content of a DataONE data package as defined by an OAI-ORE document in DataONE, in one of several possible package serialization formats. The serialized package will contain all of the data described in the ORE aggregation. The default implementation will include packages in the BagIt format. The packageType formats must be specified using the associated ObjectFormat formatId for that package serialization format. The {id} parameter must be the identifier of an ORE package object. If it is the identifier of one of the science metadata documents or data files contained within the package, the Member Node should throw an InvalidRequest exception. Identifiers may be either PIDss or SIDs. This method is optional for Member Nodes. :Version: 1.2 :REST URL: ``GET /packages/{packageType}/{pid}`` :param session: Session information that contains the identity of the calling user as retrieved from the X.509 certificate which must be traceable to the CILogon service. The subject of the session defaults to the :term:`public user` if the certificate was not provided with the request. Transmitted as part of the SSL handshake process. :type session: :class:`Types.Session` :param packageType: Indicates which package format will be used to serialize the package. All implementations must support a default BagIt package serialization, but are free to implement additional package serialization formats. Transmitted as part of the URL path and must be escaped accordingly. :type packageType: :class:`Types.ObjectFormatIdentifier` :param id: The identifier of the package or object in a package to be returned as a serialized package. Transmitted as part of the URL path and must be escaped accordingly. :type id: :class:`Types.Identifier` :returns: Any return type is allowed, including application/octet-stream, but the format of the response should be specialized by the requested packageType. :rtype: :class:`Types.OctetStream` :raises Exceptions.InvalidToken: ``(errorCode=401, detailCode=2870)`` :raises Exceptions.ServiceFailure: ``(errorCode=500, detailCode=2871)`` :raises Exceptions.NotAuthorized: ``(errorCode=401, detailCode=2872)`` :raises Exceptions.InvalidRequest: ``(errorCode=400, detailCode=2873)`` :raises Exceptions.NotImplemented: ``(errorCode=501, detailCode=2874)`` :raises Exceptions.NotFound: ``(errorCode=404, detailCode=2875)`` The specified pid does not exist.