#1578 API: new_ticket has documentation/implementation mismatch
Closed: Fixed Opened by mkosek.

I kept receiving errors when creating an issue via API, based on the documentation:

>>> data = {'title': 'test issue', 'content': 'test content'}
>>> r = s.post('https://pagure.io/api/0/{repo}/new_issue', data=data)
>>> r.text

u'{\n "error": "Invalid or incomplete input submited",\n "error_code": "EINVALIDREQ"\n}'

Then in the source code I actually found that the field should be named issue_content and not content.


content sounds better to me, if we have to choose b/w the 2. Otherwise, it will need changes in importer :/

Please note that issue_content is now in the public API: even if docs are wrong, other people might have implemented clients with this name.
As such, this should NOT be broken.
Either update the documentation or accept both names in my opinion.

Looks like the documentation was always wrong, the original commit is: https://pagure.io/pagure/c/ca76358ec5b21b94a7e0a5a559ff23a13c92e846

I'll adjust it.

Commit 2d6f9d2c fixes this issue

@pingou changed the status to Closed

Metadata Update from @lslebodn:
- Issue tagged with: IDM

Metadata