.. Warning: this file is automatically generated. Edits will be lost .. list-table:: Functions defined in :mod:`MNView` :widths: 3 3 10 10 30 :header-rows: 1 * - Tier - Version - REST - Function - Parameters * - Tier 1 - 1.2 - ``GET /views/{theme}/{pid}`` - :func:`view` - (:class:`session`, ``theme``, :class:`id`) ``->`` :class:`Types.OctetStream` * - Tier 1 - 1.2 - ``GET /views`` - :func:`listViews` - (:class:`session`) ``->`` :class:`Types.OptionList` .. function:: view(session,theme,id) -> OctetStream Provides a formatted view of an object (science metadata, data, resource, or other) using the given named theme. If this service is implemented, the :func:`MNView.view` operation must implement at least one {theme} named 'default' to provide a standard (possibly minimalistic) view of the content in HTML format. If the {theme} parameter is not recognized, the service must render the object using the default theme rather than throwing an error. Note that the return type of Types.OctetStream requires that the consuming client has a priori knowledge of the theme being returned (like HTML). Response headers must include the correct mime-type of the view being returned. This method is optional for Member Nodes, but if implemented, MNView.listViews must also be implemented. :Version: 1.2 :REST URL: ``GET /views/{theme}/{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 theme: Indicates which themed view will be used to handle the query. All implementations must support a 'default' HTML theme, but are free to implement additional themes that return both HTML and non-HTML responses. Transmitted as part of the URL path and must be escaped accordingly. :type theme: string :param id: The identifier of the object to render in a view. May be either a PID or a SID. 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 theme. :rtype: :class:`Types.OctetStream` :raises Exceptions.InvalidToken: ``(errorCode=401, detailCode=2830)`` :raises Exceptions.ServiceFailure: ``(errorCode=500, detailCode=2831)`` :raises Exceptions.NotAuthorized: ``(errorCode=401, detailCode=2832)`` :raises Exceptions.InvalidRequest: ``(errorCode=400, detailCode=2833)`` :raises Exceptions.NotImplemented: ``(errorCode=501, detailCode=2834)`` :raises Exceptions.NotFound: ``(errorCode=404, detailCode=2835)`` The specified pid does not exist. .. function:: listViews(session) -> OptionList Provides a list of usable themes for rendering content in a view, including a required 'default' theme. The list of themes is provided as an OptionList, where the option key should be used as the theme name in calls to MNView.view, and the description provides a human readable description of what will be returned fo rthat theme. This method is optional for Member Nodes, but if implemented, MNView.view must also be implemented. :Version: 1.2 :REST URL: ``GET /views`` :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` :returns: A list of available themes that can be used with the MNView.view service. :rtype: :class:`Types.OptionList` :raises Exceptions.InvalidToken: ``(errorCode=401, detailCode=2840)`` :raises Exceptions.ServiceFailure: ``(errorCode=500, detailCode=2841)`` :raises Exceptions.NotAuthorized: ``(errorCode=401, detailCode=2842)`` :raises Exceptions.InvalidRequest: ``(errorCode=400, detailCode=2843)`` :raises Exceptions.NotImplemented: ``(errorCode=501, detailCode=2844)``