Search file contents
curl --request POST \
--url https://api.arg.ai/api/workspaces/{workspaceId}/tools/grep \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pattern": "<string>"
}
'import requests
url = "https://api.arg.ai/api/workspaces/{workspaceId}/tools/grep"
payload = { "pattern": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({pattern: '<string>'})
};
fetch('https://api.arg.ai/api/workspaces/{workspaceId}/tools/grep', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{}{
"detail": "<string>"
}Agent Tools
Search file contents
Regex search across workspace files. Output is capped at 10,000 characters.
POST
/
api
/
workspaces
/
{workspaceId}
/
tools
/
grep
Search file contents
curl --request POST \
--url https://api.arg.ai/api/workspaces/{workspaceId}/tools/grep \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pattern": "<string>"
}
'import requests
url = "https://api.arg.ai/api/workspaces/{workspaceId}/tools/grep"
payload = { "pattern": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({pattern: '<string>'})
};
fetch('https://api.arg.ai/api/workspaces/{workspaceId}/tools/grep', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{}{
"detail": "<string>"
}Authorizations
Bearer-tokenAPI-key
Body
application/json
Response
Successful response
The response is of type object.