Internal Server Error 500 when querying for Ticket comments

78 views
Skip to first unread message

David Martel

unread,
Apr 30, 2020, 8:40:56 AM4/30/20
to Assembla API Development
I have seen mention of people struggling to add comments to tickets, but all I am trying to do is query comments for certain tickets and I am running in to the dreaded 500 error.

Most of the api functions are working fine using Key/Secret authentication. I can enumerate my spaces, I can list the ticketsthem selves. So all of that seem to work OK. I can query individual tickets using 


However when I try and query a ticket that I know has comments it fails. 

I am using the following

curl -H "X-Api-Key: xxxxxxxxxxxxxxxxxxxx" -H "X-Api-Secret: xxxxxxxxxxxxxxxxxxxx" -G https://api.assembla.com/v1/spaces/xxxxxxxxxxxxxxxxxxxxxx/tickets/213/ticket_comments

I have tried it this way 

curl -G -H "X-Api-Key: xxxxxxxxxxxxxxxxxxxx" -H "X-Api-Secret: xxxxxxxxxxxxxxxxxxxx" https://api.assembla.com/v1/spaces/xxxxxxxxxxxxxxxxxxxxxx/tickets/213/ticket_comments

I am using the -G since I believe that should ensure a GET rather than a PUT, since I am not trying to add a comment. I did try it without the -G though and get the same issues

Any ideas most welcome

Thanks

David Martel

unread,
Apr 30, 2020, 9:06:21 AM4/30/20
to Assembla API Development
Interesting. I see there is a parameter per_page that can be used. The documentation doesn't seem clear on whether it is required. If I set 

?per_page=1

then it works. 

The document says that I should be able to set it up to 10 and get up to 10 comments in a batch.... That seems not to be true at present. If I set per_page to 2 it fails with 500: Internal Server Error. If I omit per_page altgoether it fails with 500: Internal Server Error


Ho, hum

David Martel

unread,
Apr 30, 2020, 12:15:35 PM4/30/20
to Assembla API Development
Actually looks like the error is something different. We have tickets created by, and ticket comments from a colleague who left the company. His Assembla account got removed from the space. 

In the Assembla web site it shows tickets created by him with the correct name and (Removed from space) afterwards. Reasonable
In the Assembla web site it shows ticket comments with no name at all. Reasonable I guess. We can at least still see the comments which is what is wanted.

Now to the problem.
When we query for ticket comments through the REST API these comments throw 500: Internal Server Error. There is no way that I can find to get these comments through the REST API. This looks to be a bug to me, my guess is that maybe there is a table join going on somewhere that is throwing an error. Clearly though the code that drives the web site can handle this though

As an aside it does appear as though exporting a backup may have the comments, and so maybe some later scripting and massaging may allow us to get to what we need, but this is clearly not an ideal solution when the REST API should work.

Maybe I will have to try direct with Customer support and see if this is a known issue.



On Thursday, April 30, 2020 at 1:40:56 PM UTC+1, David Martel wrote:
Reply all
Reply to author
Forward
0 new messages