Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

Getting an error from miniapi add_result


I’m attempting to post test results using the miniapi add_result method, but I’m getting the following error:

“result”: false,
“error”: “[Microsoft][SQL Server Native Client 11.0][SQL Server]Conversion failed when converting the nvarchar value ‘api’ to data type int.”

The post looks like this:


Post parameters: status_id=1

I’ve successfully gotten results back from the miniapi for other GET and POST calls, so I’m not sure what to make of this.

Any ideas as to how to fix this?



Thanks for your posting. You have probably entered ‘api’ as value for GI_MINIAPI_USER_ID, is this correct? The value of this setting should actually be the numeric ID of the user and not its name or similar. Could you please check this? The numeric ID of a user can be looked up when editing the user in TestRail’s UI (it is the last part in the URL then).

Thanks again and I look forward to your reply.



Yes, our IT engineer entered the User Name instead of the User ID when he installed the miniapi. Everthing is working fine now that we have fixed this. Thank you for your help :slight_smile:


Great to hear that it works now and thanks for the update.