unable to get data from Restfull API

Sep 1, 2013 at 12:36 AM
Edited Sep 1, 2013 at 12:37 AM
i am using dotnetage 3.0.1
i am unable to get and insert content type data from restful api

My content type is news

get (localhost/api/home/news/items)

unable to get data from above url.

Response

To:http://localhost/404.html with status: 302 Show explanation HTTP/1.1 302 Redirect
Redirection information has not been cached.
Content-Type: text/html; charset=UTF-8
Location: http://localhost:8081/404.html
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Sun, 01 Sep 2013 00:33:03 GMT
Content-Length: 153


Same case for newitems

POST localhost/api/home/news/newItem

Response

To:http://localhost/404.html with status: 302 Show explanation HTTP/1.1 302 Redirect
Redirection information has not been cached.
Content-Type: text/html; charset=UTF-8
Location: http://localhost:8081/404.html
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Sun, 01 Sep 2013 00:34:24 GMT
Content-Length: 153
Coordinator
Sep 1, 2013 at 2:18 AM
Because the api which you call are not exists. Please read http://www.dotnetage.com/home/en-US/development/2013/08/31/contenttypes.html
Sep 1, 2013 at 2:26 AM
Edited Sep 1, 2013 at 2:36 AM
I already studied upper link but i am unable to get data and post data into news list(content type).

from where i can find the ListID

please send me some example
Coordinator
Sep 1, 2013 at 5:43 AM
Could you paste your code here ?
Sep 1, 2013 at 10:36 PM
Thanks for helping me .

i am again facing problem when i am posting data.

/api/home/contents/newitem/{listid}


how can i get the {listid} for inserting newitem.
Coordinator
Sep 2, 2013 at 12:45 AM
You are right I think there are some apis need refactory.
There some http api use list id some that we need to change using {list name} to instead.