Add Member to a Portal

post

/v1/portal/portals/{portalId}/members

Adds a member to a portal and returns information about the new member. As a portal manager, you can add any user currently registered with Oracle WebCenter Portal as a member of your portal.

The following are the mandatory parameters to add a member: userId and role.

Request

Path Parameters
Body ()
Root Schema : member
Type: object
Show Source
Nested Schema : linkStates
Type: array
Show Source
Nested Schema : Locale
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
Back to Top

Response

Supported Media Types

201 Response

Portal Member added successfully.

403 Response

Invalid utoken supplied
Back to Top

Examples

As a portal manager, you can add any user currently registered with Oracle WebCenter Portal as a member of your portal.

To add a member to a portal submit a POST request on the REST resource and you must specify the Portal Id in the path parameter and the following required parameters in the request body:

  • userId: The name of the portal member. For example, Karen.

  • role: The name of the role to be assigned to the portal member.

Use the following format to submit a POST request:

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

where

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

  • hostname:port is the name of the host and the IP port where the 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.

  • {portalId} is the short id of the portal. To retrieve short id of a portal, see Retrieve Portals.

Example of a Request Body

The following is the sample of the create-member.json file containing the body for the request and shows how to add a member, Karen and assign a user role, Moderator.

{ "userId" : "Karen", "isGroup" : false, "role" : "Moderator"}

HTTP Status Code

HTTP_STATUS = 201 Created

Example of Response Body

In this example, you can view the details of the new member, Karen, created in a portal. Note the shortId of the member.

<?xml version="1.0" encoding="UTF-8"?>
<member resourceType="urn:oracle:webcenter:portal:member">
  <id>22b487b4-9a95-48e2-888b-1b75b9952af9</id >
  <shortId>Ch0</shortId>
  <name>B5A0670E7AC117790$Moderator</name>
  <creator>Admin</creator>
  <created>2018-08-06T06:21:42.92Z</created>
  <modifier>Admin</modifier>
  <modified>2018-08-06T06:21:43.757Z</modified>
  <namespace>member</namespace>
  <currentVersionId>26bc4e57-a32d-d953c</currentVersionId>
  <isGroup>false</isGroup>
  <role>Moderator</role>	
  <permissionAction>manage,update,view</permissionAction>
  <userGUID>B5A0670E7AC1443330790</userGUID>
  <userId>Karen</userId>
  <spaceId>HRPortal</spaceId>
  <groupSpaceType>true</groupSpaceType>
</member>  
Back to Top