Get Started in 5 Minutes
This guide will get you up and running with Resource Service quickly. You’ll launch the service, create your first resource, generate an AI-powered wrapper, and start collecting data.What you’ll need:
- Docker and Docker Compose installed
- A Google Gemini API key (get one here)
- 5 minutes of your time
Launch the Service
Clone and Configure
Clone the repository and set up your environment:Edit
.env and add your Gemini API key:.env
Start Services
Launch all services with Docker Compose:Wait for services to be healthy (about 30 seconds):You should see both
resource-service and resource-mongo as healthy.Create Your First Resource
Now let’s create a sustainability indicator resource and generate an AI-powered data collection wrapper.Upload a Data File (Optional)
If you have a CSV or Excel file with sustainability data, upload it first:Response:
Generate an API Wrapper
Let’s create a wrapper for an API data source. This example collects air quality data:
The service will use Gemini AI to generate a custom Python wrapper. Response:
Generate a CSV Wrapper Instead
Generate a CSV Wrapper Instead
To generate a wrapper for an uploaded CSV file:
Execute the Wrapper
Start collecting data by executing the wrapper:Response:The wrapper will now:
- Historical Phase: Collect all available historical data
- Continuous Phase: Monitor for new data points
- Send data to RabbitMQ for downstream processing
List Resources and Wrappers
View all created resources and wrappers:Manage Wrapper Execution
Control wrapper lifecycle with these endpoints:Interactive API Documentation
Explore all available endpoints with the built-in Swagger UI:Open API Documentation
Visit http://localhost:8080/docs for interactive API documentation with request/response examples and a built-in API client.
Open ReDoc
Visit http://localhost:8080/redoc for a clean, three-panel API documentation interface.
Common Operations
Update a Resource
Update a Resource
Use PUT to update a resource completely:Or use PATCH to update specific fields:
Delete Resources
Delete Resources
Delete a resource:Response:
Delete Uploaded Files
Delete Uploaded Files
Remove uploaded files when no longer needed:Response:
View Service Version
View Service Version
Check the service version:Response:
Next Steps
Installation Guide
Learn about development setup, environment variables, and production deployment
API Reference
Explore detailed API documentation for all endpoints and schemas
Core Concepts
Understand wrappers, resources, phases, and data collection patterns
Configuration
Advanced configuration options and environment variables
Troubleshooting
Service won't start
Service won't start
Check Docker logs:Common issues:
- Missing
GEMINI_API_KEYin.env - Port 8080 already in use
- MongoDB connection timeout
Wrapper generation fails
Wrapper generation fails
Wrapper not executing
Wrapper not executing
Check wrapper status:If status is
error, check the logs: