Add Member to a Portal
/v1/portal/portals/{portalId}/members
The following are the mandatory parameters to add a member: userId
and role
.
Request
-
portalId: string
The shortId of the portal.
object
-
created(optional):
string(date-time)
-
creator(optional):
string
-
currentVersionId(optional):
string
-
description(optional):
string
-
documentRef(optional):
string
-
groupSpaceType(optional):
boolean
-
id(optional):
string
-
isGroup(optional):
boolean
-
link(optional):
array link
-
linkStates(optional):
array linkStates
-
locale(optional):
object Locale
-
modified(optional):
string(date-time)
-
modifier(optional):
string
-
name(optional):
string
-
namespace(optional):
string
-
newVersionId(optional):
string
-
permissionAction(optional):
string
-
permissionName(optional):
string
-
resourceType(optional):
string
-
role:
string
The name of the role to be assigned to the portal member.
-
securityId(optional):
string
-
shortId(optional):
string
The Id of a portal.
-
spaceId(optional):
string
-
userGUID(optional):
string
-
userId:
string
The name of the portal member. For example, karen.
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
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
Response
- application/json
201 Response
403 Response
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 theshort id
of the portal. To retrieveshort 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>