...
Then i'd like a short tutorial on this launch page on how to interact w/ the api i.e. login, make calls w/ cookie
api calls:
- /search/feed
- /search/suggest
- /wiki/spaces/CTOC/pages/49741941
- /bookmark
- /alert
ignore all the stuff below here
Search
- /search/feed
- /search/suggest/{search_term}
Channel
- /channel
- /channel/{channel_id}
- /channel/{channel_id}/events - NOTE, liked has to always be specified because it can't be null in java
- /channel/{channel_id}/events/{event_id}
- /channel/{channel_id}/locations
- /channel/{channel_id}/locations/{location_id}
Bookmark
- /bookmark
- /bookmark/{bookmark_id}
Alert
- /alert
- /alert/{bookmark_id}
...
Note |
---|
All function that support an id can be sent with that id in the json payload, or in the url, simply for ease of use. |
GET - Retrieve
Code Block |
---|
curl -b cookies.txt -X GET "http://localhost:8185/channel" > response.txt curl -b cookies.txt -X GET "http://localhost:8185/channel/530fa006b8e0380813c9fb42" > response.txt curl -b cookies.txt -X GET -d '{"channel_id":"530fa006b8e0380813c9fb42"}' "http://localhost:8185/channel" > response.txt curl -b cookies.txt -X GET "http://localhost:8185/bookmark" > response.txt curl -b cookies.txt -X GET "http://localhost:8185/bookmark/530fa006b8e0380813c9fb42" > response.txt curl -b cookies.txt -X GET -d '{"bookmark_id":"530fa006b8e0380813c9fb42"}' "http://localhost:8185/bookmark" > response.txt curl -b cookies.txt -X GET "http://localhost:8185/alert" > response.txt curl -b cookies.txt -X GET "http://localhost:8185/alert"/530fa006b8e0380813c9fb42" > response.txt curl -b cookies.txt -X GET -d '{"alert"_id":"530fa006b8e0380813c9fb42"}' "http://localhost:8185/alert" > response.txt |
POST - Create
Code Block |
---|
curl -b cookies.txt -X POST -d '{"name":"abc123"}' "http://localhost:8185/channel" > response.txt curl -b cookies.txt -X POST -d '{"event_id":"530fa006b8e0380813c9fb42"}' "http://localhost:8185/bookmark" > response.txt curl -b cookies.txt -X POST -d '{"event_id":"530fa006b8e0380813c9fb42"}' "http://localhost:8185/alert" > response.txt |
PUT - Update
Code Block |
---|
curl -b cookies.txt -X PUT -d '{"name":"c2"}' "http://localhost:8185/channel/530fa006b8e0380813c9fb42" > response.txt curl -b cookies.txt -X PUT -d '{"channel_id":"530fa006b8e0380813c9fb42", "name":"c2"}' "http://localhost:8185/channel" > response.txt curl -b cookies.txt -X PUT -d '{"event_id":"530fa006b8e0380813c9fb42"}' "http://localhost:8185/bookmark/530fa006b8e0380813c9fb42" > response.txt curl -b cookies.txt -X PUT -d '{"bookmark_id":"530fa006b8e0380813c9fb42", "event_id":"530fa006b8e0380813c9fb42"}' "http://localhost:8185/bookmark" > response.txt curl -b cookies.txt -X PUT -d '{"name":"c2"}' "http://localhost:8185/alert/530fa006b8e0380813c9fb42" > response.txt curl -b cookies.txt -X PUT -d '{"alert_id":"530fa006b8e0380813c9fb42", "name":"c2"}' "http://localhost:8185/alert" > response.txt |
DELETE - Remove
Code Block |
---|
curl -b cookies.txt -X DELETE "http://localhost:8185/channel/530fa006b8e0380813c9fb42" > response.txt curl -b cookies.txt -X DELETE -d '{"channel_id":"530fa006b8e0380813c9fb42"}' "http://localhost:8185/channel" > response.txt curl -b cookies.txt -X DELETE "http://localhost:8185/bookmark/530b53c6b8e0fa29851a63e7" > response.txt curl -b cookies.txt -X DELETE -d '{"bookmark_id":"530fa006b8e0380813c9fb42"}' "http://localhost:8185/bookmark" > response.txt curl -b cookies.txt -X DELETE "http://localhost:8185/alert/530fa006b8e0380813c9fb42" > response.txt curl -b cookies.txt -X DELETE -d '{"alert_id":"530fa006b8e0380813c9fb42"}' "http://localhost:8185/alert" > response.txt |