AP

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.zip

Installs 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.
143 chars✓ has a “when” trigger
Intermediate

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

You give it
New route definition and logic
You get back
Registered API endpoint adhering to JSON success/error contract

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

  1. Add route in server/api_server/ directory
  2. Follow authorization pattern
  3. Return proper response contract
  4. Update UI to read/write JSON cache (don't bypass pipeline)

When not to use it

  • Legacy /device/<mac> GET endpoint modifications

Prerequisites

API_TOKEN

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.

SkillInstallsUpdatedSafetyDifficulty
api-development (this skill)36moNo flagsIntermediate
flask06moReviewIntermediate
django-flask-patterns06moNo flagsIntermediate
forms-and-validation04moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry