Download OpenAPI specification:Download
Crafter Social API
All request in this API require the user to be authenticated with the following steps:
Send a POST request to the /crafter-social/crafter-security-login endpoint with the username and password parameters
Include the cookies set in the response of the login in later requests
Besides setting the authentication cookies the login response also provides the user’s information:
{
"ticket":"0489ca78-cd96-46c2-bc96-c1ea1fa4db6f",
"profile":{
"username":"admin",
"password":null,
"email":"admin@example.com",
"verified":false,
"enabled":true,
"createdOn":1554832283831,
"lastModified":1554834126479,
"tenant":"default",
"roles":[
"SOCIAL_SUPERADMIN",
"PROFILE_SUPERADMIN"
],
"attributes":{
"socialContexts":[
{
"name":"Default",
"id":"f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
"roles":[
"SOCIAL_ADMIN",
"SOCIAL_MODERATOR",
"SOCIAL_USER"
]
}
]
},
"failedLoginAttempts":0,
"lastFailedLogin":null,
"id":"5cacdb9b386f920d482a5ad4"
},
"remembered":false
}
Gets all Security Actions for current context.
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
[- {
- "actionName": "ugc.update",
- "roles": [
- "SOCIAL_SUPERADMIN",
- "OWNER",
- "SOCIAL_ADMIN",
- "SOCIAL_MODERATOR"
], - "contextId": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "_id": "59663b4be61296e1be35358b"
}, - {
- "actionName": "ugc.moderate",
- "roles": [
- "SOCIAL_SUPERADMIN",
- "SOCIAL_ADMIN",
- "SOCIAL_MODERATOR"
], - "contextId": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "_id": "59663b4be61296e1be35358c"
}, - {
- "actionName": "ugc.unflag",
- "roles": [
- "SOCIAL_SUPERADMIN",
- "SOCIAL_ADMIN",
- "SOCIAL_MODERATOR"
], - "contextId": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "_id": "59663b4be61296e1be35358d"
}, - {
- "actionName": "ugc.flag",
- "roles": [
- "SOCIAL_SUPERADMIN",
- "SOCIAL_ADMIN",
- "SOCIAL_MODERATOR",
- "SOCIAL_USER"
], - "contextId": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "_id": "59663b4be61296e1be35358e"
}, - {
- "actionName": "ugc.create",
- "roles": [
- "SOCIAL_SUPERADMIN",
- "SOCIAL_ADMIN",
- "SOCIAL_MODERATOR",
- "SOCIAL_USER"
], - "contextId": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "_id": "59663b4be61296e1be35358f"
}, - {
- "actionName": "ugc.delete",
- "roles": [
- "SOCIAL_SUPERADMIN",
- "OWNER",
- "SOCIAL_ADMIN",
- "SOCIAL_MODERATOR"
], - "contextId": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "_id": "59663b4be61296e1be353590"
}, - {
- "actionName": "ugc.read",
- "roles": [
- "ANONYMOUS",
- "SOCIAL_SUPERADMIN",
- "SOCIAL_ADMIN",
- "SOCIAL_MODERATOR",
- "SOCIAL_USER"
], - "contextId": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "_id": "59663b4be61296e1be353591"
}, - {
- "actionName": "system.securityActions.read",
- "roles": [
- "SOCIAL_SUPERADMIN",
- "SOCIAL_ADMIN"
], - "contextId": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "_id": "59663b4be61296e1be353592"
}, - {
- "actionName": "system.securityActions.update",
- "roles": [
- "SOCIAL_SUPERADMIN",
- "SOCIAL_ADMIN"
], - "contextId": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "_id": "59663b4be61296e1be353593"
}, - {
- "actionName": "system.socialctx.all",
- "roles": [
- "SOCIAL_SUPERADMIN",
- "SOCIAL_ADMIN"
], - "contextId": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "_id": "59663b4be61296e1be353594"
}, - {
- "actionName": "system.socialctx.create",
- "roles": [
- "SOCIAL_SUPERADMIN"
], - "contextId": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "_id": "59663b4be61296e1be353595"
}, - {
- "actionName": "system.socialctx.addProfile",
- "roles": [
- "SOCIAL_SUPERADMIN",
- "SOCIAL_ADMIN"
], - "contextId": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "_id": "59663b4be61296e1be353596"
}, - {
- "actionName": "system.socialctx.removeProfile",
- "roles": [
- "SOCIAL_SUPERADMIN",
- "SOCIAL_ADMIN"
], - "contextId": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "_id": "59663b4be61296e1be353597"
}, - {
- "actionName": "system.notification.changeTemplate",
- "roles": [
- "SOCIAL_SUPERADMIN",
- "SOCIAL_ADMIN"
], - "contextId": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "_id": "59663b4be61296e1be3535ab"
}, - {
- "actionName": "ugc.voting",
- "roles": [
- "SOCIAL_SUPERADMIN",
- "SOCIAL_ADMIN",
- "SOCIAL_MODERATOR",
- "SOCIAL_USER"
], - "contextId": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "_id": "59663b4be61296e1be3535ca"
}
]
Updates the given action name with the Roles.
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
actionName required | string Example: actionName=ugc.moderate The name of the action to update |
roles required | string Example: roles=CUSTOM_MODERATOR,SOCIAL_SUPERADMIN,SOCIAL_ADMIN,SOCIAL_MODERATOR List of roles to assign to the action |
{- "actionName": "ugc.moderate",
- "roles": [
- "SOCIAL_SUPERADMIN",
- "CUSTOM_MODERATOR",
- "SOCIAL_ADMIN",
- "SOCIAL_MODERATOR"
], - "contextId": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "_id": "59663b4be61296e1be35358c"
}
Creates a new Social Context.
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
contextName | string The name of the new Social Context |
{- "contextName": "site1"
}
{- "contextName": "site1",
- "_id": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9"
}
Updates the socialContext attribute in the given profile to include the Social Context ID and the list of roles assigned for that context.
id required | string Example: e41e7273-b504-4d50-9edd-3b215eff6464 The ID of the Social Context to add |
profileId required | string Example: 596683c030047dc279c21d27 The ID of the profile to update |
context | string The ID of the Social Context |
roles | string The list of roles to assign |
{- "context": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "roles": "SOCIAL_USER"
}
{- "username": "john.doe",
- "email": "john.doe@example.com",
- "verified": false,
- "enabled": false,
- "createdOn": "2017-07-12T14:17Z",
- "lastModified": "2017-07-12T14:37Z",
- "tenant": "sample-tenant",
- "roles": [ ],
- "attributes": {
- "firstName": "John",
- "lastName": "Doe",
- "socialContexts": [
- {
- "roles": [
- "SOCIAL_USER"
], - "name": "site1",
- "id": "e41e7273-b504-4d50-9edd-3b215eff6464"
}
]
}, - "id": "596683c030047dc279c21d27"
}
Updates the socialContext attribute in the given profile to remove the Social Context ID and the list of roles assigned for that context.
id required | string Example: e41e7273-b504-4d50-9edd-3b215eff6464 The ID of the Social Context to remove |
profileId required | string Example: 596683c030047dc279c21d27 The ID of the profile to update |
context | string The ID of the Social Context |
{- "context": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9"
}
{- "username": "john.doe",
- "email": "john.doe@example.com",
- "verified": false,
- "enabled": false,
- "createdOn": "2024-07-12T14:17Z",
- "lastModified": "2024-07-12T14:37Z",
- "tenant": "sample-tenant",
- "roles": [ ],
- "attributes": {
- "firstName": "John",
- "lastName": "Doe",
- "socialContexts": [ ]
}, - "id": "596683c030047dc279c21d27"
}
Updates the email configuration for a given Social Context.
context | string The ID of the Social Context |
encoding | string Character encoding for the email body |
host | string The hostname of the email server |
port | string The port of the email server |
auth | boolean Enable if the email server requires authentication |
username | string The username for the email server |
password | string The password for the email server |
tls | boolean Enable if the email server requires a secure connection |
replyTo | string Email address used for replies |
from | string Email address used to send notifications |
priority | integer The priority for the emails |
subject | string The subject for the emails |
{- "context": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "encoding": "UTF-8",
- "host": "mail.example.com",
- "port": 25,
- "auth": true,
- "username": "user",
- "password": "passw0rd",
- "tls": true,
- "replyTo": "reply@example.com",
- "from": "site1@example.com",
- "priority": 3,
- "subject": "Site1 Updates"
}
{- "password": "passw0rd",
- "port": 25,
- "auth": true,
- "subject": "Site1 Updates",
- "host": "mail.example.com",
- "replyTo": "reply@example.com",
- "tls": true,
- "from": "site1@example.com",
- "encoding": "UTF-8",
- "priority": 3,
- "username": "user"
}
Returns an email configuration for a given Social Context.
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
{- "host": "localhost",
- "encoding": "UTF-8",
- "port": 25,
- "auth": false,
- "username": "",
- "password": "",
- "tls": false,
- "replyTo": "social@example.com",
- "from": "social@example.com",
- "priority": 5,
- "subject": "Latest change on your subscribed threads for Social"
}
Updates an email template for a given Social Context.
context | string The ID of the Social Context |
template | string The body of the email template |
type | string The type of the email template
|
{- "context": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "template": "Sample template for email",
- "type": "INSTANT"
}
true
Returns an email template for a given Social Context.
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
type required | string Example: type=INSTANT The type of the email template
|
{- "template": "Hi ${profile.username} this are changes that happen on your subscribe Threads<#list digest as change><h1> ${change[\"_id\"]} </h1><dl><#list change.ugcList as ugc><dt>Subject</dt><dd> ${ugc.subject!\"\"} </dd><dt>Body</dt> <dd>${ugc.body!\"\"} </dd><dt>Changed by<dt><dd>${ugc.lastModifiedBy.username}<dd></#list></dl></#list>"
}
Returns the preferences for a given Social Context.
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
{- "preferences": {
- "hiddenUgcStatus": "SPAM,TRASH",
- "moderateByMailEnable": "false",
- "moderateByMailRole": "SOCIAL_APPROVER",
- "moderateByMailSubject": "A new Comment needs to be approved",
- "timezone": "EST",
- "setupAutoWatch": false,
- "defaultFrequency": "INSTANT"
}
}
Updates the preferences for a given Social Context.
context | string The ID of the Social Context |
additionalProperties | any Preferences that will be updated |
{- "context": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "additionalProperties": {
- "moderateByMailEnable": true
}
}
true
Deletes the preferences for a given Social Context.
context | string The ID of the Social Context |
moderateByMailEnable | boolean |
moderateByMailRole | string |
moderateByMailSubject | string |
timezone | string |
baseUrl | string |
setupAutoWatch | boolean |
defaultFrequency | string |
hiddenUgcStatus | string |
{- "context": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "moderateByMailEnable": true,
- "moderateByMailRole": "string",
- "moderateByMailSubject": "string",
- "timezone": "string",
- "baseUrl": "string",
- "setupAutoWatch": true,
- "defaultFrequency": "string",
- "hiddenUgcStatus": "string"
}
true
Clears the Profile Aggregator Cache.
profileIds required | string List of IDs to be removed from the Cache. |
true
Creates a new comment and creates a new thread if needed.
context required | string The ID of the Social Context |
body required | string The body of the new comment |
thread required | string Id of the thread to attach this comment |
parent | string Id of the parent for the new comment |
anonymous | boolean Should the comment be posted as anonymous |
subject | string Subject of the comment to be created |
attributes | string JSON string representing any extra attributes of the comment to create |
attachment | string <binary> Binary file to include in the comment |
{- "context": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "body": "This is the first comment!",
- "thread": "string",
- "parent": "string",
- "anonymous": true,
- "subject": "string",
- "attributes": "string",
- "attachment": "string"
}
{- "ancestors": [ ],
- "targetId": "Welcome",
- "subject": "",
- "body": "This is the first comment!",
- "createdBy": "59667e8abd4787992596ba6b",
- "lastModifiedBy": "59667e8abd4787992596ba6b",
- "createdDate": "2017-07-13T09:09Z",
- "lastModifiedDate": "2017-07-13T09:09Z",
- "anonymousFlag": false,
- "attachments": [ ],
- "moderationStatus": "UNMODERATED",
- "votesUp": [ ],
- "votesDown": [ ],
- "flags": [ ],
- "_id": "59678d3f300426156e21df50"
}
Replace the given comment.
id required | string The ID of the comment to replace |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
body required | string The body of the new comment |
attributes | string JSON string representing any extra attributes of the comment to create |
{- "body": "This is the first comment!",
- "attributes": "string"
}
{- "ancestors": [ ],
- "targetId": "Welcome",
- "subject": "",
- "body": "This is the first comment!",
- "createdBy": "59667e8abd4787992596ba6b",
- "lastModifiedBy": "59667e8abd4787992596ba6b",
- "createdDate": "2017-07-13T09:09Z",
- "lastModifiedDate": "2017-07-13T09:09Z",
- "anonymousFlag": false,
- "attachments": [ ],
- "moderationStatus": "UNMODERATED",
- "votesUp": [ ],
- "votesDown": [ ],
- "flags": [ ],
- "_id": "59678d3f300426156e21df50"
}
Returns the given comment.
id required | string The ID of the comment |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
{- "ancestors": [ ],
- "targetId": "Welcome",
- "subject": "",
- "body": "This was the first comment in the site!",
- "createdBy": "59667e8abd4787992596ba6b",
- "lastModifiedBy": "59667e8abd4787992596ba6b",
- "createdDate": "2017-07-13T09:09Z",
- "lastModifiedDate": "2017-07-13T09:09Z",
- "anonymousFlag": false,
- "attributes": { },
- "attachments": [ ],
- "moderationStatus": "UNMODERATED",
- "votesUp": [ ],
- "votesDown": [ ],
- "flags": [ ],
- "_id": "59678d3f300426156e21df50"
}
Delete the given comment.
id required | string The ID of the comment to delete |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
{- "message": "SOCIAL_SUPERADMIN is not a valid role"
}
Deletes the given comment and all its children.
id required | string The ID of the comment to delete |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
body required | string The body of the new comment |
attributes | string JSON string representing any extra attributes of the comment to create |
{- "body": "This is the first comment!",
- "attributes": "string"
}
{- "ancestors": [ ],
- "targetId": "Welcome",
- "subject": "",
- "body": "This is the first comment!",
- "createdBy": "59667e8abd4787992596ba6b",
- "lastModifiedBy": "59667e8abd4787992596ba6b",
- "createdDate": "2017-07-13T09:09Z",
- "lastModifiedDate": "2017-07-13T09:09Z",
- "anonymousFlag": false,
- "attachments": [ ],
- "moderationStatus": "UNMODERATED",
- "votesUp": [ ],
- "votesDown": [ ],
- "flags": [ ],
- "_id": "59678d3f300426156e21df50"
}
Updates the given comment.
id required | string The ID of the comment to update |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
body required | string The body of the new comment |
attributes | string JSON string representing any extra attributes of the comment to create |
{- "body": "This is the first comment!",
- "attributes": "string"
}
{- "ancestors": [ ],
- "targetId": "Welcome",
- "subject": "",
- "body": "This is the first comment!",
- "createdBy": "59667e8abd4787992596ba6b",
- "lastModifiedBy": "59667e8abd4787992596ba6b",
- "createdDate": "2017-07-13T09:09Z",
- "lastModifiedDate": "2017-07-13T09:09Z",
- "anonymousFlag": false,
- "attachments": [ ],
- "moderationStatus": "UNMODERATED",
- "votesUp": [ ],
- "votesDown": [ ],
- "flags": [ ],
- "_id": "59678d3f300426156e21df50"
}
Returns all comments that match the search parameter.
context required | string The ID of the social context |
search required | string MongoDB query (except $where) |
sortBy required | string MongoDB sort string |
start required | integer Starting position for pagination |
limit required | integer Final position for pagination |
{- "context": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "search": {
- "targetId": "Welcome"
}, - "sortBy": {
- "lastModifiedDate": 1
}, - "start": 0,
- "limit": 5
}
[- {
- "ancestors": [ ],
- "targetId": "Welcome",
- "subject": "",
- "body": "This was the first comment in the site!",
- "createdBy": "59667e8abd4787992596ba6b",
- "lastModifiedBy": "59667e8abd4787992596ba6b",
- "createdDate": "2017-07-13T09:09Z",
- "lastModifiedDate": "2017-07-13T09:09Z",
- "anonymousFlag": false,
- "attributes": { },
- "attachments": [ ],
- "moderationStatus": "UNMODERATED",
- "votesUp": [ ],
- "votesDown": [ ],
- "flags": [ ],
- "_id": "59678d3f300426156e21df50"
}
]
Updates the attributes for the given comment.
id required | string The ID of the comment to update |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
property name* additional property | any All additional parameters included in the request will be added as custom attributes in the comment. |
{- "customProperty": true,
- "anotherCustomProperty": 1
}
true
Updates the attributes for the given comment.
id required | string The ID of the comment to update |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
property name* additional property | any All additional parameters included in the request will be added as custom attributes in the comment. |
{- "customProperty": true,
- "anotherCustomProperty": 1
}
true
Deletes attributes for the given comment.
id required | string The ID of the comment to update |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
attributes | string List of attribute names to delete |
{- "attributes": "string"
}
true
Updates the attributes for the given comment.
id required | string The ID of the comment to update |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
property name* additional property | any All additional parameters included in the request will be added as custom attributes in the comment. |
{- "customProperty": true,
- "anotherCustomProperty": 1
}
true
Adds a flag to the given comment.
id required | string The ID of the comment to update |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
reason | string Reason why the comment is flagged |
{- "reason": "string"
}
{- "ancestors": [ ],
- "targetId": "Welcome",
- "subject": "",
- "body": "This was the first comment in the site!",
- "createdBy": "59667e8abd4787992596ba6b",
- "lastModifiedBy": "59667e8abd4787992596ba6b",
- "createdDate": "2017-07-13T09:09Z",
- "lastModifiedDate": "2017-07-13T15:17Z",
- "anonymousFlag": false,
- "attributes": { },
- "attachments": [
- {
- "md5": "c86b6b1607621afff04b6a9b9048e87b",
- "fileId": "5967c9dd300426156e21df53",
- "contentType": "image/png",
- "fileSize": "144.5 KB",
- "storeName": "/f5b143c2-f1c0-4a10-b56e-f485f00d3fe9/59678d3f300426156e21df50/person1.png",
- "fileName": "person1.png",
- "savedDate": "2017-07-13T13:28Z",
- "fileSizeBytes": 147970,
- "attributes": {
- "owner": "59678d3f300426156e21df50"
}
}
], - "moderationStatus": "APPROVED",
- "votesUp": [ ],
- "votesDown": [ ],
- "flags": [
- {
- "reason": "Contains offensive language",
- "userId": "59667e8abd4787992596ba6b",
- "_id": "5967e35f300426156e21df58"
}
], - "_id": "59678d3f300426156e21df50"
}
Returns all the flags for the given comment.
id required | string The ID of the comment to update |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
[- {
- "reason": "Contains offensive language",
- "userId": "59667e8abd4787992596ba6b",
- "_id": "5967e35f300426156e21df58"
}
]
Deletes a flag for the given comment.
id required | string Example: 59678d3f300426156e21df50 The ID of the comment to update |
flagId required | string Example: 5967e35f300426156e21df58 The ID of the flag |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
true
Deletes a flag for the given comment.
id required | string Example: 59678d3f300426156e21df50 The ID of the comment to update |
flagId required | string Example: 5967e35f300426156e21df58 The ID of the flag |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
true
Changes the moderation status of the given comment.
id required | string The ID of the comment to update |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
status | string The new moderation status |
{- "status": "APPROVED"
}
{- "ancestors": [ ],
- "targetId": "Welcome",
- "subject": "",
- "body": "This was the first comment in the site!",
- "createdBy": "59667e8abd4787992596ba6b",
- "lastModifiedBy": "59667e8abd4787992596ba6b",
- "createdDate": "2017-07-13T09:09Z",
- "lastModifiedDate": "2017-07-13T15:17Z",
- "anonymousFlag": false,
- "attributes": { },
- "attachments": [ ],
- "moderationStatus": "APPROVED",
- "votesUp": [ ],
- "votesDown": [ ],
- "flags": [ ],
- "_id": "59678d3f300426156e21df50"
}
Changes the moderation status of the given comment.
id required | string The ID of the comment to update |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
status | string The new moderation status |
{- "status": "APPROVED"
}
{- "ancestors": [ ],
- "targetId": "Welcome",
- "subject": "",
- "body": "This was the first comment in the site!",
- "createdBy": "59667e8abd4787992596ba6b",
- "lastModifiedBy": "59667e8abd4787992596ba6b",
- "createdDate": "2017-07-13T09:09Z",
- "lastModifiedDate": "2017-07-13T15:17Z",
- "anonymousFlag": false,
- "attributes": { },
- "attachments": [ ],
- "moderationStatus": "APPROVED",
- "votesUp": [ ],
- "votesDown": [ ],
- "flags": [ ],
- "_id": "59678d3f300426156e21df50"
}
Returns all the comments with a given moderation status.
status required | string Example: APPROVED The moderation status to search |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
thread | string The ID of the thread to search |
pageNumber | integer Page number to return |
pageSize | integer Comments per page |
sortBy | Array of strings Example: sortBy=lastModifiedDate List of fields to order by |
sortOrder | Array of strings Example: sortOrder=ASC List of sort orders for each field |
{- "ancestors": [ ],
- "targetId": "Welcome",
- "subject": "",
- "body": "This was the first comment in the site!",
- "createdBy": "59667e8abd4787992596ba6b",
- "lastModifiedBy": "59667e8abd4787992596ba6b",
- "createdDate": "2017-07-13T09:09Z",
- "lastModifiedDate": "2017-07-13T15:17Z",
- "anonymousFlag": false,
- "attributes": { },
- "attachments": [
- {
- "md5": "c86b6b1607621afff04b6a9b9048e87b",
- "fileId": "5967c9dd300426156e21df53",
- "contentType": "image/png",
- "fileSize": "144.5 KB",
- "storeName": "/f5b143c2-f1c0-4a10-b56e-f485f00d3fe9/59678d3f300426156e21df50/person1.png",
- "fileName": "person1.png",
- "savedDate": "2017-07-13T13:28Z",
- "fileSizeBytes": 147970,
- "attributes": {
- "owner": "59678d3f300426156e21df50"
}
}
], - "moderationStatus": "APPROVED",
- "votesUp": [ ],
- "votesDown": [ ],
- "flags": [ ],
- "_id": "59678d3f300426156e21df50"
}
Returns the number of comments with a given moderation status.
status required | string Example: APPROVED The moderation status to search |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
thread | string The ID of the thread to search |
1
Returns all the comments with at least one flag.
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
pageNumber | integer Page number to return |
pageSize | integer Comments per page |
sortBy | Array of strings Example: sortBy=lastModifiedDate List of fields to order by |
sortOrder | Array of strings Example: sortOrder=ASC List of sort orders for each field |
[- {
- "ancestors": [ ],
- "targetId": "Welcome",
- "subject": "",
- "body": "This was the first comment in the site!",
- "createdBy": "59667e8abd4787992596ba6b",
- "lastModifiedBy": "59667e8abd4787992596ba6b",
- "createdDate": "2017-07-13T09:09Z",
- "lastModifiedDate": "2017-07-13T15:17Z",
- "anonymousFlag": false,
- "attributes": { },
- "attachments": [
- {
- "md5": "c86b6b1607621afff04b6a9b9048e87b",
- "fileId": "5967c9dd300426156e21df53",
- "contentType": "image/png",
- "fileSize": "144.5 KB",
- "storeName": "/f5b143c2-f1c0-4a10-b56e-f485f00d3fe9/59678d3f300426156e21df50/person1.png",
- "fileName": "person1.png",
- "savedDate": "2017-07-13T13:28Z",
- "fileSizeBytes": 147970,
- "attributes": {
- "owner": "59678d3f300426156e21df50"
}
}
], - "moderationStatus": "APPROVED",
- "votesUp": [ ],
- "votesDown": [ ],
- "flags": [ ],
- "_id": "59678d3f300426156e21df50"
}
]
Creates an attachment in a given comment.
id required | string Example: 59678d3f300426156e21df50 The ID of the Comment |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
attachment | string <binary> Binary file to add as attachment |
{- "md5": "1300018473cc0038187aaa0e2604fa27",
- "fileId": "5967ac48300426156e21df51",
- "contentType": "image/png",
- "fileSize": "1.5 KB",
- "storeName": "/f5b143c2-f1c0-4a10-b56e-f485f00d3fe9/59678d3f300426156e21df50/image1.png",
- "fileName": "image1.png",
- "savedDate": "2017-07-13T11:22Z",
- "fileSizeBytes": 1497,
- "attributes": {
- "owner": "59678d3f300426156e21df50"
}
}
Deletes a given attachment.
id required | string Example: 59678d3f300426156e21df50 The ID of the Comment |
attachmentId required | string Example: 5967ac48300426156e21df51 The ID of the attachment |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
true
Returns all the attachments for a given comment.
id required | string Example: 59678d3f300426156e21df50 The ID of the Comment |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
[- {
- "md5": "1300018473cc0038187aaa0e2604fa27",
- "fileId": "5967ac48300426156e21df51",
- "contentType": "image/png",
- "fileSize": "1.5 KB",
- "storeName": "/f5b143c2-f1c0-4a10-b56e-f485f00d3fe9/59678d3f300426156e21df50/image1.png",
- "fileName": "image1.png",
- "savedDate": "2017-07-13T11:22Z",
- "fileSizeBytes": 1497,
- "attributes": {
- "owner": "59678d3f300426156e21df50"
}
}
]
Returns the content of a given attachment.
id required | string Example: 59678d3f300426156e21df50 The ID of the Comment |
attachmentId required | string Example: 5967ac48300426156e21df51 The ID of the attachment |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
Binary content
Deletes a given attachment.
id required | string Example: 59678d3f300426156e21df50 The ID of the Comment |
attachmentId required | string Example: 5967ac48300426156e21df51 The ID of the attachment |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
true
Deletes a given attachment.
id required | string Example: 59678d3f300426156e21df50 The ID of the Comment |
attachmentId required | string Example: 5967ac48300426156e21df51 The ID of the attachment |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
file | string <binary> The content of the attachment |
true
Toggles a vote up in the given comment from the currently logged user.
id required | string Example: 59678d3f300426156e21df50 The ID of the Comment |
context | string The ID of the Social Context |
{- "context": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9"
}
{- "ancestors": [ ],
- "targetId": "Welcome",
- "subject": "",
- "body": "This was the first comment in the site!",
- "createdBy": "59667e8abd4787992596ba6b",
- "lastModifiedBy": "59667e8abd4787992596ba6b",
- "createdDate": "2017-07-13T09:09Z",
- "lastModifiedDate": "2017-07-13T15:17Z",
- "anonymousFlag": false,
- "attributes": { },
- "attachments": [ ],
- "moderationStatus": "APPROVED",
- "votesUp": [
- "59667e8abd4787992596ba6b"
], - "votesDown": [ ],
- "flags": [ ],
- "_id": "59678d3f300426156e21df50"
}
Toggles a vote down in the given comment from the currently logged user.
id required | string Example: 59678d3f300426156e21df50 The ID of the Comment |
context | string The ID of the Social Context |
{- "context": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9"
}
{- "ancestors": [ ],
- "targetId": "Welcome",
- "subject": "",
- "body": "This was the first comment in the site!",
- "createdBy": "59667e8abd4787992596ba6b",
- "lastModifiedBy": "59667e8abd4787992596ba6b",
- "createdDate": "2017-07-13T09:09Z",
- "lastModifiedDate": "2017-07-13T15:17Z",
- "anonymousFlag": false,
- "attributes": { },
- "attachments": [ ],
- "moderationStatus": "APPROVED",
- "votesUp": [ ],
- "votesDown": [
- "59667e8abd4787992596ba6b"
], - "flags": [ ],
- "_id": "59678d3f300426156e21df50"
}
Clears both up and down votes in the given comment for the currently logged user.
id required | string Example: 59678d3f300426156e21df50 The ID of the comment to update |
context | string The ID of the Social Context |
{- "context": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9"
}
{- "ancestors": [ ],
- "targetId": "Welcome",
- "subject": "",
- "body": "This was the first comment in the site!",
- "createdBy": "59667e8abd4787992596ba6b",
- "lastModifiedBy": "59667e8abd4787992596ba6b",
- "createdDate": "2017-07-13T09:09Z",
- "lastModifiedDate": "2017-07-13T15:17Z",
- "anonymousFlag": false,
- "attributes": { },
- "attachments": [ ],
- "moderationStatus": "UNMODERATED",
- "votesUp": [ ],
- "votesDown": [ ],
- "flags": [ ],
- "_id": "59678d3f300426156e21df50"
}
Returns all comments from the given thread.
id required | string Example: Welcome The ID of the thread |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
recursive | integer Levels of comments to return |
pageNumber | integer Page number to return |
pageSize | integer Comments per page |
childrenCount | integer Amount of children to return |
sortBy | Array of strings Example: sortBy=lastModifiedDate List of fields to order by |
sortOrder | Array of strings Example: sortOrder=ASC List of sort orders for each field |
{- "total": 1,
- "pageSize": 666,
- "pageNumber": 0,
- "watched": false,
- "comments": [
- {
- "ancestors": [ ],
- "targetId": "Welcome",
- "subject": "",
- "body": "This was the first comment in the site!",
- "createdBy": "59667e8abd4787992596ba6b",
- "lastModifiedBy": "59667e8abd4787992596ba6b",
- "createdDate": "2017-07-13T09:09Z",
- "lastModifiedDate": "2017-07-13T11:06Z",
- "anonymousFlag": false,
- "attributes": { },
- "children": [ ],
- "attachments": [
- {
- "md5": "c86b6b1607621afff04b6a9b9048e87b",
- "fileId": "5967c9dd300426156e21df53",
- "contentType": "image/png",
- "fileSize": "144.5 KB",
- "storeName": "/f5b143c2-f1c0-4a10-b56e-f485f00d3fe9/59678d3f300426156e21df50/person1.png",
- "fileName": "person1.png",
- "savedDate": "2017-07-13T13:28Z",
- "fileSizeBytes": 147970,
- "attributes": {
- "owner": "59678d3f300426156e21df50"
}
}
], - "moderationStatus": "UNMODERATED",
- "votesUp": [ ],
- "votesDown": [ ],
- "flags": [ ],
- "_id": "59678d3f300426156e21df50"
}
]
}
Returns all children for a given comment.
id required | string Example: Welcome The ID of the thread |
commentId required | string Example: 59678d3f300426156e21df50 The ID of the comment |
context required | string Example: context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9 The ID of the Social Context |
recursive | integer Levels of comments to return |
pageNumber | integer Page number to return |
pageSize | integer Comments per page |
childrenCount | integer Amount of children to return |
sortBy | Array of strings Example: sortBy=lastModifiedDate List of fields to order by |
sortOrder | Array of strings Example: sortOrder=ASC List of sort orders for each field |
{- "total": 1,
- "pageSize": 666,
- "pageNumber": 0,
- "watched": false,
- "comments": [
- {
- "ancestors": [
- "59678d3f300426156e21df50"
], - "targetId": "Welcome",
- "subject": "",
- "body": "This is a response.",
- "createdBy": "59667e8abd4787992596ba6b",
- "lastModifiedBy": "59667e8abd4787992596ba6b",
- "createdDate": "2017-07-13T09:09Z",
- "lastModifiedDate": "2017-07-13T11:06Z",
- "anonymousFlag": false,
- "attributes": { },
- "children": [ ],
- "attachments": [ ],
- "moderationStatus": "UNMODERATED",
- "votesUp": [ ],
- "votesDown": [ ],
- "flags": [ ],
- "_id": "59678d3f300426156e21df50"
}
]
}
Subscribes the current user to a given thread
id required | string Example: 59678d3f300426156e21df50 The ID of the thread to subscribe to |
context required | string The ID of the Social Context |
frequency | string Type of notifications to receive. The possible values are:
|
{- "context": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "frequency": "string"
}
true
Subscribes the current user to a given thread
id required | string Example: 59678d3f300426156e21df50 The ID of the thread to subscribe to |
context required | string The ID of the Social Context |
frequency | string Type of notifications to receive. The possible values are:
|
{- "context": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "frequency": "string"
}
true
Updates subscription of the current user
id required | string Example: 59678d3f300426156e21df50 The ID of the thread to update |
context required | string The ID of the Social Context |
frequency | string Type of notifications to receive. The possible values are:
|
{- "context": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9",
- "frequency": "daily"
}
true
Unsubscribes the current user to a given thread.
id required | string Example: 59678d3f300426156e21df50 The ID of the thread to unsubscribe |
context required | string The ID of the Social Context |
{- "context": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9"
}
true
Unsubscribes the current user to a given thread.
id required | string Example: 59678d3f300426156e21df50 The ID of the thread to unsubscribe. |
context required | string The ID of the Social Context |
{- "context": "f5b143c2-f1c0-4a10-b56e-f485f00d3fe9"
}
true
Returns the Crafter Social JVM memory details.
token required | string Example: token=defaultManagementToken The authorization token |
{- "totalJvmMemory": 2017984512,
- "freeJvmMemory": 1113921056,
- "maxJvmMemory": 3817865216,
- "totalOsMemory": 17179869184,
- "freeOsMemory": 2669301760,
- "totalSwapMemory": 2147483648,
- "freeSwapMemory": 1026555904
}
Returns the Crafter Social JVM version details.
token required | string Example: token=defaultManagementToken The authorization token |
{- "packageName": "Crafter Social",
- "packageVersion": "3.2.0-SNAPSHOT",
- "packageBuild": "a68f1ff7ad84d5ecbeaa008f392e4cef0ca02f41",
- "packageBuildDate": "2020-03-07T21:03:05.422Z",
- "osName": "Mac OS X",
- "osVersion": "10.15.6",
- "osArch": "x86_64",
- "javaVersion": "11",
- "javaVendor": "Oracle Corporation",
- "javaVm": "OpenJDK 64-Bit Server VM"
}