<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: POST: Workspace Item using restapi in C#.net 500-Internal Server Error in Fusion Manage Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6622240#M4287</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible that you are missing the login phase in your code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your C# application, you first need to authenticate to get a sessionid.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems consistent with the findings from Tony in the logs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can have a look at the&amp;nbsp;&lt;A title="Login and Authentication" href="http://help.autodesk.com/view/PLM/ENU/?guid=GUID-7377F127-97E2-4EC3-B117-BD18A4F61D6D" target="_blank"&gt;Login and Authentication&lt;/A&gt;&amp;nbsp;documentation that will give you the information you need to the endpoint and payload required to first login to the system, get the sessionid and after that add to&amp;nbsp;your request header the cookie information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a small extract of the documentation :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 class="title sectiontitle"&gt;&lt;EM&gt;Request header&lt;/EM&gt;&lt;/H3&gt;
&lt;P class="p"&gt;&lt;EM&gt;To authenticate each request sent to the server after initial login, send the following in the header of the request:&lt;/EM&gt;&lt;/P&gt;
&lt;P class="p"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="pre codeblock prettyprint prettyprinted"&gt;&lt;EM&gt;&lt;SPAN class="typ"&gt;Cookie&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; customer&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=[&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;CUSTOMERTOKEN&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;];&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;JSESSIONID&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;sessionid&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;]&lt;/SPAN&gt;&lt;/EM&gt;&lt;/PRE&gt;
&lt;P class="p"&gt;&lt;EM&gt;Replace &lt;SAMP id="GUID-7377F127-97E2-4EC3-B117-BD18A4F61D6D__GUID-919D92B8-A40D-40BA-A1A9-715E85B51D23" class="ph codeph"&gt;[CUSTOMERTOKEN]&lt;/SAMP&gt; and &lt;SAMP id="GUID-7377F127-97E2-4EC3-B117-BD18A4F61D6D__GUID-29E88435-A647-45BE-B13A-A0CA43392C71" class="ph codeph"&gt;[sessionid]&lt;/SAMP&gt; respectively with the &lt;SAMP id="GUID-7377F127-97E2-4EC3-B117-BD18A4F61D6D__GUID-60121A62-2943-4EB4-8F14-4E0B3C7E9379" class="ph codeph"&gt;sessionid&lt;/SAMP&gt; and &lt;SAMP id="GUID-7377F127-97E2-4EC3-B117-BD18A4F61D6D__GUID-8F9F5070-685F-4690-9189-BBB218D30511" class="ph codeph"&gt;customerToken&lt;/SAMP&gt; values captured from the POST Login response.&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Oct 2016 09:11:52 GMT</pubDate>
    <dc:creator>dany.poudrier</dc:creator>
    <dc:date>2016-10-14T09:11:52Z</dc:date>
    <item>
      <title>POST: Workspace Item using restapi in C#.net 500-Internal Server Error</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6615760#M4278</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using RestAPi to post items under workspace from Sql Server database.&lt;/P&gt;&lt;P&gt;I am using the same format explained in the documentation. But whenever I use POST method I am getting 500-Internal Server Error.&lt;/P&gt;&lt;P&gt;I even tried to test this API&amp;nbsp;in postman also. But getting the same 500-internal server error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to read the data using GET .But POST is not working.&lt;/P&gt;&lt;P&gt;Do I need to have more permissions to POST items?&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have any example please post.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2016 18:44:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6615760#M4278</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-11T18:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: POST: Workspace Item using restapi in C#.net 500-Internal Server Error</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6616520#M4279</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't mind giving us more details, like the json content and perhaps a screenshot of your postman config, it would greatly help in analyzing your issue.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2016 01:42:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6616520#M4279</guid>
      <dc:creator>dany.poudrier</dc:creator>
      <dc:date>2016-10-12T01:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: POST: Workspace Item using restapi in C#.net 500-Internal Server Error</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6617322#M4280</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the response. Please find the attached postman screenshot. Also below is the code. I am using C#.net and i'm not using Json format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;public XmlDocument POSTWorksapcesitems()&lt;BR /&gt;{&lt;BR /&gt;if (!_loggedIN) { return null; }&lt;/P&gt;&lt;P&gt;XmlDocument xmlDoc = new XmlDocument();&lt;BR /&gt;Properties obj = new Properties();&lt;BR /&gt;List&amp;lt;items&amp;gt; itemlist = new List&amp;lt;items&amp;gt;();&lt;BR /&gt;items new1 = new items();&lt;BR /&gt;new1.key = "BRAND";&lt;BR /&gt;new1.value = "TEST";&lt;BR /&gt;itemlist.Add(new1);&lt;/P&gt;&lt;P&gt;metafields meta = new metafields();&lt;BR /&gt;meta.itemsobj = itemlist;&lt;/P&gt;&lt;P&gt;List&amp;lt;metafields&amp;gt; metaobj = new List&amp;lt;metafields&amp;gt;();&lt;/P&gt;&lt;P&gt;metaobj.Add(new metafields() { itemsobj = itemlist });&lt;BR /&gt;//{"key":"BRAND","fieldData":{"value":"N/A","formattedValue":"N/A","dataType":"Single Line Text"}&lt;BR /&gt;//{"key":"BRAND","fieldData":{"value":"Adidas","formattedValue":"Adidas","dataType":"Single Line Text"}&lt;BR /&gt;string RequestUri = _tenantURI + "api/rest/v1/workspaces/54/items";&lt;BR /&gt;HttpClient client = new HttpClient();&lt;BR /&gt;client.BaseAddress = new Uri(RequestUri);&lt;BR /&gt;client.DefaultRequestHeaders.Accept.Clear();&lt;BR /&gt;client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/xml"));&lt;BR /&gt;HttpResponseMessage response = client.PostAsJsonAsync(RequestUri, metaobj).Result;&lt;BR /&gt;HttpWebRequest request = getHTTPRequest(_tenantURI + "api/rest/v1/workspaces/54/items.xml", "GET");&lt;BR /&gt;// HttpWebRequest request = getHTTPRequest(_tenantURI + "api/rest/v1/workspaces/11/items", "Post");&lt;BR /&gt;request.Headers.Add(HttpRequestHeader.Cookie, _authCookie);&lt;BR /&gt;HttpWebResponse response1 = (HttpWebResponse)request.GetResponse();&lt;BR /&gt;using (XmlReader reader = XmlReader.Create(response1.GetResponseStream(), new XmlReaderSettings() { CloseInput = true }))&lt;BR /&gt;{&lt;BR /&gt;xmlDoc.Load(reader);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return xmlDoc;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;private HttpWebResponse post(string uri, string payload)&lt;BR /&gt;{&lt;BR /&gt;XmlDocument doc = new XmlDocument();&lt;BR /&gt;HttpWebRequest request = getHTTPRequest(uri, "POST");&lt;BR /&gt;request.Headers.Add(HttpRequestHeader.Cookie, _authCookie);&lt;/P&gt;&lt;P&gt;UTF8Encoding encoding = new UTF8Encoding();&lt;BR /&gt;request.ContentLength = encoding.GetByteCount(payload);&lt;BR /&gt;request.ContentType = "application/xml";&lt;/P&gt;&lt;P&gt;using (Stream reqStream = request.GetRequestStream())&lt;BR /&gt;{&lt;BR /&gt;reqStream.Write(encoding.GetBytes(payload), 0, encoding.GetByteCount(payload));&lt;BR /&gt;}&lt;BR /&gt;HttpWebResponse response = (HttpWebResponse)request.GetResponse();&lt;/P&gt;&lt;P&gt;return response;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;private HttpWebRequest getHTTPRequest(string uri, string method)&lt;BR /&gt;{&lt;BR /&gt;HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);&lt;BR /&gt;request.Method = method;&lt;BR /&gt;request.Accept = "application/xml";&lt;/P&gt;&lt;P&gt;return request;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;public class itemInsert&lt;BR /&gt;{&lt;BR /&gt;public string ContentType { get; set; }&lt;BR /&gt;public string Author { get; set; }&lt;BR /&gt;public string id { get; set; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;public class Properties&lt;BR /&gt;{&lt;BR /&gt;public List&amp;lt;metafields&amp;gt; prop { get; set; }&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;public class metafields&lt;BR /&gt;{&lt;BR /&gt;public List&amp;lt;items&amp;gt; itemsobj { get; set; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;public class items&lt;BR /&gt;{&lt;BR /&gt;public string key { get; set; }&lt;BR /&gt;public string value { get; set; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2016 12:32:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6617322#M4280</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-12T12:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: POST: Workspace Item using restapi in C#.net 500-Internal Server Error</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6619584#M4281</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the information. I will try to see if I can replicate your issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the screenshot of postman, I would require the query information, not the result from the server. My goal is to abstract the C# part of your question and make sure that the arguments and headers are correct...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So if you could send this info I will be able to help you. Make sure I don't see any passwords in your screenshots &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 08:44:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6619584#M4281</guid>
      <dc:creator>dany.poudrier</dc:creator>
      <dc:date>2016-10-13T08:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: POST: Workspace Item using restapi in C#.net 500-Internal Server Error</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6619604#M4282</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I stumbled into something interesting, don't know if it is related but it seems to fit the case:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have V1 apis and V2 apis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;V1 API url are&amp;nbsp;/api/&lt;STRONG&gt;rest/v1&lt;/STRONG&gt;/workspaces/54/items&lt;/P&gt;
&lt;P&gt;V2 API url are&amp;nbsp;/api/&lt;STRONG&gt;v2&lt;/STRONG&gt;/workspaces/54/items&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On your screenshot you have /api/&lt;STRONG&gt;rest/v2&lt;/STRONG&gt;/workspaces/54/items . &amp;nbsp;The syntax is not correct as you either have a /rest/ too much or a typo to use v1 instead of v2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From your code you are using v1 APIs, so I suggest you try again postman with the right url (&lt;STRONG&gt;/rest/v1/&lt;/STRONG&gt;) and see if you can get postman request to work.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 08:57:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6619604#M4282</guid>
      <dc:creator>dany.poudrier</dc:creator>
      <dc:date>2016-10-13T08:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: POST: Workspace Item using restapi in C#.net 500-Internal Server Error</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6619638#M4283</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just tested with a similar setup with postman and got a 201 (Item created).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See example below. &amp;nbsp;It think from your code example you may have missed the metaFields json property when doing your query...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="response.png" style="width: 381px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/281509i700E3EBD911D59B4/image-size/large?v=v2&amp;amp;px=999" role="button" title="response.png" alt="response.png" /&gt;&lt;/span&gt;﻿&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 09:13:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6619638#M4283</guid>
      <dc:creator>dany.poudrier</dc:creator>
      <dc:date>2016-10-13T09:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: POST: Workspace Item using restapi in C#.net 500-Internal Server Error</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6621412#M4284</link>
      <description>&lt;P&gt;Sorry,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tested v1 which is not working and then I tested v2. Please find the attached screenshot.I am still getting the same error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Suneetha&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 20:53:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6621412#M4284</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-13T20:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: POST: Workspace Item using restapi in C#.net 500-Internal Server Error</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6621814#M4285</link>
      <description>&lt;P&gt;I took a look at the server logs and here is what i see.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR - Rest Error on /api/rest/v1/workspaces/54/items\ncom.dms.customer.CustomerTransactionException: Error executing customer transaction [customer: BOATECHNOLOGY]\n\tat com.dms.customer.CustomerTransactionRunner.execute(CustomerTransactionRunner.ja...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Caused by: com.dms.api.rest2.common.APIException: The request contains no authorization information.&lt;BR /&gt; at com.dms.servletFilter.APIAuthorizationFilter.doFilter(APIAuthorizationFilter.java:61)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE class="table table-bordered table-condensed table-details ng-scope"&gt;
&lt;TBODY&gt;
&lt;TR class="ng-scope"&gt;
&lt;TD style="-ms-word-wrap: break-word;"&gt;@timestamp&lt;/TD&gt;
&lt;TD style="white-space: nowrap;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD style="white-space: pre-wrap; -ms-word-wrap: break-word;"&gt;2016-10-13T21:56:56.985Z&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I think the issue is related to the way you are authenticating.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We usually do a login request in a separate tab.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 01:01:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6621814#M4285</guid>
      <dc:creator>tony.mandatori</dc:creator>
      <dc:date>2016-10-14T01:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: POST: Workspace Item using restapi in C#.net 500-Internal Server Error</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6621922#M4286</link>
      <description>&lt;P&gt;I do not have any issue when I run the api in the browser and I got the data also.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am trying to POST data using C#.net and&amp;nbsp;&amp;nbsp;getting 500 Internal Server Error.&lt;/P&gt;&lt;P&gt;Same error I am getting in POSTMAN also. Attached is the screen shot and I sent the c#.net code already.&lt;/P&gt;&lt;P&gt;If you can send us the sample code that would be great helpful.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 03:52:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6621922#M4286</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-14T03:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: POST: Workspace Item using restapi in C#.net 500-Internal Server Error</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6622240#M4287</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible that you are missing the login phase in your code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your C# application, you first need to authenticate to get a sessionid.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems consistent with the findings from Tony in the logs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can have a look at the&amp;nbsp;&lt;A title="Login and Authentication" href="http://help.autodesk.com/view/PLM/ENU/?guid=GUID-7377F127-97E2-4EC3-B117-BD18A4F61D6D" target="_blank"&gt;Login and Authentication&lt;/A&gt;&amp;nbsp;documentation that will give you the information you need to the endpoint and payload required to first login to the system, get the sessionid and after that add to&amp;nbsp;your request header the cookie information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a small extract of the documentation :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 class="title sectiontitle"&gt;&lt;EM&gt;Request header&lt;/EM&gt;&lt;/H3&gt;
&lt;P class="p"&gt;&lt;EM&gt;To authenticate each request sent to the server after initial login, send the following in the header of the request:&lt;/EM&gt;&lt;/P&gt;
&lt;P class="p"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="pre codeblock prettyprint prettyprinted"&gt;&lt;EM&gt;&lt;SPAN class="typ"&gt;Cookie&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; customer&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=[&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;CUSTOMERTOKEN&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;];&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;JSESSIONID&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;sessionid&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;]&lt;/SPAN&gt;&lt;/EM&gt;&lt;/PRE&gt;
&lt;P class="p"&gt;&lt;EM&gt;Replace &lt;SAMP id="GUID-7377F127-97E2-4EC3-B117-BD18A4F61D6D__GUID-919D92B8-A40D-40BA-A1A9-715E85B51D23" class="ph codeph"&gt;[CUSTOMERTOKEN]&lt;/SAMP&gt; and &lt;SAMP id="GUID-7377F127-97E2-4EC3-B117-BD18A4F61D6D__GUID-29E88435-A647-45BE-B13A-A0CA43392C71" class="ph codeph"&gt;[sessionid]&lt;/SAMP&gt; respectively with the &lt;SAMP id="GUID-7377F127-97E2-4EC3-B117-BD18A4F61D6D__GUID-60121A62-2943-4EB4-8F14-4E0B3C7E9379" class="ph codeph"&gt;sessionid&lt;/SAMP&gt; and &lt;SAMP id="GUID-7377F127-97E2-4EC3-B117-BD18A4F61D6D__GUID-8F9F5070-685F-4690-9189-BBB218D30511" class="ph codeph"&gt;customerToken&lt;/SAMP&gt; values captured from the POST Login response.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 09:11:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6622240#M4287</guid>
      <dc:creator>dany.poudrier</dc:creator>
      <dc:date>2016-10-14T09:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: POST: Workspace Item using restapi in C#.net 500-Internal Server Error</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6622622#M4288</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I mentioned in the first email I do not have any &amp;nbsp;issues to login and GET the data. I am getting error when POSTing the data only.In the previous email I sent only POST method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Suneetha&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 12:25:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6622622#M4288</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-14T12:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: POST: Workspace Item using restapi in C#.net 500-Internal Server Error</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6622655#M4289</link>
      <description>&lt;P&gt;In C#,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code needs to retrieve and reuse the sessionid that is obtained when logging in - here are some snippets (not other libraries are being used here, so the code might not work as is for you: but the methods are standard).&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000" face="Consolas" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;var&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; response = client.PostAsJsonAsync(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;"rest/auth/1/login.json"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;, pbody).Result;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;if&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; (response.IsSuccessStatusCode)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;var&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; content = response.Content.ReadAsStringAsync().Result;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;dynamic&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; elem = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;JsonConvert&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;.DeserializeObject(content);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;return&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; elem.sessionid;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then when sending the request, we need to set the cookie:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;HttpClientHandler&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; handler = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;new&lt;/FONT&gt; &lt;FONT color="#2b91af" face="Consolas" size="2"&gt;HttpClientHandler&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;()&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; CookieContainer = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;CookieContainer&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;()&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;};&lt;/P&gt;
&lt;P&gt;　&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; handler.CookieContainer.Add(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;Uri&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(url), &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;Cookie&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;"JSESSIONID"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;, sessionid));&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;using&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; (&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;var&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; client = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;new&lt;/FONT&gt; &lt;FONT color="#2b91af" face="Consolas" size="2"&gt;HttpClient&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;(handler))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; client.BaseAddress = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;Uri&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(url);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; client.DefaultRequestHeaders.Accept.Add(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;MediaTypeWithQualityHeaderValue&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;"application/json"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;));&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;&lt;FONT color="#2b91af" face="Consolas" size="2"&gt;HttpResponseMessage&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; response =&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; client.PostAsJsonAsync(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;"api/rest/v1/workspaces/"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; + wsid + &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;"/items/"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; + parent + &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;&lt;FONT color="#a31515" face="Consolas" size="2"&gt;"/boms"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;, tobj).Result;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;....&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;Note: I didn't write this code, but this is what I typically see.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 12:42:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6622655#M4289</guid>
      <dc:creator>tony.mandatori</dc:creator>
      <dc:date>2016-10-14T12:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: POST: Workspace Item using restapi in C#.net 500-Internal Server Error</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6623659#M4290</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below are my steps.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the login code as below.&lt;/P&gt;&lt;P&gt;After the below step i wrote a class to POST data.&lt;/P&gt;&lt;P&gt;public bool login(string userName, string password)&lt;BR /&gt;{&lt;BR /&gt;string tenantURIinput = _tenantURI + "rest/auth/1/login.xml";&lt;BR /&gt;string payload = String.Format("&amp;lt;authCommand&amp;gt;&amp;lt;userID&amp;gt;{0}&amp;lt;/userID&amp;gt;&amp;lt;password&amp;gt;{1}&amp;lt;/password&amp;gt;&amp;lt;/authCommand&amp;gt;", userName, password);&lt;/P&gt;&lt;P&gt;HttpWebResponse response = post(tenantURIinput, payload);&lt;/P&gt;&lt;P&gt;XmlDocument xmlDoc = new XmlDocument();&lt;/P&gt;&lt;P&gt;using (XmlReader reader = XmlReader.Create(response.GetResponseStream(), new XmlReaderSettings() { CloseInput = true }))&lt;BR /&gt;{&lt;BR /&gt;xmlDoc.Load(reader);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if (xmlDoc.DocumentElement.SelectSingleNode("/userAuthInfo/authStatus/id").InnerText == "200")&lt;BR /&gt;{&lt;BR /&gt;_authCookie = response.Headers["Set-Cookie"];&lt;BR /&gt;_loggedIN = true;&lt;BR /&gt;return true;&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;_authCookie = "";&lt;BR /&gt;_loggedIN = false;&lt;BR /&gt;return false;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;&lt;STRONG&gt;Also below is my requirement.If you can suggest how to achieve this that would be great helpful for us.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;&lt;STRONG&gt;We have a&amp;nbsp;share point&amp;nbsp;list and we would like to create a concurrent process to load sharepoint list to PLM workspace.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;&lt;STRONG&gt;right now I am planning to create a ssis package to load sharepoint list in to sql server table,and then from sql table to Workspace using C#.net.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;&lt;STRONG&gt;But if you have any other solutions please do let me know.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;&lt;STRONG&gt;Please suggest the best way. &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Suneetha&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 19:31:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6623659#M4290</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-14T19:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: POST: Workspace Item using restapi in C#.net 500-Internal Server Error</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6624386#M4291</link>
      <description>&lt;P&gt;Thanks for responding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code you provided above looks a little different.&amp;nbsp; I think we need to be careful on the format of the headers that are supplied.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see that the code provide is using the following:&lt;/P&gt;
&lt;P&gt;request.Headers.Add(HttpRequestHeader.Cookie, _authCookie);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, could you print out _authCookie and ensure that it is formatted properly?&amp;nbsp; The code that&amp;nbsp;I have looks for an element called sessionid and then builds a string with a prefix of JSESSIONID:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Sat, 15 Oct 2016 14:31:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6624386#M4291</guid>
      <dc:creator>tony.mandatori</dc:creator>
      <dc:date>2016-10-15T14:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: POST: Workspace Item using restapi in C#.net 500-Internal Server Error</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6625801#M4292</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply and I am able to create items using api.&lt;/P&gt;&lt;P&gt;Below is my code. After successfully logged in I am able to create the item.But If I have the json string like below(redcolor font) I am getting again 500 Internal server error. Can you please send me the format.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;public bool login(string userName, string password)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;string tenantURIinput = _tenantURI + "rest/auth/1/login.xml";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;string payload = String.Format("&amp;lt;authCommand&amp;gt;&amp;lt;userID&amp;gt;{0}&amp;lt;/userID&amp;gt;&amp;lt;password&amp;gt;{1}&amp;lt;/password&amp;gt;&amp;lt;/authCommand&amp;gt;", userName, password);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;HttpWebResponse response = post(tenantURIinput, payload);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;XmlDocument xmlDoc = new XmlDocument();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;using (XmlReader reader = XmlReader.Create(response.GetResponseStream(), new XmlReaderSettings() { CloseInput = true }))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;xmlDoc.Load(reader);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;if (xmlDoc.DocumentElement.SelectSingleNode("/userAuthInfo/authStatus/id").InnerText == "200")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;_authCookie = response.Headers["Set-Cookie"];&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;_loggedIN = true;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;string RequestUri = _tenantURI + "api/rest/v1/workspaces/54/items";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;var httpWebRequest = (HttpWebRequest)WebRequest.Create(RequestUri);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;httpWebRequest.Headers.Add(HttpRequestHeader.Cookie, _authCookie);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;httpWebRequest.ContentType = "application/json";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;httpWebRequest.Method = "POST";&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;{&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;string json = @"{ &lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;'metaFields':{ &lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;'entry': [ &lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;{'key':'TYPE','value':'B-Temia'},&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;{'key':'QA_COMMENTS','value':'Testing by Suneetha'}]&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;} }";&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;streamWriter.Write(json.Replace("'","""));&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;streamWriter.Flush();&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;streamWriter.Close();&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;var result = streamReader.ReadToEnd();&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;return true;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;else&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;_authCookie = "";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;_loggedIN = false;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;return false;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 01:01:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6625801#M4292</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-17T01:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: POST: Workspace Item using restapi in C#.net 500-Internal Server Error</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6659198#M4293</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to use double quotes when writing json, it is the standard. &amp;nbsp;Single quote is not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the &lt;A href="http://www.json.org" target="_blank"&gt;www.json.org&lt;/A&gt;&amp;nbsp;standard:&amp;nbsp;&lt;SPAN&gt;"A &lt;/SPAN&gt;&lt;I&gt;value&lt;/I&gt;&lt;SPAN&gt; can be a &lt;/SPAN&gt;&lt;I&gt;string&lt;/I&gt;&lt;SPAN&gt; in double quotes, or a &lt;/SPAN&gt;&lt;I&gt;number&lt;/I&gt;&lt;SPAN&gt;, or &lt;/SPAN&gt;&lt;TT&gt;true&lt;/TT&gt;&lt;SPAN&gt; or &lt;/SPAN&gt;&lt;TT&gt;false&lt;/TT&gt;&lt;SPAN&gt; or &lt;/SPAN&gt;&lt;TT&gt;null&lt;/TT&gt;&lt;SPAN&gt;, or an &lt;/SPAN&gt;&lt;I&gt;object&lt;/I&gt;&lt;SPAN&gt; or an &lt;/SPAN&gt;&lt;I&gt;array&lt;/I&gt;&lt;SPAN&gt;. These structures can be nested."&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So make sure your end results looks like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;{ 
	"metaFields":{ 
		"entry": [ 
				{"key":"TYPE","value":"B-Temia"},
				{"key":"QA_COMMENTS","value":"Testing by Suneetha"}]
	} 
}&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Nov 2016 07:20:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/post-workspace-item-using-restapi-in-c-net-500-internal-server/m-p/6659198#M4293</guid>
      <dc:creator>dany.poudrier</dc:creator>
      <dc:date>2016-11-01T07:20:20Z</dc:date>
    </item>
  </channel>
</rss>

