uPortal

Enterprise open source portal built by and for the higher education community.

This project is maintained by uPortal-Project

API Documentation

REST APIs

uPortal includes an extensive suite of REST APIs that it uses to access and manipulate portal data from within the UI. Swagger-based documentation and tooling is available for these APIs, but is disabled (by default) as a security precaution.

To enable Swagger API documentation, add the following property to uPortal.properties:

org.apereo.portal.rest.swagger.SwaggerConfiguration.enabled=true

After restarting the Tomcat container, you can access the Swagger UI at /uPortal/api/swagger-ui.html.

Swagger API documentation

Single portlet JSON by fname

/api/portlet/{fname}.json

(example: http://localhost:8080/uPortal/api/portlet/what-is-uportal.json )

If the requesting user can BROWSE the portlet with the requested fname, responds with JSON representing the portlet with that fname. (Note structure in example below.)

Data elements:

Naming and describing the portlet:

About conveying arbitrary configuration:

About escaping the portlet container:

About enabling special handling in uPortal-home:

Data elements not understood offhand by the author of this documentation:

Example response:

{
  "portlet": {
    "nodeId": "-1",
    "title": "Welcome to uPortal",
    "description": "Description of uPortal.",
    "url": null,
    "iconUrl": "/ResourceServingWebapp/rs/tango/0.8.90/32x32/mimetypes/text-html.png",
    "faIcon": null,
    "fname": "what-is-uportal",
    "target": null,
    "widgetURL": null,
    "widgetType": null,
    "widgetTemplate": null,
    "widgetConfig": null,
    "staticContent": "\n            \n                <h2>What is uPortal?</h2>\n                \n                <p>\n                    <a href=\"http://www.apereo.org/uportal\" target=\"_blank\">uPortal</a>\n                    is a free and open source Java-implemented web portal \n                    platform developed and maintained by participants drawn \n                    from across higher education under the coordination of \n                    <a href=\"http://www.apereo.org/\" target=\"_blank\">Apereo</a>.\n                    uPortal can aggregate content, present self-service \n                    applications, personalize presentation and content on the \n                    basis of groups and user attributes, drive mobile device applications, and allow advanced\n                    end-user-participatory customization of the portal experience. \n                    uPortal supports the JSR-286 and JSR-168 Java portlet specification for\n                    including your custom applications within the portal.\n                </p>\n                \n                <p>Welcome to uPortal.</p> \n            \n        ",
    "pithyStaticContent": null,
    "parameters": {
      "mobileIconUrl": "/uPortal/media/skins/icons/mobile/feedback.png",
      "iconUrl": "/ResourceServingWebapp/rs/tango/0.8.90/32x32/mimetypes/text-html.png",
      "disableDynamicTitle": "true",
      "configurable": "true"
    },
    "renderOnWeb": false,
    "altMaxUrl": false
  }
}

Portlet Preferences

/api/preferences/{fname}

(example: http://localhost:8080/uPortal/api/preferences/weather )

These endpoints provide a way for soffits and web-components to access and store custom preferences for individual soffits and web-components. There are several different endpoints for the various ways to store and retrieve these preferences. This is an overview of the general uses. See the Swagger UI documentation for specifics of each endpoint.

NOTE: to use any of these endpoints the soffit/web-component must know its own fname as registered in uPortal. This is essential to the functionality of the endpoints

Regular preferences vs default preferences

To access the regular (entity) preferences of an individual soffit or web-component use the endpoints with only prefs in the name. These will return or store the preferences associated with the specific user for the specific soffit/web-component. This will return/store the same information as the internal call to the preferences for portlets per entity.

NOTE: In order to protect unwanted meddling of portlet/soffit/web-component behavior, any preferences that you do not want changed must be declared as readonly when set at registration. Otherwise users can potentially override these settings for themselves.

To access the default (definition) preferences of an individual soffit or web-component use the endpoints with definitionprefs in the name. These will return or store the preferences associated with the definition of the specific soffit/web-component set when registered with uPortal. This will return/store the same information as the internal call to the preferences for portlets.

NOTE: These calls will be rejected if attempted by any user without administrative privileges. This prevents unauthorized meddling of default preferences since these calls can allow one to overwrite readonly preferences.

Only calls

There are two calls with only in their names. These are used to single out the preferences that are only associated with the called level without any extra. These are included because the normal retrieve calls return every preference up to the desired level, with any conflicting information overwritten by the higher level (just as the portlet calls do). If you wish to receive the preferences only associated with a specific level use these calls.

NOTE: This may not return the preferences you expect. For example, any soffit calling the definitononly call will receive the org.apereo.portal.soffit.connector.SoffitConnectorController.serviceUrl value and any soffit data model preferences as well as other definition preferences. Also be aware, if the user has no preferences set and you call entityonly you will receive an empty response body.