Add a User to a Space

put

/ic/api/process/v1/spaces/{spaceId}/permissions/{principal}

Optionally you can specify the role the user will have. If the user already has a role it'll update it

Request

Supported Media Types
Path Parameters
Form Parameters
  • The role to be assigned to the user
    Default Value: viewer
    Allowed Values: [ "viewer", "editor", "owner" ]
Back to Top

Response

Supported Media Types

200 Response

successful operation
Body ()
Root Schema : grant
Type: object
The representation of a Permission

201 Response

Success. Space Permission successfully created.

401 Response

Unauthorized

403 Response

Privileges required. User can't add the space permissions

404 Response

Space/Principal not found.

500 Response

Error in creating space permission
Back to Top

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.com is 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 are owner, editor, and viewer

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"
    }
  ]
}
Back to Top