Retrieve Portals

get

/v1/portal/portals

Returns information about the portal based on the specified query. Note: when search criteria is omitted, returns all the available portal

Request

Query Parameters
  • You can use the query parameter limit to specify the maximum number of retrieved items per page in the response body.

    The following is the format to set the limit: &limit=number of items per page.

    By default, the limit is set to 10 items per page.

    Example: This example shows how to set the limit to 5 items per page

    http://host:port/rest/api/v1/portal/portals?utoken=access_token&limit=5.

    Default Value: 10
  • You can use the query parameter offset to specify the position of the first retrieved item.

    The following is the format to set the offset: &offset=offset_number

    By default, the value of the offset is set to 0.

    Example: The following example shows how to set the offset to 5:

    http://host:port/rest/api/v1/portal/portals?utoken=access_token&offset=5

    Default Value: 0
  • You can use the orderBy parameter to sort the retrieved items in ascending or descending order.
    • Use asc to sort in ascending order (for example, &orderBy=name:asc)
    • Use desc to sort in descending order (for example, &orderBy=name:desc)

    Note:

    • Always use the orderBy query parameter with a QueryObject.
    • The following are the only four attributes that can be used with the orderBy parameter: name, shortId, created and modified.

    Example: The following example shows how to use the orderBy parameter to sort the retrieved items for the name attribute in ascending order:

    http://host:port/rest/api/v1/portal/portals?utoken=access_token&q=NameLikeQuery;name:HR%&orderBy=name:asc

    In this example, the q parameter is q=NameLikeQuery;name:HR%, where the query object is NameLikeQuery and the queryAttribute is name. This query returns all the portals whose name starts with HR and the name attribute is sorted in the ascending order.

  • You can use the query parameter q to filter the retrieved items based on a query object.

    The following is the syntax to use the query parameter:

    q=QueryObject;queryAttribute:'searchAttribute'

    For example: q=DisplayNameQuery;displayName:DemoPortal

    • QueryObject: In this example DisplayNameQuery is used to query. Ensure that you use only the supported QueryObject. See below for the list of supported query objects in WebCenter Portal.
    • queryAttribute: Attributes supported by the specified QueryObject. In this example, displayName is the one of the attributes of DisplayNameQuery. See Java API Reference for Oracle WebCenter Portal for the supported query attributes for the specified QueryObject.
    • searchAttribute: This specifies the value of the queryAttribute. In this example, use the portal displayName, DemoPortal.

    The following are the supported queryObjects in WebCenter Portal.

    • DisplayNameQuery: Use this query to search for a particular display name of the portal.

      Example: The following example shows how to search for a portal named HRPortal:

      http://host:port/rest/api/v1/portal/portals?utoken=accesstoken&q=DisplayNameQuery;displayName:HRPortal

    • NameLikeQuery: Use this query to search for a specific name attribute.

      You need to provide the search string to the name attribute, example, HR. If you append the character % with the search string, all the portals which has the word beginning with search string is retrieved:

      Example: The following example shows how to search for the portal name beginning with the word HR:

      http://host:port/rest/api/v1/portal/portals?utoken=access_token&q=NameLikeQuery;name:HR%

    • NameQuery: Use this query to search based on the portal name.

      Provide the complete portal name as the query parameter value.

      Example: The following example shows how to search for the portal name DemoPortal:

      http://host:port/rest/api/v1/portal/portals?utoken=access_token&&q=NameQuery;name:DemoPortal

    • DiscoverablePortalQuery: Use this query to retrieve all the discoverable portals that the user is authenticated to view.

      The following example shows how to retrieve all the discoverable portals:

      http://host:port/rest/api/v1/portal/portals?utoken=access_token&q=DiscoverablePortalQuery

    • JoinedPortalQuery: Use this query to retrieve all the portals, which the logged-in user is a member.

      The following example shows how to retrieve all the portals using the JoinedPortalQuery:

      http://host:port/rest/api/v1/portal/portals?utoken=access_token&q=JoinedPortalQuery

    • DefaultPortalQuery: Use this query to retrieve the DefaultGroupSpace available out-of-the-box in Oracle WebCenter Portal.

      http://host:port/rest/api/v1/portal/portals?utoken=access_token&q=DefaultPortalQuery

    • AllPortalQuery

      In the example, the query returns all those portals, which the logged-in user is a member.

      http://host:port/rest/api/v1/portal/portals?utoken=access_token=AllPortalQuery

    • JoinedOrPublicPortalQuery: Use this query to retrieve all the public portal and the portals, which the logged-in user is a member.

      http://host:port/rest/api/v1/portal/portals?utoken=access_token&q=JoinedOrPublicPortalQuery

    • PublicPortalQuery: Use this query to retrieve all the Public Portals:

      http://host:port/rest/api/v1/portal/portals?utoken=access_token&q=AllPortalQuery.

      In this example, the admin flag is set to true. This query returns all those portals which the logged-in user is member and also public portals:

      http://host:port/rest/api/v1/portal/portals?utoken=access_token&q=AllPortalQuery;admin:true

    • NameDescriptionLikeQuery: Use this query to retrieve the portal name and description that match the value provided in the queryAttribute name. You can use only one queryAttribute name.

      The following example shows how to query using the NameDescriptionLikeQuery:

      http://host:port/rest/api/v1/portal/portals?utoken=access_token&q=NameDescriptionLikeQuery;name:HR%

      In this example, all the portals whose name or description begins with HR are retrieved.

    • ModeratedPortalQuery: Use this query to retrieve all the portals which the logged-in user is the Moderator.

      http://host:port/rest/api/v1/portal/portals?utoken=access_token&q=ModeratedPortalQuery

    • NameNamespaceQuery: This query uses two attributes, one name and the other namespace. The namespace can be portal, page, pagestyle and so on. The name parameter takes the portal name as input parameter.

      http://host:port/rest/api/v1/portal/portals?utoken=access_token&q=NameNamespaceQuery;name:HRPortal;namespace:portal

      In this example, name attribute is used, which is the portal name, HRPortal, and namespace attribute is used as the second attribute and the value provided is portal. This query returns a portal whose portal name matches HRPortal.

    • SinceQuery: Use this query to retrieve all items of a given type modified since a given date. The date should in the following format yyyy-MM-dd'T'HH:mm:ss.SSSX

      For example, SinceQuery;date:2001-07-04T12:08:56.235-0700

      The following example shows how to retrieve all portals modified before the date 2018-11-19T12:08:56.235-0700:

      http://host:port/rest/api/v1/portal/portals?utoken=access_token&q=SinceQuery;date:2018-11-19T12:08:56.235-0700

Back to Top

Response

Supported Media Types

200 Response

success
Body ()
Root Schema : schema
Type: array
Show Source
Nested Schema : portals
Type: object
Show Source
Nested Schema : linkStates
Type: array
Show Source
Nested Schema : portal
Type: array
Show Source
Nested Schema : LinkElementState
Type: object
Show Source
Nested Schema : pathLinkValues
Type: array
Show Source
Nested Schema : pathLinkWildcards
Type: array
Show Source
Nested Schema : reflect.Method
Type: object
Show Source
Nested Schema : annotatedExceptionTypes
Type: array
Show Source
Nested Schema : annotatedParameterTypes
Type: array
Show Source
Nested Schema : reflect.AnnotatedType
Type: object
Show Source
Nested Schema : genericExceptionTypes
Type: array
Show Source
Nested Schema : genericParameterTypes
Type: array
Show Source
Nested Schema : reflect.Type
Type: object
Show Source
Nested Schema : parameters
Type: array
Show Source
Nested Schema : typeParameters
Type: array
Show Source
Nested Schema : reflect.Parameter
Type: object
Show Source
Nested Schema : reflect.Executable
Type: object
Show Source
Nested Schema : annotatedExceptionTypes
Type: array
Show Source
Nested Schema : annotatedParameterTypes
Type: array
Show Source
Nested Schema : genericExceptionTypes
Type: array
Show Source
Nested Schema : genericParameterTypes
Type: array
Show Source
Nested Schema : parameters
Type: array
Show Source
Nested Schema : typeParameters
Type: array
Show Source
Nested Schema : reflect.TypeVariable
Type: object
Show Source
Nested Schema : annotatedBounds
Type: array
Show Source
Nested Schema : bounds
Type: array
Show Source
Nested Schema : portal
Type: object
Show Source
Nested Schema : includedServices
Type: array
Show Source
Nested Schema : linkStates
Type: array
Show Source
Nested Schema : Locale
Type: object
Show Source
Nested Schema : Linked
Type: object
Show Source
Nested Schema : reference
Type: object
Show Source
Nested Schema : unicodeLocaleAttributes
Type: array
Show Source
Nested Schema : unicodeLocaleKeys
Type: array
Show Source
Nested Schema : linkStates
Type: array
Show Source
Nested Schema : linkStates
Type: array
Show Source

400 Response

Bad request: invalid search or orderBy parameter supplied

403 Response

Invalid utoken supplied
Back to Top

Examples

Use the endpoint to retrieve a collection of portals available in Oracle WebCenter Portal that you are authorized to view. In the response, you can view information related to each portal, including shortId, which is used to retrieve additional information about a portal. For example, retrieve information about resource catalog or skins of a portal.

Note: You can use the query parameters to paginate, sort or filter your results. The query paramters supported for this endpoint are limit, offset, orderBy, q.

To retrieve information about the available portals in Oracle WebCenter Portal submit a GET request on the REST resource. Use the following format to submit a GET request using cURL:

curl -i -X GET 
http://hostname:port/rest/api/v1/portal/portals?utoken=utoken
-H 'Content-Type: application/json'
  

where

  • hostname:port is the name of the host and the IP port where Oracle WebCenter Portal is running. For example, example.com:8888.

  • utoken is the API token for accessing the portal APIs. For example, utoken=utoken=abcdIC05zgjZoqCF8ShWL42AhTVvq-fc8uFshnw%2A%2A. For more information, see Authentication.

HTTP Status Code

HTTP_STATUS = 200

Example of Response Body

In this example, you can view the contents of the response body in JSON format, including the shortId for the portal, In this example, shortId: Aiki s highlighted.

{
    "resourceType": "urn:oracle:webcenter:portal:portals",
    "startIndex": 0,
    "itemsPerPage": 10,
    "items": [
        {       
        .                                                                               ,
            "resourceType": "urn:oracle:webcenter:portal:portal",
            "displayName": "Default Group Space Metadata",
            "icon": "/oracle/webcenter/space/metadata/spaces/images/project_logo.gif",
            "logo": "/oracle/webcenter/space/metadata/spaces/images/project_logo.gif",
            "supportedLanguages": "English-US, English-UK",
            "allMailingList": "all@example.com",
            "adminMailingList": "admin@example.com",
            "securitySeededUsers": "admin",
            "securitySeededRoles": "Moderator",
            "pageCreationSettingScheme": "WCSchemeNone",
            "portalLifecycleStateMode": "active",
            "portalLifecycleStateLastChangedBy": "admin",
            "subGSCount": 0,
            "reorderDeviceGroups": false,
            "isPublic": true,
            "memberCount": 0,
            "isSeeded": true,
            "isFooterHidden": false,
            "isOnline": true,
            "isDiscoverable": true,
            "isPublishRSS": false,
            "isSelfRegistration": false,
            "isWorkflowApprovalSubscriptionApprovalRequired": true,
            "isWorkflowApprovalSubscriptionEnableAllRoles": true,
            "isWorkflowApprovalUnsubscriptionApprovalRequired": true,
            "isWorkflowApprovalUnsubscriptionEnableAllRoles": true,
            "isPageCreationSettingInstantCreate": false,
            "isClosed": false,
            "isBlockAllAccess": false,
            "javaFormatId": "s8bba_beee_296c916a23ed",
            "created": "2018-07-09T01:46:12.943Z",
            "securityId": "portal/s8bbyrrf_296abcdd",
            "shortId": "Aik",
            "creator": "system",
            "modifier": "system",
            "modified": "2018-07-09T01:46:12.943Z",
            "description": "This is the default group space metadata",
            "namespace": "portal",
            "currentVersionId": "7bd-99aa-ab34aec08163",
            "locale": "en_US",
            "id": "8bba98ff-296c916a23ed",
            "name": "DefaultGroupSpace"
        }
    ]
}

Use Pagination in REST API

When you're retrieving portals in WebCenter Portal, there'll be lot of results to view. For that, you can use the query parameters, like limit, offset to paginate your results.

The query parameters supported for this endpoint are limit, offset, orderBy, q.

When you retrieve information using the GET method, by default, the page shows 10 items per page. You can set the number of items per page using the limit query parameter.

The following example shows how to the set the number of items per page to 2:

curl -i -X GET 
http://hostname:port/rest/api/v1/portal/portals?utoken=utoken&limit=2
-H 'Content-Type: application/json'

The following is the response body which shows only two items per page:

{
    
    
    "resourceType": "urn:oracle:webcenter:portal:portals",
    "startIndex": 0,
    "itemsPerPage": 2,
    "items": [
    
    "resourceType": "urn:oracle:webcenter:portal:portal",
            "displayName": "Default Group Space Metadata",
            "icon": "/oracle/webcenter/space/metadata/spaces/images/project_logo.gif",
            "logo": "/oracle/webcenter/space/metadata/spaces/images/project_logo.gif",
            "supportedLanguages": "English-US, English-UK",
            "allMailingList": "all@example.com",
            "adminMailingList": "admin@example.com",
            "securitySeededUsers": "admin",
            "securitySeededRoles": "Moderator",
            "pageCreationSettingScheme": "WCSchemeNone",
            "portalLifecycleStateMode": "active",
            
            "id": "8bba98ff-296c916a23ed",
            "name": "DefaultGroupSpace"
        },
     "resourceType": "urn:oracle:webcenter:portal:portal",
            "keywords": "portal",
            "displayName": "Portal1",
            "icon": "/oracle/webcenter/siteresources/scopedMD/shared/images/portalnew_icon.png",
            "logo": "/oracle/webcenter/siteresources/scopedMD/shared/images/portalnew_logo.png",
            "preview": "/oracle/webcenter/siteresources/scopedMD/shared/images/portalnew_logo.png",
            "creationStatus": "Completed",
            "supportedLanguages": "English-US, English-UK",
            "allMailingList": "yourCommunityName@example.com",
            "adminMailingList": "yourCommunityName-admin@example.com",

            "id": "82e88931-1093-4e31-95bc-b5b6935b6d4e",
            "name": "HRPortal
        }
      ]
}
            
      

Let's say you have 10 items in the catalog to retrieve and now you want to retrieve only two items per page. Later, you want to view the result from the third item.

To view the results from the third item, you need to use the offset query parameter, that sets the start position.

The following example shows how to set the offset to 3, so that you can view results from the third item:

curl -i -X GET 
http://hostname:port/rest/api/v1/portal/portals?utoken=utoken&offset=3&limit=2
-H 'Content-Type: application/json'

The following is the response body which shows the results from the third item and only 2 items per page:

{
    
    
    "resourceType": "urn:oracle:webcenter:portal:portals",
    "startIndex": 3,
    "itemsPerPage": 2,
    "items": [
    
    "resourceType": "urn:oracle:webcenter:portal:portal",
            "displayName": "AVi Intranete",
            "icon": "/oracle/webcenter/space/metadata/spaces/images/project_logo.gif",
            "logo": "/oracle/webcenter/space/metadata/spaces/images/project_logo.gif",
            "supportedLanguages": "English-US, English-UK",
            "allMailingList": "all@example.com",
            
            
            "id": "23454a98ff-296c916a23ed",
            "name": "AViIntranete"
        },
     "resourceType": "urn:oracle:webcenter:portal:portal",
            "keywords": "portal",
            "displayName": "Avi Portal1",
            "icon": "/oracle/webcenter/siteresources/scopedMD/shared/images/portalnew_icon.png",
            "logo": "/oracle/webcenter/siteresources/scopedMD/shared/images/portalnew_logo.png",
            

            "id": "45677-1093-95bc-b5b6935b6d4e",
            "name": "AviPortal
        }
      ]
}
            
      

Sorting

In WebCenter Portal, you can use query parameters to sort the items that you want to retrieve. This example shows how to use the orderBy parameter to sort the name attribute in ascending order:

Note: For other supported query parameters, see the Query Parameters section.

curl -i -X GET 
http://hostname:port/rest/api/v1/portal/portals?utoken=utoken&q=NameLikeQuery;name:HR%&orderBy=name:asc&limit=3
-H 'Content-Type: application/json'

The following example shows the response body, where the portal name is sorted in the ascending order:

{
    
    "resourceType": "urn:oracle:webcenter:portal:portals",
    "startIndex": 0,
    "itemsPerPage": 3,
    "items": [
        
            "resourceType": "urn:oracle:webcenter:portal:portal",
            "keywords": "portal,JSON",
            "displayName": "HR Finance Portal",
            "icon": "/oracle/webcenter/siteresources/scopedMD/shared/images/portalnew_icon.png",
            "logo": "/oracle/webcenter/siteresources/scopedMD/shared/images/portalnew_logo.png",
            "preview": "/oracle/webcenter/siteresources/scopedMD/shared/images/portalnew_logo.png",
            
            
                "resourceType": "urn:oracle:webcenter:portal:navigationnode",
                "portalName": "HRFinancePortal",
                "namespace": "",
                "name": "root"
            },
            
            "shortId": "Amc",
            "namespace": "portal",
            "locale": "en_US",
            "id": "e2a986b8-7c1e655ba",
            "name": "HRFinancePortal"
        },
        
            "resourceType": "urn:oracle:webcenter:portal:portal",
            "keywords": "portal,JSON",
            "displayName": "HR MY Portal",
            "icon": "/oracle/webcenter/siteresources/scopedMD/shared/images/portalnew_icon.png",
            "logo": "/oracle/webcenter/siteresources/scopedMD/shared/images/portalnew_logo.png",
            "preview": "/oracle/webcenter/siteresources/scopedMD/shared/images/portalnew_logo.png",
            
            
                "resourceType": "urn:oracle:webcenter:portal:navigationnode",
                "portalName": "HRMyPortal",
                "namespace": "",
                "name": "root"
            },
            
            "shortId": "Als",
            "namespace": "portal",
            "locale": "en_US",
            "id": "5608eed1-893472d",
            "name": "HRMyPortal"
        },
        
            "resourceType": "urn:oracle:webcenter:portal:portal",
            "keywords": "portal,JSON",
            "displayName": "HR Portal",
            "icon": "/oracle/webcenter/siteresources/scopedMD/shared/images/portalnew_icon.png",
            "logo": "/oracle/webcenter/siteresources/scopedMD/shared/images/portalnew_logo.png",
            "preview": "/oracle/webcenter/siteresources/scopedMD/shared/images/portalnew_logo.png",
           
            
                "resourceType": "urn:oracle:webcenter:portal:navigationnode",
                "portalName": "HRPortal",
                "namespace": "",
                "name": "root"
            },
            
            "shortId": "Ak8",
            "namespace": "portal",
            "locale": "en_US",
            "id": "3bc82a91-03958d8e",
            "name": "HRPortal"
        }
    ]
}
Back to Top