Add Profile To Social Context¶
Updates the socialContext
attribute in the given profile to include the Social Context ID and
the list of roles assigned for that context.
Resource Information¶
This service uses the tomcat application on port 8080 by default. To see a list of default ports click here
The context for this API is /crafter-social
, please prefix the API URLs with this context.
HTTP Verb
|
POST
|
URL
|
/api/3/system/context/:id/:profileId |
Response Formats
|
JSON |
Parameters¶
Name
|
Type
|
Required
|
Description
|
---|---|---|---|
context
|
String
|
✓
|
The ID of the Social Context
|
id
|
String
|
✓
|
The ID of the Social Context to add
|
profileId
|
String
|
✓
|
The ID of the profile to update
|
roles
|
String
|
✓
|
The list of roles to assign
|
Example¶
Request¶
POST .../api/3/system/context/e41e7273-b504-4d50-9edd-3b215eff6464/596683c030047dc279c21d27
context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9
roles=SOCIAL_USER
Response¶
Status 200 OK
1{
2 "username": "john.doe",
3 "email": "john.doe@example.com",
4 "verified": false,
5 "enabled": false,
6 "createdOn": "2017-07-12T14:17Z",
7 "lastModified": "2017-07-12T14:37Z",
8 "tenant": "sample-tenant",
9 "roles": [],
10 "attributes": {
11 "firstName": "John",
12 "lastName": "Doe",
13 "socialContexts": [
14 {
15 "roles": [
16 "SOCIAL_USER"
17 ],
18 "name": "site1",
19 "id": "e41e7273-b504-4d50-9edd-3b215eff6464"
20 }
21 ]
22 },
23 "id": "596683c030047dc279c21d27"
24}
Responses¶
Status
|
Location
|
Response Body
|
---|---|---|
200
|
See example above.
|
|
400
|
{ "message" : "SOCIAL_SUPERADMIN is not a
valid role" }
|
|
401
|
{ "message" : "User must be logged in" } |
|
403
|
{ "message" : "Current subject does not have
permission to execute global action ..." }
|
|
500
|
{ "message" : "Internal server error" } |