1 Reply Latest reply on Sep 7, 2015 12:44 AM by Michal Wrobel

    C# rest api download workbook not authorized

    Dana Withers

      Hi Everyone!

       

      I have written a C# program that uses the Rest API to connect to the server (using a server admin user), go through all sites and download all workbooks and datasources. For each file I'm extracting the unpackaged version and saving it to disk. This will be our nightly backup to load everything on the server into our version control software.

       

      My program works completely on our v9 test server. Unfortunately we're not live with v9 yet, we're on 8.02.11. On our v8 server I'm getting errors returned of 'unauthorized'. To be precise, I'm fine to log into the server and query sites. I'm also fine to log into each site and I can query datasources and get the full list, but query workbooks returns nothing, even though as a site admin I have access to everything.

      Question one... Does anyone know why query datasources works fine, but workbooks doesn't?

       

      Question two... After all the logins work, when I try download datasource or download workbook... The return code says "Unauthorized". My site admin has all the rights and authorisation has worked so far, so I do not understand what is not authorized?

       

      Does anyone have any tips or knows if anything has changed between v8 and v9 that makes all the same code work without any problems on the v9 server?

       

      Thanks!

       

      Dana