Trello Rest api sorting using query params

Hi Team,

Is there a way to pass sortby or sortOrder fields in Trello Rest api query search params . I am currently trying something as below to leverage pagination but it looks like I always get results in ascending order. Any idea how to resolve this issue?

const params = new URLSearchParams()
params.set(“attachments”, “true”)
params.set(“attachment_fields”, “bytes,date,url,name”)
params.set(“checklists”, “all”)
params.set(“limit”, “1000”)
params.set(“sortBy”, “id”)
params.set(“sortOrder”, “desc”)
urlPath = /boards/${args.boardId}/cards/?${params.toString()}
pagedResults = await this.getPagedResults({