Skip to main content

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.

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

 


Thank you @Joe Duffy! Absolute legend!


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)


Reply