Add a User to a Space
/ic/api/process/v1/spaces/{spaceId}/permissions/{principal}
Request
- application/x-www-form-urlencoded
-
principal(required): string
The principal ID
-
spaceId(required): string
The space ID
-
role: string
The role to be assigned to the userDefault Value:
viewerAllowed Values:[ "viewer", "editor", "owner" ]
Response
- application/json
- application/xml;qs=0.9
200 Response
object201 Response
401 Response
403 Response
404 Response
500 Response
Examples
The following example shows how to add a user to a space by submitting a PUT request on the REST resource.
curl -X PUT --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/json' -H 'Authorization: Bearer access_token' -d 'role=owner' 'http://example.com:7001/ic/api/process/v1/spaces/<spaceId>/permissions/<principal>'
Where,
-
example.comis the host where Oracle Integration is running -
Content-Type:application/x-www-form-urlencoded -
Request URL:http://example.com:7001/ic/api/process/v1/spaces/<spaceId>/permissions/<principal> -
<spaceId> is the unique ID for a space. To retrieve available spaces, see Retrieve Spaces.
-
<principal> is the user name. To retrieve available permissions for a space, see List all permissions assigned to the given space.
The following shows the required request parameters to add a user. You need to provide application/x-www-form-urlencoded parameter.
-
role: Specify the role of the user. Allowed values areowner,editor, andviewer
Example of Response Header
Status Code: 201 Created Date: Mon, 03 Apr 2017 09:39:39 GMT Content-Type: application/json
Example of Response Body
{
"user": "jsmith",
"role": "owner",
"links": [
{
"href": "http://example.com:7001/ic/api/process/v1/spaces/89f7e082-6855-4a75-b2a6-6a726aff7f23/permissions/jsmith",
"rel": "self"
},
{
"href": "http://example.com:7001/ic/api/process/v1/spaces/89f7e082-6855-4a75-b2a6-6a726aff7f23/permissions/jsmith",
"rel": "canonical"
},
{
"href": "http://example.com:7001/ic/api/process/v1/spaces/89f7e082-6855-4a75-b2a6-6a726aff7f23",
"rel": "parent"
}
]
}