Documentation

API /user/{userId}/customfield/{customfieldgroup}/{customfieldname}/updatetag

ThoughtFarmer REST API Method: /user/{userId}/customfield/{customfieldgroup}/{customfieldname}/updatetag

Updates a custom field for a user that is a tag type of custom field. The templateId is the unique name of the custom field. This call is preferred for tag type of custom fields over /user/{userId}/customfield/{templateId}/update. It will support multiple tags as a comma separated value parameter. With no value parameter it will clear out all existing tags for the specified custom field.
 
URL:
http://yourserver.com/api/user/{userId}/customfield/{customfieldgroup}/{customfieldname}/updatetag

http://yourserver.com/api/2.0/user/{userId}/customfield/{customfieldgroup}/{customfieldname}/updatetag


Response Formats:
xml,json

HTTP Method(s):
POST
 
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
customfieldgroup string Required. The group name of the custom field to retreive the data for
customfieldname string Required. The name of the tag type of custom field. This is the sanitized name of the custom field. e.g. a filed called Start Date would be santized to StartDate.
value string Required. The value to update the custom field to
token string Required. A valid token authentication parameter
Response Status Codes:
200 - Success
401 - Token parameter is invalid
403 - You do not have permission to update this user or you are trying to update a private custom field that does not belong to you
500 - Any of: custom field is not a tag type; tag creation is disabled; custom field is not editable

Example request
POST http://yourserver.com/api/user/{userId}/customfield/{customfieldgroup}/{customfieldname}/updatetag
POST Data value={value}&token={token}

Example Curl
 

--Will clear all tag fields 

curl --verbose --request POST --data token=9767************6 --data value=""
http://yourserver.com/api/user/60/customfield/skills/languages/updatetag

--Will add 3 tag fields 

curl --verbose --request POST --data token=9767************6 --data value="English, Spanish, French"
http://yourserver.com/api/user/60/customfield/skills/languages/updatetag
Response
 
{
   "CustomFieldId":25,
   "Editable":true,
   "Label":[
      {
         "Key":"en",
         "Value":"English, Spanish, French"
      }
   ],
   "Name":"Languages",
   "Type":5,
   "Value":""
}