Getting a 500 error when querying the KCS endpoint

Hello! I'm trying to query Guru's KCS endpoint to get all Zendesk tickets linked to a specific card. When I use the `cardId` query, I don't get anything back, and usually a 500 error. However, if I remove`cardId` it works, only I get ALL cards which is not what I want.
I've tried `cardId` using the slug (works when doing a call to search by ID but not KCS), and also using the card id property we get in the objects when calling KCS (this also gives me ALL cards).
Here's an example test in curl
This works though
Am I doing something wrong?
We're trialing Guru for issues and feedback, but we need a way to get all ZD tickets linked to a card for it to be of any use. The Spreadsheet Guru provides is cool, but while trying to introduce the `cardId` query, it's just giving me 500 errors even if the call is properly formatted.
Has anyone built something similar? I appreciate any input! 🙏

Best answer by Rob Miller 17 May 2021, 18:00

View original

12 replies

Userlevel 3
Hi Joshua, we don't use this, but out of curiosity, have you tried providing the ticketing platform along with the cardId?
hey Dillon, thanks for the reply! Yes, I've tried that, it gives me all cards again, like it disregards the cardId param
Userlevel 4
hmmm, interesting. Let me raise this to our dev team @joshua.ordehi. Was also going to suggest adding the target platform, but let me raise this internally to ensure the cardID parameter is supported. Are you coding directly into the google sheet's App Scripts or are you testing the endpoint outside of the sheet for now?
Thank you @mhouston I'm doing both, when the GSheet started acting up after I added cardId, I started testing using Git Bash with curl
Userlevel 4
Thanks for the clarification, helps eliminate the App Script being the problem. I have sent this thread to our dev teams who made the ticket linking sheet and will let you know what they say. Sorry for the delay on this.
Userlevel 1
Hey @joshua.ordehi I confirmed our filtering will let you provide any combination of fields, so passing just `cardId` will be fine.
Some endpoints use slugs and IDs interchangeably, but this is not one of them so it'll have to be the full ID and it'll have to be formatted like `aeb981e3-e922-4e2b-aa04-dde79c4c3cda`. Uppercase is fine to, but if there are no dashes you'll get a 500 error.
Userlevel 1
I've got a couple of questions:
1. When you're trying it with a card ID, what's the ID you're using?
2. Are there other filter options? You mentioned sometimes when including a card ID you still get all results, and I'm wondering if it's a coincidence where the results for that query happen to all have the same card ID.
Hey Rob, thank you! It's working when using that type of ID. I was using the slug, and apparently when I tried using the longer one before there might have been a typo or I got the wrong one.
Is there a way to get those easily? So far I'm using the slug to search for card data so I can get the ID
Userlevel 1
You can use Card Manager to export all cards to csv, then search that sheet. That might be a little bit easier if you're doing a lot of lookups.
Awesome! Thanks, Rob, this covers my use case 😄
As a side of feedback, we're rooting for y'all to implement a widget for tickets in-app or in your Zapier integration 😉
Userlevel 1
Awesome, glad that helps! I don't think the Ticket Linking events are available through Zapier now, but Mary might have more details on if/when that'll be available.
Userlevel 3
We use "link to ticket" to track bugs and feature requests so having an easier reporting method is what Josh is working on for us. The google sheet is a great starting point that allowed us to test the use case. It's a great workflow overall and much better than anything else we've tried! 😄