Inflectra Customer Forums: Add Release with REST API? (Thread) Hi Spira Team, I was trying to add a release using the REST API, however I was running into issues. I am able to run some POSTS like the projects/{project_id}/releases/search?number_rows={number_rows}&start_row={start_row} , so I think we have the right credentials. However, for some reason I was not able to get the create release endpoint working: projects/{project_id}/releases https://api.inflectra.com/Spira/Services/v5_0/RestServiceOperation.aspx?uri=projects%2f%7bproject_id%7d%2freleases&method=POST My guess is that I am not putting the correct request data? I am unsure which data is the required fields. I tried the following as request data: {OwnerId:33,CreatorId:33,ProjectId:12,ReleaseStatusId:1,ReleaseTypeId:4,VersionNumber:7.2.x,Name:Release 7.2.x} Heres the error I am getting in the response: The server encountered an error processing the request. The exception message is An error occurred while updating the entries. See the inner exception for details.. See server logs for more details. The exception stack trace is: at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter) at System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options) at Inflectra.SpiraTest.Business.SpiraTestEntitiesEx.SaveChanges(SaveOptions options, Nullable`1 userId, Boolean updateHistory, Boolean sendNotification, Nullable`1 rollbackId) at Inflectra.SpiraTest.Business.SpiraTestEntitiesEx.SaveChanges(Nullable`1 userId, Boolean updateHistory, Boolean sendNotification, Nullable`1 rollbackId) at Inflectra.SpiraTest.Business.ReleaseManager.Insert(Int32 userId, Int32 projectId, Int32 creatorId, String name, String description, String versionNumber, String indentLevel, ReleaseStatusEnum releaseStatus, ReleaseTypeEnum releaseType, DateTime startDate, DateTime endDate, Decimal resourceCount, Decimal daysNonWorking, Nullable`1 ownerId, Boolean logHistory) at Inflectra.SpiraTest.Business.ReleaseManager.Insert(Int32 userId, Int32 projectId, Int32 creatorId, String name, String description, String versionNumber, Nullable`1 existingReleaseId, ReleaseStatusEnum releaseStatus, ReleaseTypeEnum releaseType, DateTime startDate, DateTime endDate, Decimal resourceCount, Decimal daysNonWorking, Nullable`1 ownerId, Boolean ignoreLastInserted, Boolean logHistory) at Inflectra.SpiraTest.Web.Services.v5_0.RestService.Release_Create2(String project_id, String parent_release_id, RemoteRelease remoteRelease) at SyncInvokeRelease_Create1(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.ProcessMessage11(MessageRpc rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet) Does this error look familiar? What fields may I be missing in order to successfully create a release? Please let me know when you have a chance. Thanks! 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/2139.aspxthreadId=2139Michael Hashimoto (michael.hashimoto@liferay.com)soapapirestAdd Release with REST API? Hi Spira Team, I was trying to add a release using the REST API, however I was running into issues. I am able to run some POSTS like the projects/{project_id}/releases/search?number_rows={number_rows}&start_row={start_row} , so I think we have the right credentials. However, for some reason I was not able to get the create release endpoint working: projects/{project_id}/releases https://api.inflectra.com/Spira/Services/v5_0/RestServiceOperation.aspx?uri=projects%2f%7bproject_id%7d%2freleases&method=POST My guess is that I am not putting the correct request data? I am unsure which data is the required fields. I tried the following as request data: {OwnerId:33,CreatorId:33,ProjectId:12,ReleaseStatusId:1,ReleaseTypeId:4,VersionNumber:7.2.x,Name:Release 7.2.x} Heres the error I am getting in the response: The server encountered an error processing the request. The exception message is An error occurred while updating the entries. See the inner exception for details.. See server logs for more details. The exception stack trace is: at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter) at System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options) at Inflectra.SpiraTest.Business.SpiraTestEntitiesEx.SaveChanges(SaveOptions options, Nullable`1 userId, Boolean updateHistory, Boolean sendNotification, Nullable`1 rollbackId) at Inflectra.SpiraTest.Business.SpiraTestEntitiesEx.SaveChanges(Nullable`1 userId, Boolean updateHistory, Boolean sendNotification, Nullable`1 rollbackId) at Inflectra.SpiraTest.Business.ReleaseManager.Insert(Int32 userId, Int32 projectId, Int32 creatorId, String name, String description, String versionNumber, String indentLevel, ReleaseStatusEnum releaseStatus, ReleaseTypeEnum releaseType, DateTime startDate, DateTime endDate, Decimal resourceCount, Decimal daysNonWorking, Nullable`1 ownerId, Boolean logHistory) at Inflectra.SpiraTest.Business.ReleaseManager.Insert(Int32 userId, Int32 projectId, Int32 creatorId, String name, String description, String versionNumber, Nullable`1 existingReleaseId, ReleaseStatusEnum releaseStatus, ReleaseTypeEnum releaseType, DateTime startDate, DateTime endDate, Decimal resourceCount, Decimal daysNonWorking, Nullable`1 ownerId, Boolean ignoreLastInserted, Boolean logHistory) at Inflectra.SpiraTest.Web.Services.v5_0.RestService.Release_Create2(String project_id, String parent_release_id, RemoteRelease remoteRelease) at SyncInvokeRelease_Create1(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.ProcessMessage11(MessageRpc rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet) Does this error look familiar? What fields may I be missing in order to successfully create a release? Please let me know when you have a chance. Thanks! Mon, 27 Jan 2020 23:22:15 -05002020-01-30T02:31:24-05:00/Support/Forum/spiratest/issues-questions/2139.aspxmessageId=3721David J (support1@inflectra.com) Hi Michael You probably are missing all fields. There would be a more detailed error in the Event Hi Michael You probably are missing all fields. There would be a more detailed error in the Event Log inside Spira? Also feel free to log a help desk if you need more individualized support with this. Regards David Wed, 29 Jan 2020 12:20:36 -05002020-01-29T12:20:36-05:00/Support/Forum/spiratest/issues-questions/2139.aspx#reply3721messageId=3722Michael Hashimoto (michael.hashimoto@liferay.com) Hi David, I found out what were the required fields were, the main parameters I was missing were t Hi David, I found out what were the required fields were, the main parameters I was missing were the EndDate and StartDate: curl -X POST -d {StartDate:/Date(1580351091911)/,ReleaseStatusId:1,EndDate:/Date(1580351091911)/,ReleaseTypeId:1,Name:temporary} -u [username]:[password] https://[company].spiraservice.net/services/v6_0/RestService.svc/projects/[project_id]/releases/[release_id] Thanks! Thu, 30 Jan 2020 02:31:23 -05002020-01-30T02:31:23-05:00/Support/Forum/spiratest/issues-questions/2139.aspx#reply3722