Documentation

API /users/{userId}/groups [GET]

ThoughtFarmer REST API Method: /users/{userId}/groups

Gets all of the groups associated with the {userId}.

URL:
http://yourserver.com/api/users/{userId}/groups

Response Formats:
JSON

HTTP Method(s):
GET

Requires Authentication:
true, user making call must pass a valid token parameter

Parameters:

Parameter Type Description
userId int Required. The user id of the user to retrieve the groups of
token string Required. A valid token authentication parameter
Response Status Codes:
200 - Success
204 - No groups found
401 - Token parameter is invalid
404 - User not found

Example request
GET http://yourserver.com/api/user/{userId}/groups
[
   {
      "AbbreviatedTitle":[
         {
            "Key":"en",
            "Value":""
         },
         {
            "Key":"fr",
            "Value":""
         }
      ],
      "ContentId":221,
      "CreatorId":15,
      "DateModified":"\/Date(1291687057317-0800)\/",
      "DatePosted":"\/Date(1188899397823-0700)\/",
      "DatePublished":"\/Date(1188899397823-0700)\/",
      "GrandParentId":1,
      "LastModifiedBy":"...",
      "ModifiedId":72,
      "OwnerId":15,
      "ParentId":50,
      "Summary":[
         {
            "Key":"en",
            "Value":""
         },
         {
            "Key":"fr",
            "Value":""
         }
      ],
      "Title":[
         {
            "Key":"en",
            "Value":"Human Resources"
         },
         {
            "Key":"fr",
            "Value":"RH"
         }
      ],
      "TreePath":"...",
      "ViewTypes":[
         17,
         21
      ],
      "Body":[
         {
            "Key":"en",
            "Value":""
         },
         {
            "Key":"fr",
            "Value":""
         }
      ],
      "Group":{
         "AddressLine1":"",
         "AddressLine2":"",
         "AddressLine3":"",
         "AddressLine4":"",
         "Email":"",
         "GroupId":42,
         "GroupTypeId":3,
         "MembershipOpen":true,
         "PhoneFax":"",
         "PhoneTel1":null,
         "PhoneTel2":"",
         "Web":""
      },
      "IsGroup":true
   },
   {
      "AbbreviatedTitle":[
         {
            "Key":"en",
            "Value":""
         }
      ],
      "ContentId":1341,
      "CreatorId":5,
      "DateModified":"\/Date(1222815263193-0700)\/",
      "DatePosted":"\/Date(1222815263193-0700)\/",
      "DatePublished":"\/Date(1222815263167-0700)\/",
      "GrandParentId":50,
      "LastModifiedBy":"...",
      "ModifiedId":72,
      "OwnerId":5,
      "ParentId":221,
      "Summary":[
         {
            "Key":"en",
            "Value":""
         }
      ],
      "Title":[
         {
            "Key":"en",
            "Value":"..."
         }
      ],
      "TreePath":"...",
      "ViewTypes":[
         17,
         18
      ],
      "Body":[
         {
            "Key":"en",
            "Value":"..."
         }
      ],
      "Group":{
         "AddressLine1":"",
         "AddressLine2":"",
         "AddressLine3":"",
         "AddressLine4":"",
         "Email":"",
         "GroupId":78,
         "GroupTypeId":1,
         "MembershipOpen":true,
         "PhoneFax":"",
         "PhoneTel1":null,
         "PhoneTel2":"",
         "Web":""
      },
      "IsGroup":true
   },
   {
      "AbbreviatedTitle":[
         {
            "Key":"en",
            "Value":""
         }
      ],
      "ContentId":1987,
      "CreatorId":5,
      "DateModified":"\/Date(1305000672247-0700)\/",
      "DatePosted":"\/Date(1234575984410-0800)\/",
      "DatePublished":"\/Date(1234575984367-0800)\/",
      "GrandParentId":1,
      "LastModifiedBy":"...",
      "ModifiedId":72,
      "OwnerId":5,
      "ParentId":50,
      "Summary":[
         {
            "Key":"en",
            "Value":""
         }
      ],
      "Title":[
         {
            "Key":"en",
            "Value":"Product Management"
         }
      ],
      "TreePath":"...",
      "ViewTypes":[
         17,
         18
      ],
      "Body":[
         {
            "Key":"en",
            "Value":"..."
         }
      ],
      "Group":{
         "AddressLine1":"400 - 501 United Blvd",
         "AddressLine2":"Hartford, Connecticut USA 54444",
         "AddressLine3":"",
         "AddressLine4":"",
         "Email":"pm@axio.com",
         "GroupId":120,
         "GroupTypeId":3,
         "MembershipOpen":true,
         "PhoneFax":"",
         "PhoneTel1":null,
         "PhoneTel2":"",
         "Web":""
      },
      "IsGroup":true
   },
   {
      "AbbreviatedTitle":[
         {
            "Key":"en",
            "Value":""
         }
      ],
      "ContentId":2448,
      "CreatorId":5,
      "DateModified":"\/Date(1286486460917-0700)\/",
      "DatePosted":"\/Date(1248935974877-0700)\/",
      "DatePublished":"\/Date(1248935974863-0700)\/",
      "GrandParentId":103,
      "LastModifiedBy":"...",
      "ModifiedId":5,
      "OwnerId":5,
      "ParentId":3715,
      "Summary":[
         {
            "Key":"en",
            "Value":""
         }
      ],
      "Title":[
         {
            "Key":"en",
            "Value":"..."
         }
      ],
      "TreePath":"...",
      "ViewTypes":[
         17,
         18
      ],
      "Body":[
         {
            "Key":"en",
            "Value":"\u000a  "
         }
      ],
      "Group":{
         "AddressLine1":"",
         "AddressLine2":"",
         "AddressLine3":"",
         "AddressLine4":"",
         "Email":"",
         "GroupId":148,
         "GroupTypeId":5,
         "MembershipOpen":true,
         "PhoneFax":"",
         "PhoneTel1":null,
         "PhoneTel2":"",
         "Web":""
      },
      "IsGroup":true
   },
   {
      "AbbreviatedTitle":[
         {
            "Key":"en",
            "Value":""
         }
      ],
      "ContentId":2523,
      "CreatorId":5,
      "DateModified":"\/Date(1276301420600-0700)\/",
      "DatePosted":"\/Date(1253744653900-0700)\/",
      "DatePublished":"\/Date(1253744653900-0700)\/",
      "GrandParentId":1,
      "LastModifiedBy":"...",
      "ModifiedId":110,
      "OwnerId":5,
      "ParentId":50,
      "Summary":[
         {
            "Key":"en",
            "Value":""
         }
      ],
      "Title":[
         {
            "Key":"en",
            "Value":"Research & Analysis"
         }
      ],
      "TreePath":"...",
      "ViewTypes":[
         17,
         20
      ],
      "Body":[
         {
            "Key":"en",
            "Value":""
         }
      ],
      "Group":{
         "AddressLine1":"500 - 353 Water Street",
         "AddressLine2":"Vancouver, BC",
         "AddressLine3":"V6B1B8",
         "AddressLine4":"Canada",
         "Email":"",
         "GroupId":246,
         "GroupTypeId":3,
         "MembershipOpen":false,
         "PhoneFax":"604-694-0558",
         "PhoneTel1":null,
         "PhoneTel2":"",
         "Web":""
      },
      "IsGroup":true
   }
]