Documentation

API /user/add

ThoughtFarmer REST API Method: /user/add

Adds a user to ThoughtFarmer. Returns newly created user when successful.

URL:
http://yourserver.com/api/user/add
http://yourserver.com/api/2.0/user/add

Response Formats:
xml,json

HTTP Method(s):
POST

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

Parameters:

Parameter Type Description
firstName string(100) Required. The first name of the user to add
lastName string(100) Required. The last name of the user to add
email string(255) The email address of the user to add. Must be a valid email and must not already be assigned to another user
username string(255) Required. The username of the user to add. eg. tf\joesmith
authenticationStore string Required. This value must be either ActiveDirectory or Database
token string Required. A valid token authentication parameter
Response Status Codes:
200 - User created successfully
401 - Token parameter is invalid
403 - No permissions to make update
500 - For any parameter validation errors

Example request
POST http://yourserver.com/api/user/add
POST Data username={username}&firstName={firstName}&lastName={lastName}&authenticationStore={authenticationStore}&token={token}
{
   "AbbreviatedTitle":[
      {
         "Key":"en",
         "Value":""
      }
   ],
   "ContentId":19,
   "CreatorId":1,
   "DateModified":"\/Date(1320735298217-0800)\/",
   "DatePosted":"\/Date(1188364256700-0700)\/",
   "DatePublished":"\/Date(1215763573877-0700)\/",
   "GrandParentId":1,
   "LastModifiedBy":"...",
   "ModifiedId":7,
   "OwnerId":8,
   "ParentId":3,
   "Summary":[
      {
         "Key":"en",
         "Value":""
      }
   ],
   "Title":[
      {
         "Key":"en",
         "Value":"..."
      }
   ],
   "TreePath":"...",
   "ViewTypes":[
      18,
      6
   ],
   "Body":[
      {
         "Key":"en",
         "Value":"Latest information"
      }
   ],
   "Birthday":"\/Date(-62135568000000-0800)\/",
   "BirthdayDisplay":2,
   "DefaultCulture":"en",
   "DisplayName":"Arnie",
   "DomainLogin":"P2135893\administrator",
   "Email":"tim@openroad.uk",
   "FirstName":"Arnie",
   "ImageUrlLarge":"\/imagethumb\/248982170000\/508\/0x0\/False\/alberteinstein.jpg",
   "ImageUrlMedium":"\/imagethumb\/248982170000\/508\/250x250\/False\/alberteinstein.jpg",
   "ImageUrlSmall":"\/imagethumb\/248982170000\/508\/50x50\/False\/alberteinstein.jpg",
   "JobTitle":"Intranet Administrator",
   "LastName":"McAdmin",
   "LeaderPrimaryId":12,
   "LeaderSecondaryId":0,
   "PhoneFax":"",
   "PhoneMobile":"",
   "PhoneTel":"604-555-1212 x180",
   "SalutationId":0,
   "Status":"Demoing to Nerd Corp",
   "StatusLastUpdated":"\/Date(1297215069777-0800)\/",
   "StatusLastUpdatedRelative":"Updated Feb 8, 2011",
   "TimeZone":"Pacific Standard Time",
   "UserId":8
}