curl -X POST https://api.relace.run/v1/repo/123e4567-e89b-12d3-a456-426614174000/search \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "authenticate"
}'
{
"results": [
{
"filename": "src/auth.py",
"line_number": 15,
"line_content": "def authenticate_user(username, password):",
"match_start": 4,
"match_end": 14
},
{
"filename": "src/middleware.py",
"line_number": 28,
"line_content": " # Check if user is authenticated",
"match_start": 22,
"match_end": 32
}
]
}
Search for specific text patterns in repo files
curl -X POST https://api.relace.run/v1/repo/123e4567-e89b-12d3-a456-426614174000/search \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "authenticate"
}'
{
"results": [
{
"filename": "src/auth.py",
"line_number": 15,
"line_content": "def authenticate_user(username, password):",
"match_start": 4,
"match_end": 14
},
{
"filename": "src/middleware.py",
"line_number": 28,
"line_content": " # Check if user is authenticated",
"match_start": 22,
"match_end": 32
}
]
}
curl -X POST https://api.relace.run/v1/repo/123e4567-e89b-12d3-a456-426614174000/search \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "authenticate"
}'
{
"results": [
{
"filename": "src/auth.py",
"line_number": 15,
"line_content": "def authenticate_user(username, password):",
"match_start": 4,
"match_end": 14
},
{
"filename": "src/middleware.py",
"line_number": 28,
"line_content": " # Check if user is authenticated",
"match_start": 22,
"match_end": 32
}
]
}