Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
/search/suggest/

...

{search_term}
Info

Retrieves a specific channel or all channels available to the user if channel_id is not provided. (TODO: UPDATE)

Possible Methods 
(TODO: UPDATE)

POST PUT DELETE

Arguments 
(TODO: UPDATE)

channel_id(optional)
Channel id to try and return, if not provided returns all channels for current user

Json Object
(TODO: UPDATE)
Code Block

Returns a list of strings matching the search_term.

Possible Methods

GET

Arguments 

search_term (required)
Text string to return matching entities for.  Does a "*search_term*" query against entities in infinit.e and returns a unique alphabetized list.

Json Object

N/A

 

Example
Code Block
curl -b cookies.txt -X GET "http://nsight-api-1.rr.ikanow.com/nsight/search/suggest/oba" > response.txt
curl -b cookies.txt -X GET "http://nsight-api-1.rr.ikanow.com/nsight/search/suggest/white hou" > response.txt

 

Example Response
Info
Info

http://nsight-api-1.rr.ikanow.com/nsight/search/suggest/oba

Code Block
 {
    "response": {
        "
channel_id
action"
: "
531733e8b8e08e9d2197b0b0
SearchSuggest",
        "
events" : []
success": true,
        "message": "Call Completed",
        "
locations" : [],
time": 0
    },
    "data": {
        "suggestions": [
            "barack obama",
            "
name" : "abc123" }

 

Example
(TODO: UPDATE)
Code Block
curl -b cookies.txt -X GET "http://localhost:8185/channel" > response.txt
curl -b cookies.txt -X GET "http://localhost:8185/channel/531733e8b8e08e9d2197b0b0" > response.txt
curl -b cookies.txt -X POST -d '{"name":"abc123"}'  "http://localhost:8185/channel" > response.txt
curl -b cookies.txt -X PUT-d '{"name":"renamed my channel"}'  "http://localhost:8185/channel/531733e8b8e08e9d2197b0b0" > response.txt
curl -b cookies.txt -X PUT-d '{"channel_id":"531733e8b8e08e9d2197b0b0", "name":"renamed my channel"}'  "http://localhost:8185/channel" > response.txt
curl -b cookies.txt -X DELETE -d '{"channel":"531733e8b8e08e9d2197b0b0"}'  "http://localhost:8185/channel" > response.txt
curl -b cookies.txt -X DELETE "http://localhost:8185/channel/531733e8b8e08e9d2197b0b0" > response.txt

 

Example Response
Code Block
 first lady michelle obama",
            "hail obama",
            "http://www.dailykos.com/story/2012/09/20/1134471/-obama-fights-to-retain-ndaa-power-to-detain-us-citizens-in-military-custody",
            "http://www.foxnews.com/politics/2012/10/27/obama-avoids-question-on-whether-americans-in-libya-were-denied-requests-for/",
            "lady michelle obama",
            "michelle obama",
            "obama",
            "obama administration",
            "obama pay price",
            "obama white house",
            "obama2012",
            "obamacare",
            "obamacare website woe",
            "olusegun obasanjo",
            "online obamacare trouble",
            "president barak obama",
            "president obama",
            "president obama boy"
        ]
    }
}