POST
/
local-filesystem
/
scan
Scan a local filesystem directory
curl --request POST \
  --url https://apigcp.trynia.ai/v2/local-filesystem/scan \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "directory_path": "/Users/username/projects/myproject",
  "inclusion_patterns": [
    "ext:.py",
    "ext:.js",
    "dir:src"
  ],
  "exclusion_patterns": [
    "dir:node_modules",
    "ext:.log",
    "dir:.git"
  ],
  "max_file_size_mb": 50
}'
{
  "directory_path": "<string>",
  "total_files": 123,
  "total_size_mb": 123,
  "file_types": {},
  "files": [
    {
      "path": "<string>",
      "size": 123,
      "extension": "<string>"
    }
  ],
  "truncated": true
}

Authorizations

Authorization
string
header
required

API key must be provided in the Authorization header

Body

application/json

Response

200
application/json

Directory scanned successfully

The response is of type object.