Keyword Search
Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
The keyword search term.
The maximum number of search results to return.
Whether the search term should be interpreted as a regular expression.
falseThe paths of the repositories in the space to search. Can be repeated. Can't be combined with recursive search.
The result should include entities from child spaces.
falseOK
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
GET /code/api/v1/code-search?accountIdentifier=text&query=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
{
"file_matches": [
{
"file_name": "text",
"language": "text",
"matches": [
{
"after": "text",
"before": "text",
"fragments": [
{
"match": "text",
"post": "text",
"pre": "text"
}
],
"line_num": 1
}
],
"repo_branch": "text",
"repo_path": "text"
}
],
"stats": {
"per_repo_matches": [
{
"file_matches": 1,
"repo_path": "text",
"total_matches": 1
}
],
"total_files": 1,
"total_matches": 1
}
}Account Identifier for the Entity.
Organization Identifier for the Entity.
Project Identifier for the Entity.
The keyword search term.
The maximum number of search results to return.
Whether the search term should be interpreted as a regular expression.
falseOK
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error
GET /code/api/v1/repos/{repo_identifier}/code-search?accountIdentifier=text&query=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
{
"file_matches": [
{
"file_name": "text",
"language": "text",
"matches": [
{
"after": "text",
"before": "text",
"fragments": [
{
"match": "text",
"post": "text",
"pre": "text"
}
],
"line_num": 1
}
],
"repo_branch": "text",
"repo_path": "text"
}
],
"stats": {
"per_repo_matches": [
{
"file_matches": 1,
"repo_path": "text",
"total_matches": 1
}
],
"total_files": 1,
"total_matches": 1
}
}Last updated
Was this helpful?