Welcome
PutPlace is a FastAPI-based service for storing and retrieving file metadata with MongoDB backend. Track file locations, SHA256 hashes, and metadata across your infrastructure.
Quick Start
API Endpoints
-
GET
/health- Health check with database status -
POST
/put_file- Store file metadata -
GET
/get_file/{sha256}- Retrieve file by SHA256 hash -
POST
/upload_file/{sha256}- Upload file content -
POST
/api_keys- Create new API key -
GET
/api_keys- List all API keys -
DELETE
/api_keys/{key_id}- Delete API key -
PUT
/api_keys/{key_id}/revoke- Revoke API key
Example Usage
Store File Metadata
curl -X POST http://localhost:8000/put_file \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-jwt-token" \
-d '{
"filepath": "/var/log/app.log",
"hostname": "server01",
"ip_address": "192.168.1.100",
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
}'
Retrieve File Metadata
curl -H "Authorization: Bearer your-jwt-token" \ http://localhost:8000/get_file/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Using the Client Tool
# Scan a directory and send metadata to server ppclient /var/log --token your-jwt-token # With exclude patterns ppclient /home/user --exclude .git --exclude "*.log" # Dry run mode ppclient /var/log --dry-run
Getting Started
1. Register an Account
Click the Register button above to create your account.
2. Install the Client
pip install putplace-client ppclient --help
3. Start Scanning
Use the ppclient command to scan directories and send metadata to the server.