Authentication

To access the API , Curate wiki uses http basic authentication.So use the crendtils provided from curate wiki for authentication like following for each request.

"EXAMPLE REQUEST"

curl http://curate.wiki/api/curate_wiki/pages.json -u "username:password"

Get All Pages

This method can be used for fetching all page titles with their ids.

"EXAMPLE REQUEST"

curl http://curate.wiki/api/curate_wiki/pages.json -u "username:password"

Create New Page

This method can be used for creating new page. It will need to enter page title and password.

"EXAMPLE REQUEST"

curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"page_name":"test","password":"test"}' http://curate.wiki/api/curate_wiki/pages -u "username:password"

Get Recent

This method can be used to fetch the recent contents of a page from a specific date till today.It will need to enter page title and from date (ex: dd-mm-yyyy)

"EXAMPLE REQUEST"

curl -X GET -H "Content-type: application/json" -H "Accept: application/json" "http://curate.wiki/api/curate_wiki/contents/recent?page_name=page-title&from_date=dd-mm-yyyy" -u "username:password"

Get All Content

This method can be used to fetch all the contents of a page.It will need to enter page title

"EXAMPLE REQUEST"

curl -X GET -H "Content-type: application/json" -H "Accept: application/json" "http://curate.wiki/api/curate_wiki/contents?page_name=sandeep-page" -u "username:password"

Create New Content

This method can be used to create a new content of a page. It will need to enter page title , page password , and content url.

"EXAMPLE REQUEST"

curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"page_name":"page-title","password":"page-password","url":"http://www.test.com"}' http://curate.wiki/api/curate_wiki/contents -u "username:password"

Delete Content

This method can be used to delete the specific content of a page.It will need to enter page name, page password , url of content that to be deleted.

"EXAMPLE REQUEST"

curl -H "Accept: application/json" -H "Content-type: application/json" -X DELETE -d '{"page_name":"page-title","password":"page-password","url":"http://www.test.com"}' http://curate.wiki/api/curate_wiki/contents -u "username:password"

Follow A Page

This method can be used to follow a page. It will need to enter page title and follower's email.

"EXAMPLE REQUEST"

curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"page_name":"page title","email":"follower@email.com"}' http://curate.wiki/api/curate_wiki/subscriptions -u "username:password"