api-development
Tools to develop, secure, and update NetAlertX API endpoints while maintaining JSON response standards.
Install
mkdir -p .claude/skills/api-development && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/2188" && unzip -o skill.zip -d .claude/skills/api-development && rm skill.zipInstalls to .claude/skills/api-development
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Develop and extend NetAlertX REST API endpoints. Use this when asked to create endpoint, add API route, implement API, or modify API responses.Key capabilities
- →Create new API endpoints
- →Modify existing API routes
- →Implement authorization headers
- →Enforce JSON response contracts
How it works
Developers add routes to the server/api_server/ directory, apply Bearer token authorization, and return responses formatted with a success boolean and data or error fields.
Inputs & outputs
When to use api-development
- →Create a new API endpoint for device data
- →Update an existing API route to return specific data
- →Implement authentication for a custom API endpoint
- →Debug API response structure issues
About this skill
API Development
Entry Point
Flask app: server/api_server/api_server_start.py
Existing Routes
/device/<mac>- Single device operations/devices- Device list/devices/export/{csv,json}- Export devices/devices/import- Import devices/devices/totals- Device counts/devices/by-status- Devices grouped by status/nettools- Network utilities/events- Event log/sessions- Session management/dbquery- Database queries/metrics- Prometheus metrics/sync- Synchronization
Authorization
All routes require header:
Authorization: Bearer <API_TOKEN>
Retrieve token via get_setting_value('API_TOKEN').
Response Contract
MANDATORY: All responses must include "success": true|false
return {"success": False, "error": "Description of what went wrong"}
On success:
return {"success": True, "data": result}
return {"success": False, "error": "Description of what went wrong"}
On success:
return {"success": True, "data": result}
Exception: The legacy /device/<mac> GET endpoint does not follow this contract to maintain backward compatibility with the UI.
Adding New Endpoints
- Add route in
server/api_server/directory - Follow authorization pattern
- Return proper response contract
- Update UI to read/write JSON cache (don't bypass pipeline)
When not to use it
- →Legacy /device/<mac> GET endpoint modifications
Prerequisites
Limitations
- →Legacy endpoints do not follow the mandatory JSON response contract
How it compares
Unlike manual API creation, this skill enforces a mandatory JSON response contract and specific authorization patterns to ensure consistency across the application.
Compared to similar skills
api-development side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| api-development (this skill) | 3 | 6mo | No flags | Intermediate |
| flask | 0 | 6mo | Review | Intermediate |
| django-flask-patterns | 0 | 6mo | No flags | Intermediate |
| forms-and-validation | 0 | 4mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by netalertx
View all by netalertx →You might also like
flask
ar4mirez
|
django-flask-patterns
sraloff
Models/views/templates (Django), blueprints (Flask), migrations.
forms-and-validation
cantis
Use this skill when building or refining forms and validation flows for Flask or FastAPI applications using Bootstrap 5 and server-rendered templates. Covers labels, layout, sticky values, field errors, validation summaries, confirmation flows, and accessible business-style forms.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
fastapi-pro
sickn33
Build high-performance async APIs with FastAPI, SQLAlchemy 2.0, and Pydantic V2. Master microservices, WebSockets, and modern Python async patterns. Use PROACTIVELY for FastAPI development, async optimization, or API architecture.
telegram-bot-builder
davila7
Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users. Use when: telegram bot, bot api, telegram automation, chat bot telegram, tg bot.