|
|
|
Forum Member
Group: Forum Members
Last Login: 10/2/2007 6:06:36 AM
Posts: 6,
Visits: 13
|
|
Hello, I'm having some difficulty in setting the read state of an item using the REST API. I'm issuing:
curl http://services.newsgator.com/ngws/svc/PostItem.aspx?loc=Egress&r=3532702849 --user : --header "X-NGAPIToken: " --request POST
and I receive a 401.2 Access Denied. Is there something obvious that I'm doing wrong? Any help would be appreciated. Thanks.
|
|
|
|
|
NewsGator
Group: NewsGator Staff
Last Login: 11/5/2007 3:20:31 PM
Posts: 6,
Visits: 16
|
|
| Hi Garish, I've been looking into this and can't seem to repeat the access denied response. We currently do not have any restrictions on this method. However, I was able to repeat this with invalid credentials. Is the crendential issue a possibility?
|
|
|
|
|
Forum Member
Group: Forum Members
Last Login: 10/2/2007 6:06:36 AM
Posts: 6,
Visits: 13
|
|
Chris,
Thanks very much for the response. It was a "loose nut at the keyboard" as I had neglected to add --digest to the curl command line. On a related note, if I issue an "unread" command (u=xxxxx) should I then see the item reappear in the web reader?
-Karl
|
|
|
|
|
NewsGator
Group: NewsGator Staff
Last Login: 11/5/2007 3:20:31 PM
Posts: 6,
Visits: 16
|
|
| Hi Karl, no the item will not show up again in the web reader. I've submitted this issue as a bug (item not reappearing) and will follow up on this when a resolution is availble. Thanks, Chris
|
|
|
|
|
Forum Member
Group: NewsGator Staff
Last Login: 9/19/2008 4:46:30 PM
Posts: 21,
Visits: 108
|
|
| Karl, We do have a fix for this now, and we will reply when it has been pushed to production. Thanks, Rob
|
|
|
|
|
NewsGator
Group: NewsGator Staff
Last Login: 11/5/2007 3:20:31 PM
Posts: 6,
Visits: 16
|
|
| Karl, The fix for this is now available ! ! ! We appreciate your support Karl. Thanks, |
Chris
|
|
|
|
|
Forum Member
Group: Forum Members
Last Login: 2/6/2008 5:46:23 AM
Posts: 2,
Visits: 20
|
|
Hello guys,
Setting unread state still doesn't work for me.
First I'm setting read state (works fine)
POST /ngws/svc/PostItem.aspx HTTP/1.0
Pragma: no-cache
X-NGAPIToken: ****************
Authorization: Basic ****************=
Content-Type: application/x-www-form-urlencoded
Content-Length: 42
Host: services.newsgator.com
User-Agent: Foobar
loc=NewsGator%20Web%20Edition&r=3729785502
HTTP/1.1 200 OK
Connection: close
Date: Thu, 01 Nov 2007 15:56:56 GMT
Server: Microsoft-IIS/6.0
MicrosoftOfficeWebServer: 5.0_Pub
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: application/application/xml+xml
Content-Length: 313548
... XML stuff
Then I'm trying to set unread state (looks ok from the HTTP point of view)
POST /ngws/svc/PostItem.aspx HTTP/1.0
Pragma: no-cache
X-NGAPIToken: ****************
Authorization: Basic ****************=
Content-Type: application/x-www-form-urlencoded
Content-Length: 42
Host: services.newsgator.com
User-Agent: Foobar
loc=NewsGator%20Web%20Edition&u=3729785502
HTTP/1.1 200 OK
Connection: close
Date: Thu, 01 Nov 2007 15:57:05 GMT
Server: Microsoft-IIS/6.0
MicrosoftOfficeWebServer: 5.0_Pub
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: application/application/xml+xml
Content-Length: 313548
... XML stuff
But the item doesn't reappear in my interface (a tiny reader for the Archos 605 PMP, by the way).
Did I miss something ?
Anyway, Newsgator is a great product.
Thanks for that !
Yannick
|
|
|
|
|
NewsGator
Group: NewsGator Staff
Last Login: 11/5/2007 3:20:31 PM
Posts: 6,
Visits: 16
|
|
| Hi Yannick, here is the link to the REST API http://www.newsgator.com/ngs/api/NewsGatorRESTAPI.pdf if you look on page 26 this call is detailed. Essentially, your "loc=NewsGator%20Web%20Edition&u=3729785502" needs to be in the post data portion of the request, not part of the URI. This call is a little different from the others in that the post data cannot be part of the URI. Hope that helps! Regards, Chris
|
|
|
|
|
Forum Member
Group: Forum Members
Last Login: 2/6/2008 5:46:23 AM
Posts: 2,
Visits: 20
|
|
Hello Chris,
Thanks for your response, but I do use POST method for the query.
POST /ngws/svc/PostItem.aspx HTTP/1.0
Pragma: no-cache
X-NGAPIToken: ****************
Authorization: Basic ****************=
Content-Type: application/x-www-form-urlencoded
Content-Length: 42
Host: services.newsgator.com
User-Agent: Foobar
loc=NewsGator%20Web%20Edition&u=3729785502
I'm going to do some more tests side by side with Newsgator online reader...
Yannick
|
|
|
|