Skip Navigation LinksForums > SpiraTest Forums > SpiraTest Issues & Questi... > Rest api to create projec...

Rest api to create project RSS Feed

Wednesday, July 20, 2016
when I use rest api to create project

url: http://localhost/SpiraTest/Services/v4_0/RestService.svc/projects
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.

2 Replies
Jim R.Jim R.
re: Woody Wu on Wednesday, July 20, 2016
Thursday, July 21, 2016
Hi Woody

You need to actually POST a project definition in JSON. Something like:

"Description":"The description of my project",
"Name":"My New Project"}


Woody WuWoody Wu
re: Jim R. on Thursday, July 21, 2016
Thursday, July 21, 2016
The contents of json file can't be found in doc (
However, You tell me and it finally worked.
Thanks a lot.
  • Started: 7/20/2016
  • Last Reply: 7/21/2016
  • Replies: 2
  • Views: 2253
Powered by KronoDesk v1.1.0.15 | © Copyright Inflectra Corporation 2011-2016 | Licensed to Inflectra Corporation.