base64 and add-update-automation-script

Wednesday, December 13, 2023
Avatar

Hi,

I tried to add a script with this api.

projects/{project_id}/test-cases/{test_case_id}/add-update-automation-script?automation_engine_id={automation_engine_id}&url_or_filename={url_or_filename}&description={description}&version={version}&project_attachment_type_id={project_attachment_type_id}&project_attachment_folder_id={project_attachment_folder_id}

Is working fine for Linked files, but if I want to send directly the base64 in the payload, it fires an error.

The server encountered an error processing the request. The exception message is 'Unexpected character encountered while parsing value: G. Path '', line 1, position 1.'. See server logs for more details. The exception stack trace is:

at Inflectra.SpiraTest.Web.Services.Rest.NewtonsoftJsonDispatchFormatter.DeserializeRequest(Message message, Object[] parameters) at Inflectra.SpiraTest.Web.Services.Rest.UriTemplateDispatchFormatter.DeserializeRequest(Message message, Object[] parameters) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.DeserializeInputs(MessageRpc& rpc) 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)

 

Any suggestions?

Thanks

3 Replies
Wednesday, December 13, 2023
Avatar
re: emilios Wednesday, December 13, 2023

Which version of the API are you using (v5.0, v6.0 or v7.0)?

The data formats are slightly different.

Thanks

David

Friday, December 15, 2023
Avatar
re: inflectra.david Wednesday, December 13, 2023

7.0

Friday, December 15, 2023
Avatar
re: emilios Friday, December 15, 2023

That looks like the correct API and type of data to send.
For a more specific answer, could you please send details of the actual request to our support team?

That is private unlike the forum.

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885

 

Statistics
  • Started: Wednesday, December 13, 2023
  • Last Reply: Friday, December 15, 2023
  • Replies: 3
  • Views: 262