Retrieve Portals
/v1/portal/portals
Request
-
limit(optional): integer(int32)
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
-
offset(optional): integer(int32)
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:
By default, the value of the offset is set to 0.&offset=offset_number
Example: The following example shows how to set the offset to 5:
http://host:port/rest/api/v1/portal/portals?utoken=access_token&offset=5Default Value:0
-
orderBy(optional): string
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
andmodified
.
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.
- Use
-
q(optional): string
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
Response
- application/json
200 Response
object
-
accessible(optional):
boolean
-
annotatedExceptionTypes(optional):
array annotatedExceptionTypes
-
annotatedParameterTypes(optional):
array annotatedParameterTypes
-
annotatedReceiverType(optional):
object reflect.AnnotatedType
-
annotatedReturnType(optional):
object reflect.AnnotatedType
-
bridge(optional):
boolean
-
default(optional):
boolean
-
defaultValue(optional):
integer
-
genericExceptionTypes(optional):
array genericExceptionTypes
-
genericParameterTypes(optional):
array genericParameterTypes
-
genericReturnType(optional):
object reflect.Type
-
modifiers(optional):
integer(int32)
-
name(optional):
string
-
parameterCount(optional):
integer(int32)
-
parameters(optional):
array parameters
-
synthetic(optional):
boolean
-
typeParameters(optional):
array typeParameters
-
varArgs(optional):
boolean
object
-
annotatedType(optional):
object reflect.AnnotatedType
-
declaringExecutable(optional):
object reflect.Executable
-
implicit(optional):
boolean
-
modifiers(optional):
integer(int32)
-
name(optional):
string
-
namePresent(optional):
boolean
-
parameterizedType(optional):
object reflect.Type
-
synthetic(optional):
boolean
-
varArgs(optional):
boolean
object
-
accessible(optional):
boolean
-
annotatedExceptionTypes(optional):
array annotatedExceptionTypes
-
annotatedParameterTypes(optional):
array annotatedParameterTypes
-
annotatedReceiverType(optional):
object reflect.AnnotatedType
-
annotatedReturnType(optional):
object reflect.AnnotatedType
-
genericExceptionTypes(optional):
array genericExceptionTypes
-
genericParameterTypes(optional):
array genericParameterTypes
-
modifiers(optional):
integer(int32)
-
name(optional):
string
-
parameterCount(optional):
integer(int32)
-
parameters(optional):
array parameters
-
synthetic(optional):
boolean
-
typeParameters(optional):
array typeParameters
-
varArgs(optional):
boolean
object
-
acronym(optional):
string
-
adminMailingList(optional):
string
-
allMailingList(optional):
string
-
ancestorPath(optional):
string
-
applicationID(optional):
string
-
copyrightMessage(optional):
string
-
created(optional):
string(date-time)
-
creationStatus(optional):
string
-
creator(optional):
string
-
currentVersionId(optional):
string
-
defaultLanguage(optional):
string
-
description(optional):
string
-
displayName:
string
Name of the portal as displayed to users.
-
documentRef(optional):
string
-
enabledTools(optional):
string
-
helpPage(optional):
string
-
icon(optional):
string
-
iconScaled(optional):
string
-
id(optional):
string
-
includedServices(optional):
array includedServices
-
includeMembers(optional):
boolean
-
includeRoles(optional):
boolean
-
inviteWebCenterUsersEnabled(optional):
string
-
isBlockAllAccess(optional):
boolean
-
isClosed(optional):
boolean
-
isDiscoverable(optional):
boolean
- isFooterHidden(optional): boolean
-
isOnline(optional):
boolean
-
isPageCreationSettingInstantCreate(optional):
boolean
-
isPublic(optional):
boolean
-
isPublishRSS(optional):
boolean
-
isSeeded(optional):
boolean
-
isSelfRegistration(optional):
boolean
-
isWorkflowApprovalSubscriptionApprovalRequired(optional):
boolean
-
isWorkflowApprovalSubscriptionEnableAllRoles(optional):
boolean
-
isWorkflowApprovalUnsubscriptionApprovalRequired(optional):
boolean
-
isWorkflowApprovalUnsubscriptionEnableAllRoles(optional):
boolean
-
javaFormatId(optional):
string
-
keywords(optional):
string
-
link(optional):
array link
-
linkStates(optional):
array linkStates
-
locale(optional):
object Locale
-
loginFailedPage(optional):
object Linked
-
loginPage(optional):
object Linked
-
logo(optional):
string
-
logoScaled(optional):
string
-
memberCount(optional):
integer(int32)
-
modified(optional):
string(date-time)
-
modifier(optional):
string
-
name:
string
Name of the portal. Note the name of the portal is without space. For example, HRportal.
-
namespace(optional):
string
- navigationRootNode(optional): object Linked
-
newVersionId(optional):
string
-
offlinePage(optional):
object Linked
-
pageCreationSettingScheme(optional):
string
-
pageCreationStyle(optional):
object Linked
-
portalColor(optional):
string
-
portalLifecycleStateLastChangedBy(optional):
string
-
portalLifecycleStateLastChangedDate(optional):
string(date-time)
-
portalLifecycleStateMode(optional):
string
-
preview(optional):
string
-
previewScaled(optional):
string
-
privacyPolicyURL(optional):
string
-
reference(optional):
object reference
-
reorderDeviceGroups(optional):
boolean
-
resourceCatalogForGroupSpaceSiteTemplates(optional):
object Linked
-
resourceType(optional):
string
-
securityId(optional):
string
-
securitySeededRoles(optional):
string
-
securitySeededUsers(optional):
string
-
securitySubscriptionMessagesAddMember(optional):
string
-
securitySubscriptionMessagesInviteMember(optional):
string
-
securitySubscriptionMessagesInviteNonMember(optional):
string
-
selfRegistrationDefaultRole(optional):
string
-
selfRegistrationPage(optional):
string
-
serviceDataCopied(optional):
string
-
shortId(optional):
string
-
skin(optional):
object Linked
-
subGSCount(optional):
integer(int32)
-
supportedLanguages(optional):
string
-
workflowApprovalSubscriptionRoleWorkflows(optional):
string
-
workflowApprovalUnsubscriptionRoleWorkflows(optional):
string
object
-
country(optional):
string
-
displayCountry(optional):
string
-
displayLanguage(optional):
string
-
displayName(optional):
string
-
displayScript(optional):
string
-
displayVariant(optional):
string
-
iSO3Country(optional):
string
-
iSO3Language(optional):
string
-
language(optional):
string
-
script(optional):
string
-
unicodeLocaleAttributes(optional):
array unicodeLocaleAttributes
-
unicodeLocaleKeys(optional):
array unicodeLocaleKeys
-
variant(optional):
string
400 Response
403 Response
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: Aik
i 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" } ] }