For SQ 7.1 the web API docs at http://localhost:9000/web_api/api/qualityprofiles for operation “delete” show only the optional parameters “language” and “qualityProfile”. The alternative “key” is missing from the documentation, but works as expected.
Oh, I see – there’s a separate checkbox somewhere in the UI that one has to tick to see the deprecated APIs.
Nonetheless, then there’s still something wrong with the API docs: qualityprofiles/delete only documents two optional arguments, which do not seem so optional after all:
# create a new profile by copying
$ curl -u admin:admin -d fromKey=AWUi4vmmbmJsQitOewAp -d toName=test http://localhost:9000/api/qualityprofiles/copy
{"key":"AWUi5hjTbmJsQitOeweY","name":"test","language":"cs","languageName":"C#","isDefault":false,"isInherited":false}
# try to delete new profile by name
$ curl -u admin:admin -d qualityProfile=test http://localhost:9000/api/qualityprofiles/delete
{"errors":[{"msg":"If no quality profile key is specified, language and name must be set"}]}
# delete new profile with name & language
$ curl -u admin:admin -d language=cs -d qualityProfile=test http://localhost:9000/api/qualityprofiles/delete
# success!