Skip to content

manage_search

Search Azure DevOps using WIQL queries, code search, work item text search, wiki search, or saved queries.

ActionDescriptionRequired ParamsOptional ParamsWrite
wiqlExecute a WIQL query and return full work itemsqueryproject_key, fields, topNo
codeSearch code across repositoriesqueryproject_key, topNo
work_itemsSearch work items by textqueryproject_key, topNo
wikiSearch wiki contentqueryproject_key, topNo
get_queryGet a saved query definition by ID or pathquery_idproject_keyNo
run_queryRun a saved query and return resultsquery_idproject_key, topNo
ParameterTypeDescription
actionstringRequired. The action to perform: wiql, code, work_items, wiki, get_query, run_query
querystringWIQL query string (for wiql) or search text (for code, work_items, wiki)
query_idstringSaved query ID or path (for get_query, run_query)
project_keystringProject name (optional, scopes the search)
topintegerMax results to return (default 25)
fieldsstring[]Fields to return for WIQL results
{
"action": "wiql",
"query": "SELECT [System.Id], [System.Title], [System.State] FROM WorkItems WHERE [System.State] = 'Active' AND [System.WorkItemType] = 'Bug' ORDER BY [System.ChangedDate] DESC",
"project_key": "MyProject",
"top": 10
}
{
"action": "code",
"query": "func handleAuth",
"project_key": "MyProject",
"top": 25
}
{
"action": "work_items",
"query": "login redirect bug",
"project_key": "MyProject"
}
{
"action": "wiki",
"query": "architecture diagram",
"project_key": "MyProject"
}
{
"action": "get_query",
"query_id": "My Saved Queries/Active Bugs",
"project_key": "MyProject"
}
{
"action": "run_query",
"query_id": "My Saved Queries/Active Bugs",
"project_key": "MyProject",
"top": 50
}