Get Card Attachments

Retrieve the attachments hosted on a card in two API calls.

Cards can carry attachments, such as images and videos, hosted by Guru. Retrieving one takes two steps: find the attachment URL in the card's content, then download it.

Get the card

curl -u $GURU_USER:$GURU_TOKEN https://api.getguru.com/api/v1/cards/{cardId}

The field you need from the response is content. Truncated for readability:

{
  "id": "4405a9a7-7f79-4283-9253-dba673cd5623",
  "content": "<p class=\"ghq-card-content__paragraph\" data-ghq-card-content-type=\"paragraph\">Test text</p><p><span class=\"ghq-card-content__image-container\"><img class=\"ghq-card-content__image\" data-ghq-card-content-type=\"IMAGE\" alt=\"Source Search Indexing.png\" width=\"1500\" src=\"https://content.api.getguru.com/files/view/dc360897-7e4c-4565-8c98-57bc6876edb9\" /></span></p>",
  ...
}

The content field contains the HTML used to render the card. You can tell which attachments are hosted by Guru by looking at the src attributes: any URL that starts with https://content.api.getguru.com/files/view/ can be retrieved with the API. Copy the entire URL including the file ID; in the example above, that's https://content.api.getguru.com/files/view/dc360897-7e4c-4565-8c98-57bc6876edb9.

Get the attachment

curl -u $GURU_USER:$GURU_TOKEN -O https://content.api.getguru.com/files/view/{fileId}

This returns the attachment. The endpoint accepts the same authorization credentials you use for the rest of the API.