Get Card Attachments
To retrieve card attachments (images, videos, etc.) hosted by Guru, follow the steps below.
Get Card
GET https://api.getguru.com/api/v1/cards/{cardId}
The response will look something like the example below. Most of the response has been removed to make this documentation easier to digest. The field we need from the response is content
.
{
...
...
...
"id": "4405a9a7-7f79-4283-9253-dba673cd5623",
"content": "<p class=\"ghq-card-content__paragraph\" data-ghq-card-content-type=\"paragraph\">Test text</p><p class=\"ghq-card-content__paragraph ghq-is-empty\" data-ghq-card-content-type=\"paragraph\"><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\" style=\"width:1500px\" data-ghq-card-content-image-filename=\"Source Search Indexing.png\" /></span></p><p class=\"ghq-card-content__paragraph ghq-is-empty\" data-ghq-card-content-type=\"paragraph\"></p>",
"collection": {
"homeBoardSlug": "cKXddEei/Joe-Test-Collection-Shopify-Move",
"description": "",
"name": "Joe Test Collection - Shopify Move",
"id": "3c655cc6-e710-4bc6-81f6-e51278299a40",
"color": "#54c410",
"team": {
"name": "Duffy - Demo",
"id": "db7ea211-e1e0-4eb0-bc81-05d0d960c7d7"
},
"dateCreated": "2023-02-28T17:58:34.458+0000",
"collectionType": "INTERNAL",
"slug": "xi8no/Joe-Test-Collection-Shopify-Move",
"assistEnabled": false,
"publicCardsEnabled": true,
"collectionTypeDetail": "USER",
"emoji": ":shopping_trolley:",
"status": "ACTIVE",
"email": "[email protected]",
"lastName": "Duffy Admin",
"firstName": "Joe",
"profilePicUrl": "https://pp.getguru.com/e4039970b78648df8b3f7cf997a94a06.png"
}
...
...
...
}
The content
field contains the HTML that is used to render the Card. Inside of the HTML, you can tell which attachments are hosted by Guru by looking at the src
attributes. If the beginning of the URL starts with https://content.api.getguru.com/files/view/
, you can retrieve the attachment with our API. Copy that entire URL including the fileId (example: https://content.api.getguru.com/files/view/dc360897-7e4c-4565-8c98-57bc6876edb8
)
Get Attachment
GET https://content.api.getguru.com/files/view/{fileId}
This will return the attachment. This endpoint accepts the same authorization credentials you normally use for our API.
Updated 24 days ago