Skip to main content
Answered

API requests Query


Forum|alt.badge.img+2

Hi Team

https://api.miro.com/v2/boards?limit=50&owner=(user1)&createdBy=(user2)

 

I need to filter the boards that are currently owned by user1 but were originally created by user2.

I getting all boards owned by user1, not filtered where condition created by user2 in response.

 

Thanks.

Best answer by Alexander S

Hi @Naveen prakash,

I think it is not possible to filter boards by the creator. Here is a relevant documentation page: https://developers.miro.com/reference/get-boards. It does not mention createdBy parameter.

As an alternative it should be possible to filter boards by the creator in your code. Here is an approximate python implementation:

import requests

url = "https://api.miro.com/v2/boards?owner=user1"

headers = {"accept": "application/json"}

response = requests.get(url, headers=headers)

filtered_by_createdBy = []

for board in response.json()["data"]:
    if board["createdBy"] == "user2":
        filtered_by_createdBy.append(board)

 

View original
Was it helpful?

2 replies

  • 4 replies
  • Answer
  • August 23, 2024

Hi @Naveen prakash,

I think it is not possible to filter boards by the creator. Here is a relevant documentation page: https://developers.miro.com/reference/get-boards. It does not mention createdBy parameter.

As an alternative it should be possible to filter boards by the creator in your code. Here is an approximate python implementation:

import requests

url = "https://api.miro.com/v2/boards?owner=user1"

headers = {"accept": "application/json"}

response = requests.get(url, headers=headers)

filtered_by_createdBy = []

for board in response.json()["data"]:
    if board["createdBy"] == "user2":
        filtered_by_createdBy.append(board)

 


Forum|alt.badge.img+2

Thankyou 


Reply