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

Unsupported HTTP method \"get\" for this action


Post body

I am getting below response:
{Unsupported HTTP method “get” for this action."}

Even though I used POST why is the return error saying GET?

Using test rail version 2.6



Thanks for your posting. Would it be possible to send the full request including sample code to our help desk via email ( Which tools or libraries do you use to send the HTTP request (e.g. curl or something else)?



Hi, I am having the same issue. This is the python snippet I am using to send the request:

import requests
import json

base = 'http://<my-account>'
user = '<my-email>'
password = '<my-password>'

headers = {'Content-Type': 'application/json'}
response = + 'add_result/1', auth=(user, password), data=json.dumps({'status_id': 1}), headers=headers)

Snippet for GET works as expected - returns JSON object in response.

headers = {'Content-Type': 'application/json'}
response = requests.get(base + 'get_project/1', auth=(user, password), headers=headers)

Thanks for your help. They advertised python API package seem obsolete and also does not work (that is why I am using python requests library).


The problem is that you are trying to use http:// instead of https:// for your TestRail Hosted account, which will result in a redirect and then a GET request. It’s important to use https:// with TestRail Hosted.

I hope this helps!


This resolved it.

Thanks for fast response.


Hi! I´m having the same problem.
For sending HTTP request I´m using curl.

And I also want to add a result like failed. In the end I want to use our automatic testing tool for it, but first I have to test it manually.

curl --insecure -H “Content-Type: application/json” -u " xxxx" “

Do I have to put the result to the end like: …add_result/954/failed ?

And I also have the error message with unsupported http method…



Hey @Travelstar,

Thanks for your posting. You would need to submit data like this as part of the HTTP POST body and the expected format would be JSON:

Please see “Request example”.

There’s also a full example on how to submit data using curl here:

I hope this helps!



Hey Tobias,

thanks for your quick reply. I´d tried it again and now I´ve got another Problem -.-

curl --insecure -H “Content-Type: application/json” -u "" -d ‘{“status_id”:1}’ “https://testrail/index.php?/api/v2/add_result/954

error message: invalid or incomplete json string

Thanks for helping


Now it´s solved… :slight_smile:



Good to hear it’s working now :slight_smile:



HI ,

I am also facing similar issue. I am doing curl with following command

/usr/bin/curl --insecure -L -H Content-Type:application/json -u username:password https://ip:port/testrail/api/v2/add_run/91 -d '{ “suite_id”: “2918”, “name”:“test2018-02-07-07:52:58” }'
{“error”:“Unsupported HTTP method “get” for this action.”}

All get API’s are working fine for me. Is there something which I am missing in case of post API.