🚀 Mock API Documentation

ServiceNow & New Relic Mock APIs for Chatbot Development

🎫 ServiceNow Mock API

Base path: /servicenow

GET /servicenow/health
Health check endpoint
Example:
curl http://api.matthewcalabresi.com/servicenow/health
GET /servicenow/api/chatbot/priority-incidents Chatbot Optimized
Get P1/P2 incidents in chatbot-friendly format
Query Parameters:
priority=1,2 (default: 1,2) state=1,2,3,6,7 include_closed=true/false (default: false)
Example:
curl "http://api.matthewcalabresi.com/servicenow/api/chatbot/priority-incidents?priority=1&include_closed=false"
POST /servicenow/api/chatbot/incident-analysis Chatbot Optimized
Analyze incident and prepare data for New Relic correlation
Request Body:
{"ticket_id": "INC1234567"}
Example:
curl -X POST http://api.matthewcalabresi.com/servicenow/api/chatbot/incident-analysis -H "Content-Type: application/json" -d '{"ticket_id": "INC1234567"}'
GET /servicenow/api/chatbot/dashboard Chatbot Optimized
Get dashboard overview with incident counts and summaries
Example:
curl http://api.matthewcalabresi.com/servicenow/api/chatbot/dashboard
GET /servicenow/api/now/table/incident ServiceNow Standard
List incidents with ServiceNow query syntax
Query Parameters:
sysparm_query (e.g., "priority=1^active=true") sysparm_limit (default: 100) sysparm_offset (default: 0) sysparm_display_value (true/false)
Example:
curl "http://api.matthewcalabresi.com/servicenow/api/now/table/incident?sysparm_query=priorityIN1,2^active=true"
GET /servicenow/api/now/table/incident/by-number/{ticket_number} Custom
Get incident by ticket number (e.g., INC1234567)
Example:
curl http://api.matthewcalabresi.com/servicenow/api/now/table/incident/by-number/INC1234567
GET /servicenow/api/now/table/incident/{sys_id} ServiceNow Standard
Get incident by sys_id
Example:
curl http://api.matthewcalabresi.com/servicenow/api/now/table/incident/abc123
POST /servicenow/api/now/table/incident ServiceNow Standard
Create a new incident
Request Body:
{ "short_description": "Server outage", "priority": "1", "business_service": "Web Frontend" }
GET /servicenow/api/now/table/sys_user
List all users
Example:
curl http://api.matthewcalabresi.com/servicenow/api/now/table/sys_user
GET /servicenow/api/now/table/cmdb_ci
List all configuration items
Example:
curl http://api.matthewcalabresi.com/servicenow/api/now/table/cmdb_ci

📊 New Relic Mock API

Base path: /newrelic

GET /newrelic/health
Health check endpoint
Example:
curl http://api.matthewcalabresi.com/newrelic/health
POST /newrelic/v2/correlate Key Endpoint
Correlate ServiceNow ticket with New Relic metrics and infrastructure data
Request Body:
{ "ticket_id": "INC1234567", "service_affected": "user-service", "opened_at": "2024-01-15T10:30:00Z", "closed_at": "2024-01-15T12:45:00Z" }
Example:
curl -X POST http://api.matthewcalabresi.com/newrelic/v2/correlate -H "Content-Type: application/json" -d '{ "ticket_id": "INC1234567", "service_affected": "user-service", "opened_at": "2024-01-15T10:30:00Z" }'
GET /newrelic/v2/applications
List all monitored applications
Example:
curl http://api.matthewcalabresi.com/newrelic/v2/applications
GET /newrelic/v2/applications/{app_id}
Get specific application details
Example:
curl http://api.matthewcalabresi.com/newrelic/v2/applications/app_001
GET /newrelic/v2/applications/{app_id}/metrics
Get time-series metrics for an application
Query Parameters:
start_time (required, ISO 8601) end_time (required, ISO 8601) names (optional, metric names)
Example:
curl "http://api.matthewcalabresi.com/newrelic/v2/applications/app_001/metrics?start_time=2024-01-15T10:00:00Z&end_time=2024-01-15T12:00:00Z&names=response_time&names=error_rate"
GET /newrelic/v2/applications/{app_id}/status-history
Get service status history (for incident correlation)
Query Parameters:
start_time (required, ISO 8601) end_time (required, ISO 8601) service (optional, specific service name)
Example:
curl "http://api.matthewcalabresi.com/newrelic/v2/applications/app_002/status-history?start_time=2024-01-15T10:00:00Z&end_time=2024-01-15T12:00:00Z"
GET /newrelic/v2/alerts
Get current alerts
Query Parameters:
severity (optional: critical, warning, info) state (default: open)
Example:
curl "http://api.matthewcalabresi.com/newrelic/v2/alerts?severity=critical&state=open"
GET /newrelic/v2/events
Get deployment and infrastructure events
Query Parameters:
start_time (optional, ISO 8601) end_time (optional, ISO 8601)
Example:
curl "http://api.matthewcalabresi.com/newrelic/v2/events?start_time=2024-01-15T00:00:00Z"
GET /newrelic/v2/infrastructure
Get infrastructure component status
Example:
curl http://api.matthewcalabresi.com/newrelic/v2/infrastructure
GET /newrelic/v2/errors
Get error tracking data
Query Parameters:
app_id (optional) start_time (optional, ISO 8601) end_time (optional, ISO 8601)
Example:
curl http://api.matthewcalabresi.com/newrelic/v2/errors
GET /newrelic/v2/insights
Get AI-generated insights about system performance
Query Parameters:
app_id (optional)
Example:
curl http://api.matthewcalabresi.com/newrelic/v2/insights

🤖 Complete Chatbot Integration Example

End-to-end workflow for correlating ServiceNow incidents with New Relic data:

Step 1: Get P1/P2 Incidents
curl http://api.matthewcalabresi.com/servicenow/api/chatbot/priority-incidents
Step 2: Analyze Specific Incident
curl -X POST http://api.matthewcalabresi.com/servicenow/api/chatbot/incident-analysis -H "Content-Type: application/json" -d '{"ticket_id": "INC1234567"}'
Step 3: Get Correlated New Relic Data
curl -X POST http://api.matthewcalabresi.com/newrelic/v2/correlate -H "Content-Type: application/json" -d '{ "ticket_id": "INC1234567", "service_affected": "user-service", "opened_at": "2024-01-15T10:30:00Z", "closed_at": "2024-01-15T12:45:00Z" }'
Result:
Your chatbot now has: - ServiceNow incident details (priority, status, assigned to, etc.) - New Relic metrics during the incident window - Service status history - Related alerts - Baseline vs incident performance comparison

Mock API Server v1.0 | Built for Chatbot Development