Channel / {channel_id} / Keywords

/channel/{channel_id}/keywords

Add or remove a list of keywords to modify the scoring of a channel (typically used to seed a new channel).  All given keywords will try to find any entities matching using search suggest and update their scores accordingly e.g. given the keyword "obama" this call might update entity scores for [barack obama/person, michelle obama/person, obama administration/other, etc].


POST - will add any new keywords (and associated entities)
DELETE - will remove any existing keywords (and associated entities)
PUT - will replace the existing keywords (and associated entities) with the passed in list

Possible Methods

POST PUT DELETE

Arguments

channel_id (required)
Channel id to modify

Json Object
{
	"keywords":[String,String,String,...] //list of keywords to add/remove
}

 

Example
curl -b cookies.txt -X POST -d '{"keywords":"["obama","hillary"]}'  "http://localhost:8185/channel/531733e8b8e08e9d2197b0b0/keywords" > response.txt
curl -b cookies.txt -X PUT -d '{"keywords":"["obama","hillary"]}'  "http://localhost:8185/channel/531733e8b8e08e9d2197b0b0/keywords" > response.txt
curl -b cookies.txt -X DELETE -d '{"keywords":"["obama","hillary"]}'  "http://localhost:8185/channel/531733e8b8e08e9d2197b0b0/keywords" > response.txt

 

Example Response
curl -b cookies.txt -X DELETE -d '{"keywords":"["obama"]}' "http://localhost:8185/channel/531733e8b8e08e9d2197b0b0/keywords" > response.txt

 

 {
    "response": {
        "action": "Channel/Events",
        "success": true,
        "message": "Deleted keywords if they existed",
        "time": 0
    },
    "data": {
        "channel_id": "5384b2db8669e687ee4929bd",
        "name": "tt1",
        "locations": [],
        "events": [],
        "score": {
            "entities": {
                "president obama boy/person": 0,
                "http://thinkprogress.org/security/2012/10/30/1110901/bush-fema-director-katrina-hits-obama-sandy//url": 0,
                "bloomberg endorses obama/person": 0,
                "obama/person": 0,
                "online obamacare trouble/keyword": 0,
                "michelle obama/person": 0,
                "obama white house/building": 0,
                "obama2012/twitteruser": 0,
                "first lady michelle obama/person": 0,
                "obama/place": 0,
                "obama/hashtag": 0,
                "obama2012/hashtag": 0,
                "lady michelle obama/person": 0,
                "barackobama/twitterhandle": 0,
                "president obama/person": 0,
                "obama pay price/person": 0,
                "http://www.rightnow.io/breaking-news/occupyistanbul-vanartgallery_bn_1370318585180.html/url": 0,
                "reallyandrea/twitterhandle": 0,
                "barack obama/person": 0,
                "obama administration/organization": 0
            },
            "tags": {},
            "keywords": {"hillary":1.0},
            "source_types": {}
        },
        "created_date": "May 27, 2014 03:44:27 PM UTC",
        "index": 0,
        "favorite": false
    }
}