Skip to main content
Solved

Is it possible to fetch cards from specific boards/collections/teams via API?

  • September 29, 2022
  • 3 replies
  • 203 views

Kenalpha Kipyegon

Hello folks.

 

I’m trying to fetch guru cards from specific boards/collections/teams and was wondering whether there’s a specific endpoint to do this.

Best answer by Joe Duffy

Hi @Kenalpha Kipyegon 👋

Here are the API calls you’re looking for:

Hope this is helpful - let me know if you need anything else!

Joe

 

3 replies

Joe Duffy
Guru Employee
Forum|alt.badge.img
  • Guru Employee
  • Answer
  • September 29, 2022

Hi @Kenalpha Kipyegon 👋

Here are the API calls you’re looking for:

Hope this is helpful - let me know if you need anything else!

Joe

 


Kenalpha Kipyegon

Thank you @Joe Duffy! Absolute legend!


Chris Adams
  • Smart Cookie
  • March 19, 2024

Based on Joe Duffy’s tip, I wrote the following python examples:

def find_card_in_collection(search_text, collection_id):
    ''' Find cards using search string(s) in the specified collection'''
    url = “https://api.getguru.com/api/v1/search/cardmgr"

    #Search a Collection...
    payload = {
        "queryType": "cards",
        "searchTerms": "test",
        "maxResults": 50,
        "collectionIds": [collection_id]
    }

    headers = {
        "accept": "application/json",
        "content-type": "application/json",
        "authorization": "Basic xxxMyEncodedUserId&Pwdxxx"
    }

    response = requests.post(url, json=payload, headers=headers)

    print(response.text)

 

 

def find_card_in_folder(search_text, folder_id):
    ''' Find cards using search string(s) in the specified folder '''
    url = "https://api.getguru.com/api/v1/search/cardmgr"

    #Search a Folder...
    payload = {
        "queryType": "cards",
        "searchTerms": search_text,
        "query": { "type": "folder-ids", "ids": [folder_id] }
    }

    headers = {
        "accept": "application/json",
        "content-type": "application/json",
        "authorization": "Basic xxxMyEncodedUserId&Pwdxxx"
    }

    response = requests.post(url, json=payload, headers=headers)

    print(response.text)