Version 19

    Note: This is not supported in GateIn 3.2.  For information on REST API's for Portal Objects (MOP) please referr to https://docs.jboss.org/author/display/GTNPORTAL/GateIn+Management.

     

    As an initial effort to create a more "manageable" portal, it has been identified that the need to export and import portal objects (pages, navigation, etc) is important to ease the management of a portal through various environments.  This wiki describes the REST API's that expose management operations on portal objects. 

     

    Also there are two tools that will allow you to export and import portal objects from one environment to the other.  There is a gadget which can be used within the portal, and a command line tool which can point to any portal and perform an export/import.  Please referr to  http://community.jboss.org/wiki/GateIn-ExportImport for more information on how to use these tools.

     

     

    REST API

    A set of RESTful services are available to expose management operations for portal objects: site layout, pages, and navigation.  Each portal container will have a rest-context name and private indicates that these RESTful URL's are secured and require BASIC authentication, where the user is part of the portal administrators role.

     

    Base URL scheme:

    http://[host-name]:[port]/[rest-context]/private/portalobjects

     

    Default portal base URL:

    http://localhost:8080/rest/private/portalobjects

     

    Site REST API

     

    To retrieve all site information:

     

    Url

    http://[host-name]:[port]/[rest-context]/private/portalobjects/sites

     

    Formats

    xml

    Request methods

    GET

    Parameters

    Optional

    • ownerType

    The ownerType of the site.  Valid values are: 'portal' (default), 'group', 'user'.

     

    /sites?ownerType=group

     

     

    To retrieve and update site layout:

    Url

    http://[host-name]:[port]/[rest-context]/private/portalobjects/sites/{ownerId}

    Formats

    xml

    Request methods

    GET, POST

    Parameters

    Optional

    • ownerType

    The ownerType of the site.  Valid values are: 'portal' (default), 'group', 'user'.

     

    /sites/platform/administrators?ownerType=group

     

     

    Pages REST API

     

    To retrieve and update all pages.

    Url

    http://[host-name]:[port]/[rest-context]/private/portalobjects/pages

    Formats

    xml

    Request methods

    GET, POST

    Parameters

    Required

    • ownerId

    The ownerId of the page.  This is typically the site name if you are looking up pages that are part of the portal.

     

    /pages?ownerId=classic

     

    Optional

    • ownerType

    The ownerType of the page.  Valid values are: 'portal' (default), 'group', 'user'.

     

    /pages?ownerId=classic?ownerType=portal

     

     

    To retrieve, update, create, and delete a page.

    Url

    http://[host-name]:[port]/[rest-context]/private/portalobjects/pages/{page-name}

    Formats

    xml

    Request methods

    GET, POST, PUT, DELETE

    Parameters

    Required

    • ownerId

    The ownerId of the page.  This is typically the site name if you are looking up pages that are part of the portal.

     

    /pages/homepage?ownerId=classic

     

    Optional

    • ownerType

    The ownerType of the page.  Valid values are: 'portal' (default), 'group', 'user'.

     

    /pages/homepage?ownerId=classic?ownerType=portal

     

    Navigation REST API

     

    To retrieve, update, create, and delete navigations.

    Url

    http://[host-name]:[port]/[rest-context]/private/portalobjects/navigations

    Formats

    xml

    Request methods

    GET, POST, PUT, DELETE

    Parameters

    Required

    • ownerId

    The ownerId of the page.  This is typically the site name if you are looking up pages that are part of the portal.

     

    /navigations?ownerId=classic

     

    Optional

    • ownerType

    The ownerType of the page.  Valid values are: 'portal' (default), 'group', 'user'.

     

    /navigations?ownerId=classic?ownerType=portal

     

     

    To retrieve, update, create, and delete a navigation node.

    Url

    http://[host-name]:[port]/[rest-context]/private/portalobjects/navigations/{navigation-uri}

    Formats

    xml

    Request methods

    GET, POST, PUT, DELETE

    Parameters

    Required

    • ownerId

    The ownerId of the page.  This is typically the site name if you are looking up pages that are part of the portal.

     

    /navigations/homepage?ownerId=classic

     

    Optional

    • ownerType

    The ownerType of the page.  Valid values are: 'portal' (default), 'group', 'user'.

     

    /navigations/administration/registry?ownerId=/platform/administrators&ownerType=group