Smartsheet API Resourcenotfooundexception Creating new sheet









up vote
1
down vote

favorite












I am creating a new sheet in Smartsheet via the API in Visual Studio 2015 C#.

I have followed the code/API Guide from Smartsheet but i get an error at run time when the code fires.



The error is as follows:



Smartsheet.Api.ResourceNotFoundException was unhandled
HResult=-2146233088
Message=Not Found
Source=smartsheet-csharp-sdk
StackTrace:
at Smartsheet.Api.Internal.AbstractResources.HandleError(HttpResponse response)
at Smartsheet.Api.Internal.AbstractResources.CreateResource[T](String path, Type objectClass, T object)
at Smartsheet.Api.Internal.FolderSheetResourcesImpl.CreateSheet(Int64 folderId, Sheet sheet)
at Aviva_Order_Systems.avivaorders.button1_Click(Object sender, EventArgs e) in C:DropboxAL DBDropboxAvivaOrder ProjectAviva Order Systemsavivaorders.cs:line 372
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Aviva_Order_Systems.Program.Main() in C:DropboxAL DBDropboxAvivaOrder ProjectAviva Order SystemsProgram.cs:line 18
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

"


This section of the code is what is being highlight when i attempt to debug the error.



 Sheet newSheet = ssproj.FolderResources.SheetResources.CreateSheet(
#####, // long folderId
new Sheet

Name = "OrderProfile",
Columns = new Column CCnum, CCName, Project, Supplier, SEQ

);

Note i have changed the #### on purpose. It is giving the error here:
Sheet newSheet = ssproj.FolderResources.SheetResources.CreateSheet(
#####, // long folderId
new Sheet

Name = "OrderProfile",
Columns = new Column CCnum, CCName, Project, Supplier, SEQ

);


Any ideas on what is causing this? I have tried searching










share|improve this question

























    up vote
    1
    down vote

    favorite












    I am creating a new sheet in Smartsheet via the API in Visual Studio 2015 C#.

    I have followed the code/API Guide from Smartsheet but i get an error at run time when the code fires.



    The error is as follows:



    Smartsheet.Api.ResourceNotFoundException was unhandled
    HResult=-2146233088
    Message=Not Found
    Source=smartsheet-csharp-sdk
    StackTrace:
    at Smartsheet.Api.Internal.AbstractResources.HandleError(HttpResponse response)
    at Smartsheet.Api.Internal.AbstractResources.CreateResource[T](String path, Type objectClass, T object)
    at Smartsheet.Api.Internal.FolderSheetResourcesImpl.CreateSheet(Int64 folderId, Sheet sheet)
    at Aviva_Order_Systems.avivaorders.button1_Click(Object sender, EventArgs e) in C:DropboxAL DBDropboxAvivaOrder ProjectAviva Order Systemsavivaorders.cs:line 372
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.Run(Form mainForm)
    at Aviva_Order_Systems.Program.Main() in C:DropboxAL DBDropboxAvivaOrder ProjectAviva Order SystemsProgram.cs:line 18
    at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String args)
    at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String args)
    at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()
    InnerException:

    "


    This section of the code is what is being highlight when i attempt to debug the error.



     Sheet newSheet = ssproj.FolderResources.SheetResources.CreateSheet(
    #####, // long folderId
    new Sheet

    Name = "OrderProfile",
    Columns = new Column CCnum, CCName, Project, Supplier, SEQ

    );

    Note i have changed the #### on purpose. It is giving the error here:
    Sheet newSheet = ssproj.FolderResources.SheetResources.CreateSheet(
    #####, // long folderId
    new Sheet

    Name = "OrderProfile",
    Columns = new Column CCnum, CCName, Project, Supplier, SEQ

    );


    Any ideas on what is causing this? I have tried searching










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I am creating a new sheet in Smartsheet via the API in Visual Studio 2015 C#.

      I have followed the code/API Guide from Smartsheet but i get an error at run time when the code fires.



      The error is as follows:



      Smartsheet.Api.ResourceNotFoundException was unhandled
      HResult=-2146233088
      Message=Not Found
      Source=smartsheet-csharp-sdk
      StackTrace:
      at Smartsheet.Api.Internal.AbstractResources.HandleError(HttpResponse response)
      at Smartsheet.Api.Internal.AbstractResources.CreateResource[T](String path, Type objectClass, T object)
      at Smartsheet.Api.Internal.FolderSheetResourcesImpl.CreateSheet(Int64 folderId, Sheet sheet)
      at Aviva_Order_Systems.avivaorders.button1_Click(Object sender, EventArgs e) in C:DropboxAL DBDropboxAvivaOrder ProjectAviva Order Systemsavivaorders.cs:line 372
      at System.Windows.Forms.Control.OnClick(EventArgs e)
      at System.Windows.Forms.Button.OnClick(EventArgs e)
      at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
      at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
      at System.Windows.Forms.Control.WndProc(Message& m)
      at System.Windows.Forms.ButtonBase.WndProc(Message& m)
      at System.Windows.Forms.Button.WndProc(Message& m)
      at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
      at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
      at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
      at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
      at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
      at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
      at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
      at System.Windows.Forms.Application.Run(Form mainForm)
      at Aviva_Order_Systems.Program.Main() in C:DropboxAL DBDropboxAvivaOrder ProjectAviva Order SystemsProgram.cs:line 18
      at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String args)
      at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String args)
      at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
      at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
      at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
      at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
      at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
      at System.Threading.ThreadHelper.ThreadStart()
      InnerException:

      "


      This section of the code is what is being highlight when i attempt to debug the error.



       Sheet newSheet = ssproj.FolderResources.SheetResources.CreateSheet(
      #####, // long folderId
      new Sheet

      Name = "OrderProfile",
      Columns = new Column CCnum, CCName, Project, Supplier, SEQ

      );

      Note i have changed the #### on purpose. It is giving the error here:
      Sheet newSheet = ssproj.FolderResources.SheetResources.CreateSheet(
      #####, // long folderId
      new Sheet

      Name = "OrderProfile",
      Columns = new Column CCnum, CCName, Project, Supplier, SEQ

      );


      Any ideas on what is causing this? I have tried searching










      share|improve this question













      I am creating a new sheet in Smartsheet via the API in Visual Studio 2015 C#.

      I have followed the code/API Guide from Smartsheet but i get an error at run time when the code fires.



      The error is as follows:



      Smartsheet.Api.ResourceNotFoundException was unhandled
      HResult=-2146233088
      Message=Not Found
      Source=smartsheet-csharp-sdk
      StackTrace:
      at Smartsheet.Api.Internal.AbstractResources.HandleError(HttpResponse response)
      at Smartsheet.Api.Internal.AbstractResources.CreateResource[T](String path, Type objectClass, T object)
      at Smartsheet.Api.Internal.FolderSheetResourcesImpl.CreateSheet(Int64 folderId, Sheet sheet)
      at Aviva_Order_Systems.avivaorders.button1_Click(Object sender, EventArgs e) in C:DropboxAL DBDropboxAvivaOrder ProjectAviva Order Systemsavivaorders.cs:line 372
      at System.Windows.Forms.Control.OnClick(EventArgs e)
      at System.Windows.Forms.Button.OnClick(EventArgs e)
      at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
      at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
      at System.Windows.Forms.Control.WndProc(Message& m)
      at System.Windows.Forms.ButtonBase.WndProc(Message& m)
      at System.Windows.Forms.Button.WndProc(Message& m)
      at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
      at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
      at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
      at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
      at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
      at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
      at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
      at System.Windows.Forms.Application.Run(Form mainForm)
      at Aviva_Order_Systems.Program.Main() in C:DropboxAL DBDropboxAvivaOrder ProjectAviva Order SystemsProgram.cs:line 18
      at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String args)
      at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String args)
      at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
      at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
      at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
      at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
      at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
      at System.Threading.ThreadHelper.ThreadStart()
      InnerException:

      "


      This section of the code is what is being highlight when i attempt to debug the error.



       Sheet newSheet = ssproj.FolderResources.SheetResources.CreateSheet(
      #####, // long folderId
      new Sheet

      Name = "OrderProfile",
      Columns = new Column CCnum, CCName, Project, Supplier, SEQ

      );

      Note i have changed the #### on purpose. It is giving the error here:
      Sheet newSheet = ssproj.FolderResources.SheetResources.CreateSheet(
      #####, // long folderId
      new Sheet

      Name = "OrderProfile",
      Columns = new Column CCnum, CCName, Project, Supplier, SEQ

      );


      Any ideas on what is causing this? I have tried searching







      c# visual-studio-2015 smartsheet-api






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 10 at 23:40









      Andrew Little

      64




      64






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote













          Looks like you're trying to create the sheet in the specified folder. Based on the error you're getting, I'd suspect that the folder ID that you're specifying isn't valid.



          To troubleshoot, you can verify whether the folder ID is valid by trying to execute a Get Folder request with that ID. If the ID is valid, the Get Folder request will succeed; if it's invalid, the request will fail. The following C# code example attempts to retrieve folder with ID = 7116448184199044.



          Folder folder = smartsheet.FolderResources.GetFolder(
          7116448184199044, // long folderId
          null // IEnumerable<FolderInclusion> include
          );


          UPDATE (in response to your comment)



          • If you want to create the sheet in a folder and that folder happens to be located within a shared workspace, the API call you're using (Create Sheet in Folder) should work. If you're getting the "resource not found" error in response to this API request, then either the folder ID you're specifying is invalid OR the account that owns the API access token you're using to issue the API request doesn't have access to that folder/workspace. As described previously, you can verify that the folder ID is valid (and that the account that owns the API access token does have access to the folder) by confirming that you're able to successfully issue a Get Folder API request for that folder.


          • If you want to create the sheet at the root of the shared workspace (i.e., not inside a folder, but rather, at the root level of the workspace), you'll need to use the Create Sheet in Workspace API request to do so (specifying the ID of the workspace). The account that owns the API access token used to issue the API request must have access to the workspace in order for this call to succeed.






          share|improve this answer






















          • I just looked at the structure in postman and the folder i am trying to create to is a shared workspace. Does that make any difference?
            – Andrew Little
            Nov 11 at 20:50










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53244507%2fsmartsheet-api-resourcenotfooundexception-creating-new-sheet%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote













          Looks like you're trying to create the sheet in the specified folder. Based on the error you're getting, I'd suspect that the folder ID that you're specifying isn't valid.



          To troubleshoot, you can verify whether the folder ID is valid by trying to execute a Get Folder request with that ID. If the ID is valid, the Get Folder request will succeed; if it's invalid, the request will fail. The following C# code example attempts to retrieve folder with ID = 7116448184199044.



          Folder folder = smartsheet.FolderResources.GetFolder(
          7116448184199044, // long folderId
          null // IEnumerable<FolderInclusion> include
          );


          UPDATE (in response to your comment)



          • If you want to create the sheet in a folder and that folder happens to be located within a shared workspace, the API call you're using (Create Sheet in Folder) should work. If you're getting the "resource not found" error in response to this API request, then either the folder ID you're specifying is invalid OR the account that owns the API access token you're using to issue the API request doesn't have access to that folder/workspace. As described previously, you can verify that the folder ID is valid (and that the account that owns the API access token does have access to the folder) by confirming that you're able to successfully issue a Get Folder API request for that folder.


          • If you want to create the sheet at the root of the shared workspace (i.e., not inside a folder, but rather, at the root level of the workspace), you'll need to use the Create Sheet in Workspace API request to do so (specifying the ID of the workspace). The account that owns the API access token used to issue the API request must have access to the workspace in order for this call to succeed.






          share|improve this answer






















          • I just looked at the structure in postman and the folder i am trying to create to is a shared workspace. Does that make any difference?
            – Andrew Little
            Nov 11 at 20:50














          up vote
          2
          down vote













          Looks like you're trying to create the sheet in the specified folder. Based on the error you're getting, I'd suspect that the folder ID that you're specifying isn't valid.



          To troubleshoot, you can verify whether the folder ID is valid by trying to execute a Get Folder request with that ID. If the ID is valid, the Get Folder request will succeed; if it's invalid, the request will fail. The following C# code example attempts to retrieve folder with ID = 7116448184199044.



          Folder folder = smartsheet.FolderResources.GetFolder(
          7116448184199044, // long folderId
          null // IEnumerable<FolderInclusion> include
          );


          UPDATE (in response to your comment)



          • If you want to create the sheet in a folder and that folder happens to be located within a shared workspace, the API call you're using (Create Sheet in Folder) should work. If you're getting the "resource not found" error in response to this API request, then either the folder ID you're specifying is invalid OR the account that owns the API access token you're using to issue the API request doesn't have access to that folder/workspace. As described previously, you can verify that the folder ID is valid (and that the account that owns the API access token does have access to the folder) by confirming that you're able to successfully issue a Get Folder API request for that folder.


          • If you want to create the sheet at the root of the shared workspace (i.e., not inside a folder, but rather, at the root level of the workspace), you'll need to use the Create Sheet in Workspace API request to do so (specifying the ID of the workspace). The account that owns the API access token used to issue the API request must have access to the workspace in order for this call to succeed.






          share|improve this answer






















          • I just looked at the structure in postman and the folder i am trying to create to is a shared workspace. Does that make any difference?
            – Andrew Little
            Nov 11 at 20:50












          up vote
          2
          down vote










          up vote
          2
          down vote









          Looks like you're trying to create the sheet in the specified folder. Based on the error you're getting, I'd suspect that the folder ID that you're specifying isn't valid.



          To troubleshoot, you can verify whether the folder ID is valid by trying to execute a Get Folder request with that ID. If the ID is valid, the Get Folder request will succeed; if it's invalid, the request will fail. The following C# code example attempts to retrieve folder with ID = 7116448184199044.



          Folder folder = smartsheet.FolderResources.GetFolder(
          7116448184199044, // long folderId
          null // IEnumerable<FolderInclusion> include
          );


          UPDATE (in response to your comment)



          • If you want to create the sheet in a folder and that folder happens to be located within a shared workspace, the API call you're using (Create Sheet in Folder) should work. If you're getting the "resource not found" error in response to this API request, then either the folder ID you're specifying is invalid OR the account that owns the API access token you're using to issue the API request doesn't have access to that folder/workspace. As described previously, you can verify that the folder ID is valid (and that the account that owns the API access token does have access to the folder) by confirming that you're able to successfully issue a Get Folder API request for that folder.


          • If you want to create the sheet at the root of the shared workspace (i.e., not inside a folder, but rather, at the root level of the workspace), you'll need to use the Create Sheet in Workspace API request to do so (specifying the ID of the workspace). The account that owns the API access token used to issue the API request must have access to the workspace in order for this call to succeed.






          share|improve this answer














          Looks like you're trying to create the sheet in the specified folder. Based on the error you're getting, I'd suspect that the folder ID that you're specifying isn't valid.



          To troubleshoot, you can verify whether the folder ID is valid by trying to execute a Get Folder request with that ID. If the ID is valid, the Get Folder request will succeed; if it's invalid, the request will fail. The following C# code example attempts to retrieve folder with ID = 7116448184199044.



          Folder folder = smartsheet.FolderResources.GetFolder(
          7116448184199044, // long folderId
          null // IEnumerable<FolderInclusion> include
          );


          UPDATE (in response to your comment)



          • If you want to create the sheet in a folder and that folder happens to be located within a shared workspace, the API call you're using (Create Sheet in Folder) should work. If you're getting the "resource not found" error in response to this API request, then either the folder ID you're specifying is invalid OR the account that owns the API access token you're using to issue the API request doesn't have access to that folder/workspace. As described previously, you can verify that the folder ID is valid (and that the account that owns the API access token does have access to the folder) by confirming that you're able to successfully issue a Get Folder API request for that folder.


          • If you want to create the sheet at the root of the shared workspace (i.e., not inside a folder, but rather, at the root level of the workspace), you'll need to use the Create Sheet in Workspace API request to do so (specifying the ID of the workspace). The account that owns the API access token used to issue the API request must have access to the workspace in order for this call to succeed.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 12 at 1:31

























          answered Nov 11 at 15:42









          Kim Brandl

          10k21014




          10k21014











          • I just looked at the structure in postman and the folder i am trying to create to is a shared workspace. Does that make any difference?
            – Andrew Little
            Nov 11 at 20:50
















          • I just looked at the structure in postman and the folder i am trying to create to is a shared workspace. Does that make any difference?
            – Andrew Little
            Nov 11 at 20:50















          I just looked at the structure in postman and the folder i am trying to create to is a shared workspace. Does that make any difference?
          – Andrew Little
          Nov 11 at 20:50




          I just looked at the structure in postman and the folder i am trying to create to is a shared workspace. Does that make any difference?
          – Andrew Little
          Nov 11 at 20:50

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53244507%2fsmartsheet-api-resourcenotfooundexception-creating-new-sheet%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          How to read a connectionString WITH PROVIDER in .NET Core?

          Node.js Script on GitHub Pages or Amazon S3

          Museum of Modern and Contemporary Art of Trento and Rovereto