Creating profile tags
Added by IBM contributorIBM | Edited by Claudia R Elbourn on June 15, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

To assign tags to another user's profile, use a HTTP PUT to add the tags listed in the tag creator's tags category document.

You can only add tags that are created by the user whose credentials you provided to authenticate with the server.

 

Process

To retrieve the tags assigned to a profile from the Profiles tag collection,

1. Get the service document for the person's profile. See Retrieving the Profiles service document

2. Retrieve the value for the href attribute of the link element with the endpoint /profiles/atom/profileTags.do. The value of the rel attribute is http://www.ibm.com/xmlns/prod/sn/tag-cloud

3. Execute a PUT request on the value of the href attribute obtained in the previous step.

Note: When you update profile tags, the existing tag information is replaced with the new data. To avoid deleting all existing tags, retrieve the tags that you want to retain first, and send them back with this request

For the input, provide a profile tags Atom categories document.

Input
Method URI Description
PUT /profiles/atom/profileTags.do To assign tags to another user's profile, use a HTTP PUT to add the tags listed in the tag creator's tags category document.
Content Type: application/atom+xml
Sample Request:
<categories xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom">
<atom:category xmlns:snx="http://www.ibm.com/xmlns/prod/sn" term="profilessearchtag1234" snx:frequency="1" snx:intensityBin="1" snx:visibilityBin="1" snx:type="general" />
<category xmlns="http://www.w3.org/2005/Atom" term="test" />
<category xmlns="http://www.w3.org/2005/Atom" term="hello" />
<category xmlns="http://www.w3.org/2005/Atom" term="newTag tagProfiles_20140310t023018z" />
</categories> 

Name Type Optional Description
targetEmail
string Yes Specifies the email address of the person whose profile you want to apply the tags to. You must provide one target parameter, either this option or the targetKey option.
targetKey
string No Specifies the unique ID of the person whose profile you want to apply the tags to. You must provide one target parameter, either this option or the targetEmail option.
sourceEmail
string Yes Specifies the email address of the creator of the tags. You must provide one source parameter, either this option or the sourceKey option.
sourceKey
string No Specifies the unique ID of the creator of the tags. You must provide one source parameter, either this option or the sourceEmail option.
lastMod
date Yes The date it was last modified in numerical value.
Output
Content Type: application/atom+xml
Code Description
200
Indicates that the tags were successfully created.
400
An error was encountered.