Create a Portal

post

/v1/portal/portals

Creates a portal and returns information about the newly created portal.

The following are the mandatory parameters to create a portal: name and displayname.

Request

Supported Media Types
Body ()
Content of required attributes of the portal to be created.
Root 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 : 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 : 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
Back to Top

Response

Supported Media Types

201 Response

Portal created successfully.

400 Response

Bad request: ill-formatted content in request.

403 Response

Invalid utoken supplied.

415 Response

Unsupported media type: request does not contain required media type.
Back to Top

Examples

You can create portal using REST API. When you create a portal, you become the default portal manager, and assigned the Portal Manager role. In this role, you have the Manage Security and Configuration permission in the portal, which provides full control over the portal presentation and content, as well as administrative responsibilities.

To create a portal submit a POST request on the REST resource and you must specify the following required parameters in the request body:.

  • name:The name of the portal. Note the name of the portal is without space and should be unique.

  • displayName: The name of the portal as displayed to the users.

Use the following format to submit a POST request using cURL:

curl -i -X POST 
-H 'Content-Type: application/json'
-d @create-portal.json
http://hostname:port/rest/api/v1/portal/portals?utoken=utoken

where

  • create-portal.json is the JSON file containing the request body for the request.

  • 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.

Example of a Request Body

The following is the sample of the create-portal.json file containing the body for the request and shows how to create a portal using the default template:

{  
  "name": "HRPortal",  
  "displayName": "HR Portal",  
  "description": "Simple portal created using JSON",  
  "keywords": "portal,JSON", 
  "isPublic": true,  
 }

The following is the sample of the create-portal.json file containing the body for the request and shows how to create a portal using a custom template:

{
  "name" : "PortalRest1",
  "displayName" : "PortalRest",
  "keywords" : "portal,JSON",
  "description" : "Advanced portal template created using JSON",
  "reference":{"name":"Template1","namespace":"portalTemplate"}
}

HTTP Status Code

HTTP_STATUS = 201 Created

Example of Response Body

In this example, you can view the details of the new portal. Note the shortId of the portal, which is used to retrieve additional information about a portal and to perform other operations. For example, retrieve information about resource catalog or skins of a portal or add member to the portal.

{
    "resourceType": "urn:oracle:webcenter:portal:portal",
    "keywords": "portal,JSON",
    "displayName": "PortalCreationJson1585394",
    "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",
    "copyrightMessage": "DeFaUlT-MeSsAgE",
    "privacyPolicyURL": "DeFaUlT-MeSsAgE",
    "securitySeededUsers": "admin",
    "securitySeededRoles": "Moderator",
    "pageCreationSettingScheme": "WCSchemeNone",
    "portalLifecycleStateMode": "active",
    "portalLifecycleStateLastChangedBy": "admin",
    "acronym": "ABC",
    "portalColor": "#000000",
    "subGSCount": 0,
    "reorderDeviceGroups": false,
    "isPublic": true,
    "memberCount": 1,
    "isSeeded": false,
    "templateName": "Portal",
    "navigationRootNode": {
        
        "resourceType": "urn:oracle:webcenter:portal:navigationnode",
        "portalName": "PortalCreationJson1528394",
        "namespace": "",
        "name": "root"
    },
    "isOnline": true,
    "isWorkflowApprovalUnsubscriptionApprovalRequired": true,
    "isBlockAllAccess": false,
    "javaFormatId": "175a26a2124d",
    "isFooterHidden": false,
    "isWorkflowApprovalSubscriptionEnableAllRoles": true,
    "isDiscoverable": true,
    "isPublishRSS": false,
    "isSelfRegistration": false,
    "isWorkflowApprovalSubscriptionApprovalRequired": true,
    "isWorkflowApprovalUnsubscriptionEnableAllRoles": true,
    "isPageCreationSettingInstantCreate": false,
    "isClosed": false,
    "description": "Simple portal created using JSON",
    "modifier": "wdmin",
     "shortId": "Aoc",
    "securityId": "space/b41a_175a26a2124d",
    "creator": "admin",
    "modified": "2018-08-08T09:09:21.518Z",
    "created": "2018-08-08T09:09:09.528Z",
    "currentVersionId": "1483-9ed7048",
    "namespace": "portal",
    "locale": "en_US",
    "id": "9df08ac6-243d-483e-b41a-175a26a2124d",
    "name": "PortalCreationJson1528994"
}
Back to Top