Inflectra Customer Forums: Rest api to create project (Thread) 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[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet) How can I fix it? I'm sorry to post question for two times. en-US(C) Copyright 2006-2024 Inflectra Corporation.support@inflectra.com/Computers/Software/Project_Management//Computers/Software/Quality_Assurance/KronoDesksupport@inflectra.comhttp://www.inflectra.com/kronodesk/forums/threads120/Support/Forum/spiratest/issues-questions/1508.aspxthreadId=1508Woody Wu (bbbb8264@gmail.com)Rest api to create project 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[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet) How can I fix it? I'm sorry to post question for two times. Thu, 21 Jul 2016 00:31:46 -04002016-07-22T02:32:58-04:00/Support/Forum/spiratest/issues-questions/1508.aspxmessageId=2707Jim R (donotreply5@kronodesk.net) Hi Woody You need to actually POST a project definition in JSON. Something like: {"Act Hi Woody You need to actually POST a project definition in JSON. Something like: {"Active":true, "CreationDate":"\/Date(-62135578800000-0500)\/", "Description":"The description of my project", "Name":"My New Project"} Regards Jim. Thu, 21 Jul 2016 15:31:27 -04002016-07-21T15:31:27-04:00/Support/Forum/spiratest/issues-questions/1508.aspx#reply2707messageId=2711Woody Wu (bbbb8264@gmail.com)The contents of json file can't be found in doc (https://www.inflectra.com/SpiraDemo/Services/v4_0/RThe contents of json file can't be found in doc (https://www.inflectra.com/SpiraDemo/Services/v4_0/RestServiceOperation.aspx?uri=projects&method=GET). However, You tell me and it finally worked. Thanks a lot. Fri, 22 Jul 2016 02:32:58 -04002016-07-22T02:32:58-04:00/Support/Forum/spiratest/issues-questions/1508.aspx#reply2711