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

Getting http 404 TestRail API returned HTTP 404 ("Unknown method 'api'")


#1

Hello there,

I was trying to update the overall result of a test case within a test run using the method add_result_for_case.

My code looks something like this in Ruby:

data = {‘status_id’=>5}
@client.send_post(‘api/v2/add_result_for_case/:runID/:testCaseID’,data)

or
@client.send_post(‘api/v2/add_result_for_case/:runID/:testCaseID’,data.to_json)

However, for both the cases I am getting error as
TestRail::APIError: TestRail API returned HTTP 404 (“Unknown method ‘api’”)

Any help will be much appreciated.

Thank you!


#2

Never mind. I got it figured out it should be something like this

@client.send_post(‘add_result_for_case//’,{:status_id => 5})


#3

Hi there,

Thank you for the post and update. I am glad you were able to get it working.