c# - OneNote API - Cannot get Pages -


i have been playing around onenote api, , have been successful @ getting notebooks,sections,pages.

today have been unsuccessful getting pages using section.pagesurl.

my request: https://www.onenote.com/api/v1.0/sections/0-2b36c9469d6fe2e!19161/pages

where 0-2b36c9469d6fe2e!19161 id of section.

this has worked before, has somehow stopped working.

right before request notebooks, once finding correct notebook returned list, sections , again find correct section.

the response getting 200(ok) empty array:

{    "@odata.context":"https://www.onenote.com/api/v1.0/$metadata#me/notes/sections('0-2b36c9469d6fe2e%2119161')/pages",   "value":[      ]  } 

although can see same notbooks , sections in onenote client. , sections have pages. not getting them more.

any reason why happening?

could bug on side or there i'm missing?

i add bearer token httpclient so:

_client = new httpclient(); _client.defaultrequestheaders.authorization = new authenticationheadervalue("bearer", _tokenservice.accesstoken); 

which seemed work last week, , still working getting notebooks/sections


edit: requests + responses

request works (getting sections):

get https://www.onenote.com/api/v1.0/notebooks/0-2b36c9469d6fe2e!19159/sections http/1.1 authorization: bearer ewb4aq1dbaaugccxc8wu/zfu9qnldzxy+ynelfkaav1uu7y2xsmzqfs/jyikqrmlk3+hurlsmqztiyaefq5zvjznnsb5baexfsuagmnw4/b7dbk/tbjwww5wzbfv0wdjerylqcxu42wfpdkuhezxzvs1p14tey0dr7ozn+g10fn3/grwehirislaqcbh6vv+qeo+11kfhxicjerey6bjrmjvmczmundn59udm/jj8jj9t7q2llmqzqxfyra+dfrxwgcpznmajmrqydpwrmov3kzlx2zfl+k8hv7luk7eueztfj5itd4sjbcc2durdysjdi//r0yrf5do94myp2fd9dslwhbl9qehuj+nxfvcja+s3d+gxggobr29ivzblyqdzgaaciabxcl9fni6sahesujyyzd8qqdsytnb8nc2noza9jewkr/tghn2g/sofzbyrmezcx5pbakwghhwy40z2tcnd6mrgyfsboqbgimnokb7/vmhpgbukjrxigcgjmbw15iuykz11j7ck5+/jyyk+ufija8vedl+hjdaui35hd9n8919xpqmhsh9aizc8rec/7l90b5fle01i/ngxjuntxh92mkpm92+wvdun9d4qwez6yeypsbgynpx6bp8pfnbhu1e1lzua9znwdba1pw0oyvc8jvfhx8bdhnzc2ymeqo/0xzsx5wudvbbqfmu8gbqd86ms3hm6fsvxxzzhivmy0wr5wpqr4a3+amunfp6eapccri0ydf+vlmihhnckwhgrasufdrsmaslmmrqibattg4wjihywrkeprt4obajd/jvh9fvizrla33posn1clcfxlbkezyaywe= accept: application/json host: www.onenote.com 

response:

http/1.1 200 ok cache-control: no-cache pragma: no-cache content-type: application/json; odata.metadata=minimal expires: -1 server: microsoft-iis/8.5 x-correlationid: d3c85fde-c8e0-4e4e-a4df-87a3f57f146e x-usersessionid: d3c85fde-c8e0-4e4e-a4df-87a3f57f146e x-officefe: onenoteservicefrontend_in_0 x-officeversion: 16.0.6023.1561 x-officecluster: neu-www.onenote.com p3p: cp="cao dsp cor adma dev coni teli cur psa psd tai ivdi our sami bus dem nav sta uni com int phy onl fin pur" x-content-type-options: nosniff request-processing-time: 828.1859 ms odata-version: 4.0 preference-applied: odata.include-annotations=* x-aspnet-version: 4.0.30319 x-powered-by: asp.net date: sat, 25 jul 2015 12:10:58 gmt content-length: 3135  {   "@odata.context":"https://www.onenote.com/api/v1.0/$metadata#me/notes/notebooks('0-2b36c9469d6fe2e%2119159')/sections(parentnotebook(id,name,self),parentsectiongroup(id,name,self))","value":[     {       "isdefault":false,"pagesurl":"https://www.onenote.com/api/v1.0/sections/0-2b36c9469d6fe2e!41276/pages","name":"agily","createdby":"lndsoft test","lastmodifiedby":"lndsoft test","lastmodifiedtime":"2015-07-23t11:39:46.9z","id":"0-2b36c9469d6fe2e!41276","self":"https://www.onenote.com/api/v1.0/sections/0-2b36c9469d6fe2e!41276","createdtime":"2015-07-15t23:39:22.44z","parentnotebook@odata.context":"https://www.onenote.com/api/v1.0/$metadata#me/notes/notebooks('0-2b36c9469d6fe2e%2119159')/sections('0-2b36c9469d6fe2e%2141276')/parentnotebook(id,name,self)/$entity","parentnotebook":{         "id":"0-2b36c9469d6fe2e!19159","name":"agily","self":"https://www.onenote.com/api/v1.0/notebooks/0-2b36c9469d6fe2e!19159"       },"parentsectiongroup@odata.context":"https://www.onenote.com/api/v1.0/$metadata#me/notes/notebooks('0-2b36c9469d6fe2e%2119159')/sections('0-2b36c9469d6fe2e%2141276')/parentsectiongroup(id,name,self)/$entity","parentsectiongroup":null     },{       "isdefault":false,"pagesurl":"https://www.onenote.com/api/v1.0/sections/0-2b36c9469d6fe2e!19161/pages","name":"agilytest","createdby":"lndsoft test","lastmodifiedby":"m c","lastmodifiedtime":"2015-07-21t23:16:18.85z","id":"0-2b36c9469d6fe2e!19161","self":"https://www.onenote.com/api/v1.0/sections/0-2b36c9469d6fe2e!19161","createdtime":"2015-01-04t23:50:32.41z","parentnotebook@odata.context":"https://www.onenote.com/api/v1.0/$metadata#me/notes/notebooks('0-2b36c9469d6fe2e%2119159')/sections('0-2b36c9469d6fe2e%2119161')/parentnotebook(id,name,self)/$entity","parentnotebook":{         "id":"0-2b36c9469d6fe2e!19159","name":"agily","self":"https://www.onenote.com/api/v1.0/notebooks/0-2b36c9469d6fe2e!19159"       },"parentsectiongroup@odata.context":"https://www.onenote.com/api/v1.0/$metadata#me/notes/notebooks('0-2b36c9469d6fe2e%2119159')/sections('0-2b36c9469d6fe2e%2119161')/parentsectiongroup(id,name,self)/$entity","parentsectiongroup":null     },{       "isdefault":false,"pagesurl":"https://www.onenote.com/api/v1.0/sections/0-2b36c9469d6fe2e!41275/pages","name":"othersection","createdby":"lndsoft test","lastmodifiedby":"lndsoft test","lastmodifiedtime":"2015-07-15t23:36:15.037z","id":"0-2b36c9469d6fe2e!41275","self":"https://www.onenote.com/api/v1.0/sections/0-2b36c9469d6fe2e!41275","createdtime":"2015-07-15t23:35:13.9z","parentnotebook@odata.context":"https://www.onenote.com/api/v1.0/$metadata#me/notes/notebooks('0-2b36c9469d6fe2e%2119159')/sections('0-2b36c9469d6fe2e%2141275')/parentnotebook(id,name,self)/$entity","parentnotebook":{         "id":"0-2b36c9469d6fe2e!19159","name":"agily","self":"https://www.onenote.com/api/v1.0/notebooks/0-2b36c9469d6fe2e!19159"       },"parentsectiongroup@odata.context":"https://www.onenote.com/api/v1.0/$metadata#me/notes/notebooks('0-2b36c9469d6fe2e%2119159')/sections('0-2b36c9469d6fe2e%2141275')/parentsectiongroup(id,name,self)/$entity","parentsectiongroup":null     }   ] } 

request not work (getting pages, using url above):

request:

get https://www.onenote.com/api/v1.0/sections/0-2b36c9469d6fe2e!19161/pages http/1.1 authorization: bearer ewb4aq1dbaaugccxc8wu/zfu9qnldzxy+ynelfkaav1uu7y2xsmzqfs/jyikqrmlk3+hurlsmqztiyaefq5zvjznnsb5baexfsuagmnw4/b7dbk/tbjwww5wzbfv0wdjerylqcxu42wfpdkuhezxzvs1p14tey0dr7ozn+g10fn3/grwehirislaqcbh6vv+qeo+11kfhxicjerey6bjrmjvmczmundn59udm/jj8jj9t7q2llmqzqxfyra+dfrxwgcpznmajmrqydpwrmov3kzlx2zfl+k8hv7luk7eueztfj5itd4sjbcc2durdysjdi//r0yrf5do94myp2fd9dslwhbl9qehuj+nxfvcja+s3d+gxggobr29ivzblyqdzgaaciabxcl9fni6sahesujyyzd8qqdsytnb8nc2noza9jewkr/tghn2g/sofzbyrmezcx5pbakwghhwy40z2tcnd6mrgyfsboqbgimnokb7/vmhpgbukjrxigcgjmbw15iuykz11j7ck5+/jyyk+ufija8vedl+hjdaui35hd9n8919xpqmhsh9aizc8rec/7l90b5fle01i/ngxjuntxh92mkpm92+wvdun9d4qwez6yeypsbgynpx6bp8pfnbhu1e1lzua9znwdba1pw0oyvc8jvfhx8bdhnzc2ymeqo/0xzsx5wudvbbqfmu8gbqd86ms3hm6fsvxxzzhivmy0wr5wpqr4a3+amunfp6eapccri0ydf+vlmihhnckwhgrasufdrsmaslmmrqibattg4wjihywrkeprt4obajd/jvh9fvizrla33posn1clcfxlbkezyaywe= accept: application/json host: www.onenote.com 

response:

http/1.1 200 ok cache-control: no-cache pragma: no-cache content-type: application/json; odata.metadata=minimal expires: -1 server: microsoft-iis/8.5 x-correlationid: fe872c95-f8af-41e3-b019-4e6504a5e8df x-usersessionid: fe872c95-f8af-41e3-b019-4e6504a5e8df x-officefe: onenoteservicefrontend_in_0 x-officeversion: 16.0.6023.1561 x-officecluster: neu-www.onenote.com p3p: cp="cao dsp cor adma dev coni teli cur psa psd tai ivdi our sami bus dem nav sta uni com int phy onl fin pur" x-content-type-options: nosniff request-processing-time: 703.1688 ms odata-version: 4.0 preference-applied: odata.include-annotations=* x-aspnet-version: 4.0.30319 x-powered-by: asp.net date: sat, 25 jul 2015 12:10:58 gmt content-length: 143  {   "@odata.context":"https://www.onenote.com/api/v1.0/$metadata#me/notes/sections('0-2b36c9469d6fe2e%2119161')/pages","value":[    ] } 

edit 2: still not working

request:

get https://www.onenote.com/api/v1.0/sections/0-2b36c9469d6fe2e!19161/pages http/1.1 authorization: bearer ewcaaq1dbaaugccxc8wu/zfu9qnldzxy+ynelfkaazddnoj6atyof3wj8jfspncsx+uxw4fvursj29ichwliuhitdh11wkitykmbolkwhryinjz4+dknxjcnfhggv6r7aopseunt/lr+h/9hus20/av0/nssaoxh7lygkqekx22d+ktcprni9zoxbtr6t07tz7ahyx3v7f4qhqvzmg2pswtgvpwa/ttclb4jgdcehwqyv9xgjgnpijgyizvmi+hz0drkbf9gyp49bmnrgdi75jlyfecbyu1maxbdauquhzfxjgev8pmecsscgclm9jvbtt6ap6k6mqv5d6gece/chxgqo+3ioxxrlg/n61eghpf8/wbqorzecdnbbtcskcydzgaacpga/3ibm+sxuahc/d8iidqnnrqhyfy/sl7b179y4grsnp5yun7di7cknkfr4sswo1db9tbmzn3ba4ln94d4gezdhegnrjxtm5nfrrhrgoinzzfxtlfrva1gvgpgpc2s8cloacwe5zi2jr1ssf39afjjbyfmk2epyn8xrdzjbmfaxzfhv0moik3pabe/tk0yspqrk1whxhrlfxkyvk5pi8iowsykiuudp7b2gwvwae2wycx2p49yjs4qz/+ocu/k0jjv16kua/szn4g8lmcezykikrlggfxzbfkn8l9/secd7wj5x0pxh4adnvurcjsfnrreanaeg+kylshdhol3uiy/uilrsarlsdxmluv2jghdgiadz53wr+xkoyq7xobp7myhxiofoqnm7wvnki8+2cia8t9y+jtvtoqmxjtd1xacuuz8malpifqtthyyxmggoaukhocsv0tqz4jjaq== accept: application/json host: www.onenote.com 

response:

http/1.1 200 ok cache-control: no-cache pragma: no-cache content-type: application/json; odata.metadata=minimal expires: -1 server: microsoft-iis/8.5 x-correlationid: 7cb781ec-36d4-4485-b6c1-a48f7e536298 x-usersessionid: 7cb781ec-36d4-4485-b6c1-a48f7e536298 x-officefe: onenoteservicefrontend_in_5 x-officeversion: 16.0.6023.1561 x-officecluster: neu-www.onenote.com p3p: cp="cao dsp cor adma dev coni teli cur psa psd tai ivdi our sami bus dem nav sta uni com int phy onl fin pur" x-content-type-options: nosniff request-processing-time: 671.9287 ms odata-version: 4.0 preference-applied: odata.include-annotations=* x-aspnet-version: 4.0.30319 x-powered-by: asp.net date: tue, 28 jul 2015 02:21:40 gmt content-length: 143  {   "@odata.context":"https://www.onenote.com/api/v1.0/$metadata#me/notes/sections('0-2b36c9469d6fe2e%2119161')/pages","value":[    ] } 

you can see in below screenshot pages exist

for agily (notebook) -> agily (section)

onenote - pages exist

i have been investigating issue today. wondering if try request again?

our storage layer experienced failures on weekend possibly explain issue wanted verify you seeing issue still.

as far can tell request posted , logs on our end, there nothing wrong syntactically request , no obvious logic errors on our end, investigation pointing @ storage layer possibly being culprit.

thanks, daniel


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -