Update Actions
Updates the given action name with the Roles.
Warning
Notice that this is not a partial update of roles, this will replace the current action Roles with the new ones
Resource Information
This service uses the tomcat application on port 8080 by default.
The context for this API is /crafter-social
, please prefix the API URLs with this context.
HTTP Verb
|
POST
|
URL
|
/api/3/system/actions |
Response Formats
|
JSON |
Parameters
Name
|
Type
|
Required
|
Description
|
---|---|---|---|
context
|
String
|
✓
|
The ID of the Social Context
|
actionName
|
String
|
✓
|
The name of the action to update
|
roles
|
String
|
✓
|
List of roles to assign to the action
|
Example
Request
POST .../api/3/system/actions?context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9&actionName=ugc.moderate&roles=CUSTOM_MODERATOR,SOCIAL_SUPERADMIN,SOCIAL_ADMIN,SOCIAL_MODERATOR
Response
Status 200 OK
1{
2 "actionName": "ugc.moderate",
3 "roles": [
4 "SOCIAL_SUPERADMIN",
5 "CUSTOM_MODERATOR",
6 "SOCIAL_ADMIN",
7 "SOCIAL_MODERATOR"
8 ],
9 "contextId": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
10 "_id": "59663b4be61296e1be35358c"
11}
Responses
Status
|
Location
|
Response Body
|
---|---|---|
200
|
See example above.
|
|
400
|
{ "message" : "System Actions can't be
changed" }
|
|
401
|
{ "message" : "User must be logged in" } |
|
403
|
{ "message" : "Current subject does not have
permission to execute global action ..." }
|
|
500
|
{ "message" : "Internal server error" } |