<rss version="2.0" xmlns:a10="http://www.w3.org/2005/Atom"><channel><title>Inflectra Customer Forums: Rest api to create project (Thread)</title><description>&#xD;
 when I use rest api to create project      url: http://localhost/SpiraTest/Services/v4_0/RestService.svc/projects  headers:   {   	 Content-Type : application/json   	 accept:  application/json   	 username: bbbb8264   	 api-key: {992790F0-EDB3-46AE-879D-6884D82A0E49}  }     but get error message:   The server encountered an error processing the request. The exception message is 'Object reference not set to an instance of an object.'. See server logs for more details. The exception stack trace is:  at Inflectra.SpiraTest.Web.Services.v4_0.RestService.Project_Create(RemoteProject remoteProject, String existing_project_id) at SyncInvokeProject_Create(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&amp; outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)  How can I fix it? I'm sorry to post question for two times.  &#xD;
&#xD;
 </description><language>en-US</language><copyright>(C) Copyright 2006-2026 Inflectra Corporation.</copyright><managingEditor>support@inflectra.com</managingEditor><category domain="http://www.dmoz.org">/Computers/Software/Project_Management/</category><category domain="http://www.dmoz.org">/Computers/Software/Quality_Assurance/</category><generator>KronoDesk</generator><a10:contributor><a10:email>support@inflectra.com</a10:email></a10:contributor><a10:id>http://www.inflectra.com/kronodesk/forums/threads</a10:id><ttl>120</ttl><link>/Support/Forum/spiratest/issues-questions/1508.aspx</link><item><guid isPermaLink="false">threadId=1508</guid><author>Woody Wu (bbbb8264@gmail.com)</author><category domain="http://www.inflectra.com/kronodesk/thread/tag">rest</category><category domain="http://www.inflectra.com/kronodesk/thread/tag"> api</category><title>Rest api to create project</title><description>&#xD;
 when I use rest api to create project      url: http://localhost/SpiraTest/Services/v4_0/RestService.svc/projects  headers:   {   	 Content-Type : application/json   	 accept:  application/json   	 username: bbbb8264   	 api-key: {992790F0-EDB3-46AE-879D-6884D82A0E49}  }     but get error message:   The server encountered an error processing the request. The exception message is 'Object reference not set to an instance of an object.'. See server logs for more details. The exception stack trace is:  at Inflectra.SpiraTest.Web.Services.v4_0.RestService.Project_Create(RemoteProject remoteProject, String existing_project_id) at SyncInvokeProject_Create(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&amp; outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&amp; rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)  How can I fix it? I'm sorry to post question for two times.  &#xD;
&#xD;
 </description><pubDate>Thu, 21 Jul 2016 00:31:46 -0400</pubDate><a10:updated>2016-07-22T02:32:58-04:00</a10:updated><link>/Support/Forum/spiratest/issues-questions/1508.aspx</link></item><item><guid isPermaLink="false">messageId=2707</guid><author>Jim R (donotreply5@kronodesk.net)</author><title>&#xD;
Hi Woody&#xD;
&#xD;
    You need to actually POST a project definition in JSON. Something like:      {"Act</title><description>&#xD;
Hi Woody&#xD;
&#xD;
    You need to actually POST a project definition in JSON. Something like:      {"Active":true,&#xD;
"CreationDate":"\/Date(-62135578800000-0500)\/",&#xD;
"Description":"The description of my project",&#xD;
"Name":"My New Project"}      Regards   Jim. </description><pubDate>Thu, 21 Jul 2016 15:31:27 -0400</pubDate><a10:updated>2016-07-21T15:31:27-04:00</a10:updated><link>/Support/Forum/spiratest/issues-questions/1508.aspx#reply2707</link></item><item><guid isPermaLink="false">messageId=2711</guid><author>Woody Wu (bbbb8264@gmail.com)</author><title>The contents of json file can't be found in doc (https://www.inflectra.com/SpiraDemo/Services/v4_0/R</title><description>The contents of json file can't be found in doc (https://www.inflectra.com/SpiraDemo/Services/v4_0/RestServiceOperation.aspx?uri=projects&amp;method=GET). However, You tell me and it finally worked.  Thanks a lot. </description><pubDate>Fri, 22 Jul 2016 02:32:58 -0400</pubDate><a10:updated>2016-07-22T02:32:58-04:00</a10:updated><link>/Support/Forum/spiratest/issues-questions/1508.aspx#reply2711</link></item></channel></rss>