Documentation

API /group/{contentId}/addMembers

ThoughtFarmer REST API Method: /group/{contentId}/addMembers

Adds the members found in the list of userids to the group defined by content id.

URL:
http://yourserver.com/api/group/{contentId}/addMembers

http://yourserver.com/api/2.0/group/{contentId}/addMembers


Response Formats:
none

HTTP Method(s):
PUT

Requires Authentication:
true, user making call must pass a valid token parameter and must have edit permissions. Also, the group membership state must be set to allow modifying the members of the group.

Parameters:

Parameter Type Description
contentId int Required. The contentId of the group to add the members to
membersToAdd string Required. The comma delimited list of userIds to add to the group
token string Required. A valid token authentication parameter
Response Status Codes:
200 - Update successful
204 - If there are no membersToAdd
206 - Update successful, but some users were not added
401 - Token parameter is invalid
403 - No permissions to make update
409 - The content is not a group

Example request
POST http://yourserver.com/api/group/{contentId}/addMembers
POST Data addToRemove={membersToAdd}&token={token}
[
   {
      "AbbreviatedTitle":[
         {
            "Key":"en",
            "Value":""
         }
      ],
      "ContentId":77,
      "CreatorId":3,
      "DateModified":"\/Date(1236889988870-0700)\/",
      "DatePosted":"\/Date(1188459582153-0700)\/",
      "DatePublished":"\/Date(1222829151027-0700)\/",
      "GrandParentId":1,
      "LastModifiedBy":"...",
      "ModifiedId":12,
      "OwnerId":12,
      "ParentId":3,
      "Summary":[
         {
            "Key":"en",
            "Value":""
         }
      ],
      "Title":[
         {
            "Key":"en",
            "Value":"David Belfonte's Place"
         }
      ],
      "TreePath":"...",
      "ViewTypes":[
         18,
         6
      ],
      "Body":[
         {
            "Key":"en",
            "Value":"..."
         }
      ],
      "Birthday":"\/Date(-62135568000000-0800)\/",
      "BirthdayDisplay":2,
      "DefaultCulture":"en",
      "DisplayName":"",
      "DomainLogin":"P2135893\demo2",
      "Email":"dbelfonte@axio.com",
      "FirstName":"David",
      "ImageUrlLarge":"\/imagethumb\/739888700000\/18\/0x0\/False\/man+read+newspaper.jpg",
      "ImageUrlMedium":"\/imagethumb\/739888700000\/18\/250x250\/False\/man+read+newspaper.jpg",
      "ImageUrlSmall":"\/imagethumb\/739888700000\/18\/50x50\/False\/man+read+newspaper.jpg",
      "JobTitle":"Senior Project Manager",
      "LastName":"Belfonte",
      "LeaderPrimaryId":4,
      "LeaderSecondaryId":0,
      "PhoneFax":"",
      "PhoneMobile":"",
      "PhoneTel":"875-645-5444",
      "SalutationId":0,
      "Status":"",
      "StatusLastUpdated":"\/Date(-62135568000000-0800)\/",
      "StatusLastUpdatedRelative":"Updated Jan 1, 0001",
      "TimeZone":"Pacific Standard Time",
      "UserId":12
   },
   {
      "AbbreviatedTitle":[
         {
            "Key":"en",
            "Value":""
         }
      ],
      "ContentId":509,
      "CreatorId":13,
      "DateModified":"\/Date(1255755738630-0700)\/",
      "DatePosted":"\/Date(1192078789963-0700)\/",
      "DatePublished":"\/Date(1218769931950-0700)\/",
      "GrandParentId":1,
      "LastModifiedBy":"...",
      "ModifiedId":26,
      "OwnerId":26,
      "ParentId":3,
      "Summary":[
         {
            "Key":"en",
            "Value":""
         }
      ],
      "Title":[
         {
            "Key":"en",
            "Value":"..."
         }
      ],
      "TreePath":"...",
      "ViewTypes":[
         18,
         6
      ],
      "Body":[
         {
            "Key":"en",
            "Value":""
         }
      ],
      "Birthday":"\/Date(-62135568000000-0800)\/",
      "BirthdayDisplay":2,
      "DefaultCulture":"en",
      "DisplayName":"",
      "DomainLogin":"P2135893\demo14",
      "Email":"skrackleberry@axio.com",
      "FirstName":"Selina",
      "ImageUrlLarge":"\/imagethumb\/181386300000\/85\/0x0\/False\/AA044313_4.jpg",
      "ImageUrlMedium":"\/imagethumb\/181386300000\/85\/250x250\/False\/AA044313_4.jpg",
      "ImageUrlSmall":"\/imagethumb\/181386300000\/85\/50x50\/False\/AA044313_4.jpg",
      "JobTitle":"Senior Consultant",
      "LastName":"Krackleberry",
      "LeaderPrimaryId":23,
      "LeaderSecondaryId":15,
      "PhoneFax":"",
      "PhoneMobile":"846-872-4557",
      "PhoneTel":"654-457-5405",
      "SalutationId":0,
      "Status":"",
      "StatusLastUpdated":"\/Date(1225321377610-0700)\/",
      "StatusLastUpdatedRelative":"Updated Oct 29, 2008",
      "TimeZone":"Pacific Standard Time",
      "UserId":26
   }
]