Forum Discussion

JGedney's avatar
JGedney
Copper Contributor
Feb 22, 2024

search/codesearchresults not able to get more than 2000 results?

when I send a POST API request to 
"https://MYAZUREINSTANCE/tfs/COLLECTION/MYPROJECT/_apis/search/codesearchresults?api-version=7.0" 
with this payload 

 

 

{
 "searchText": "ext:dll",
 "$skip": 1000,
 "$top": 1000,
 "filters": [
  {
    "name": "ProjectFilters",
      "values": [
        "MYPROJECT"
      ]
  },
  {
    "name": "RepositoryFilters",
    "values": [
      "$/MYPROJECT"
    ]
  }
 ],
 "searchFilters": {
   "ProjectFilters": [
     "MYPROJECT"
   ],
    "RepositoryFilters": [
       "$/MYPROJECT"
    ]
  }
}

 

 

the API returns the file data correctly. 
but I have more than 2000 such files. 
if I set 

 

"$skip": 2000,

 

it returns an error stating that the $skip must be between 0 and 1000....

How do I get the rest of the files? 

 

No RepliesBe the first to reply

Resources