ACME Corp

API Documentation

Complete API Reference Guide

Base URL
--
Total Endpoints
--
Collections
--
Authentication
API Key

Authentication

All /api/* endpoints require an API key sent via the x-api-key header.

cURL

curl -H "x-api-key: YOUR_KEY" https://your-host/api/hr/workers

Postman / HTTP Client

Add header: x-api-key: YOUR_KEY

Automation Tools

Add the x-api-key header to your HTTP requests. Most automation platforms support custom headers in their HTTP activities.

Non-API routes (/health, static files) do not require authentication. If API_KEY is not set on the server, authentication is bypassed (local dev mode).

HR Workers Management

Employee records, organizational hierarchy, and workforce analytics

Business Context

The HR Workers endpoints enable automation of employee data management, supporting use cases like:

  • Automated employee onboarding workflows
  • Organizational chart generation and reporting
  • Manager-direct report relationship tracking
  • Active employee monitoring and headcount analytics
GET /hr/workers

Retrieve all employee records in the system with complete profile information

Response Fields

Field Type Description
id UUID Unique identifier for the employee
descriptor String Employee's full name
primaryWorkEmail String Corporate email address
isActive Boolean Employment status (active/inactive)
department String Department name (R&D, Sales, Marketing, etc.)
primaryJob Object Job details including title, level, and salary
managerId UUID Direct manager's employee ID
location String Office location or remote status

Example Response

[
  {
    "id": "b5f3d421-8c9a-4e2b-a1d3-7f8e9c4b2a6d",
    "descriptor": "Sarah Johnson",
    "primaryWorkEmail": "sarah.johnson@company.com",
    "isActive": true,
    "managerId": "a2c4e6f8-1b3d-5a7c-9e2f-4d6b8c1a3e5f",
    "department": "R&D",
    "supervisoryOrgId": "org_RD",
    "primaryJob": {
      "title": "Senior Engineer",
      "department": "R&D",
      "level": "Senior",
      "salary": 95000
    },
    "startDate": "2023-03-15",
    "location": "San Francisco"
  }
]

Use Case: Build an employee directory bot that retrieves specific employee information based on natural language queries like "Find all senior engineers in R&D" or "Show me employees who report to John Smith"

GET /hr/workers/active Requires Client Filtering

Get only active employees (returns all workers - filter by isActive=true client-side)

Tip

This endpoint demonstrates client-side filtering. Use a Filter Data Table activity, LINQ expression, or equivalent to filter where isActive = true. This simulates real-world scenarios where API endpoints return more data than needed.

GET /hr/workers/:id

Retrieve detailed information for a specific employee by their ID

Path Parameters

Parameter Type Description
id UUID Employee's unique identifier
GET /hr/workers/:id/directReports Requires Client Filtering

Get all direct reports for a manager (returns all workers - filter by managerId client-side)

HR Performance Management

Performance reviews, ratings, goals tracking, and employee development

Business Context

Performance management endpoints support:

  • Automated performance review reminders and scheduling
  • Identification of high performers and those needing support
  • Goal completion tracking and progress monitoring
  • Performance trend analysis for compensation planning
GET /hr/performance

Retrieve all performance review records for the current period

Response Fields

Field Type Description
workerId UUID Employee being reviewed
period String Review period (e.g., "2025-Q2")
rating String Performance rating (Outstanding/Exceeds/Meets/Below)
score Float Numerical score (2.5-5.0)
goalsCompleted Integer Number of completed goals
nextReviewDate Date Next scheduled review date

HR Onboarding Management

New employee onboarding tracking, equipment assignment, and progress monitoring

Business Context

Onboarding endpoints enable:

  • Automated onboarding task tracking and completion
  • Equipment and access provisioning workflows
  • Buddy assignment and mentorship coordination
  • Onboarding bottleneck identification and resolution
GET /hr/onboarding

Retrieve all employee onboarding records with progress tracking

Response Fields

Field Type Description
workerId UUID New employee's ID
status String Onboarding status (pending/in_progress/completed)
completedTasks Integer Number of completed onboarding tasks
totalTasks Integer Total number of onboarding tasks
equipmentAssigned Boolean Whether equipment has been assigned
accessGranted Boolean System access provisioning status
assignedBuddy UUID Assigned buddy/mentor employee ID

Tip

Combine this with the /hr/workers endpoint to create a comprehensive onboarding dashboard that shows employee names, departments, and progress percentages. Calculate risk scores based on days in onboarding and completion rates.

Finance Invoice Management

Invoice processing, approval workflows, vendor payments, and financial controls

Business Context

Invoice management endpoints support:

  • Three-way matching automation (PO, receipt, invoice)
  • Approval routing based on amount thresholds
  • Vendor payment optimization and cash flow management
  • Duplicate invoice detection and fraud prevention
GET /finance/invoices

Retrieve all invoices with vendor, amount, and approval status information

Response Fields

Field Type Description
id String Invoice number (INV-XXXXX format)
vendorName String Vendor/supplier name
amount Float Invoice amount
status String Status (pending/approved/paid/rejected/overdue)
dueDate Date Payment due date
category String Expense category
PATCH /finance/invoices/:id/approve

Approve an invoice for payment processing

Request Body

{
  "status": "approved",
  "approvedBy": "manager-id",
  "approvalNotes": "Verified against PO-12345"
}

Use Case: Create an intelligent invoice approval bot that routes invoices based on amount thresholds: Under $5,000 (auto-approve), $5,000-$25,000 (manager approval), Over $25,000 (C-level approval)

CRM Customer Management

Customer accounts, health scores, relationship tracking, and churn prevention

Business Context

Customer management endpoints enable:

  • Customer health score monitoring and alerts
  • Churn prediction and prevention workflows
  • Account segmentation for targeted campaigns
  • Customer success automation and engagement tracking
GET /crm/customers

Retrieve all customer accounts with health scores and contract information

Response Fields

Field Type Description
id String Customer ID (CUST-XXXXX format)
companyName String Customer company name
status String Status (active/prospect/churned/at_risk)
tier String Customer tier (Enterprise/Mid-Market/SMB)
healthScore Integer Customer health score (1-100)
contractValue Float Annual contract value
renewalDate Date Contract renewal date

Tip

Combine customer data with support tickets (/crm/support/tickets) and relationship metrics (/analytics/customer/relationships) to calculate a comprehensive customer health score that predicts churn risk.

IoT Device Management

Device inventory, status monitoring, assignments, and remote management

Business Context

IoT device endpoints support:

  • Real-time device health monitoring and alerts
  • Predictive maintenance scheduling
  • Battery optimization and replacement planning
  • Location-based device management and assignments
GET /iot/devices

Retrieve all IoT devices with status, location, and maintenance information

Response Fields

Field Type Description
id String Device ID (DEV-XXXXXX format)
type String Device type (sensor/camera/detector)
status String Status (online/offline/maintenance)
battery Integer Battery level percentage
location String Physical location
nextMaintenance Date Next scheduled maintenance
GET /iot/devices/:id/telemetry

Get real-time telemetry data from a specific device (dynamically generated)

Use Case: Build a predictive maintenance workflow that monitors device battery levels and telemetry data, automatically creating maintenance tickets when batteries drop below 20% or anomalies are detected

Reports & Analytics

Business intelligence, KPI dashboards, and executive reporting

Business Context

Reporting endpoints provide:

  • Executive dashboards with cross-functional KPIs
  • Department-level performance analytics
  • Financial summaries and trend analysis
  • Employee productivity and utilization metrics
GET /reports/employee/summary

Get comprehensive employee analytics by department including headcount, tenure, and turnover

Response Fields

Field Type Description
department String Department name
headcount Integer Total employees in department
activeEmployees Integer Active employee count
avgTenure Float Average employee tenure in years
avgSalary Float Average department salary
turnoverRate Float Annual turnover percentage

Workflow Automation

Process automation triggers, workflow monitoring, and orchestration

Business Context

Workflow endpoints enable:

  • Process automation monitoring and health checks
  • Workflow performance optimization
  • Error handling and retry management
  • Cross-system orchestration tracking
GET /workflows/triggers

Get all workflow automation triggers with execution metrics

Response Fields

Field Type Description
workflowName String Workflow process name
triggerType String Type (manual/scheduled/event-driven)
status String Status (active/paused/error)
successRate Float Success percentage
avgExecutionTime Integer Average runtime in seconds

Tip

Use this endpoint to create a workflow health monitoring dashboard that alerts when success rates drop below 90% or execution times exceed thresholds, enabling proactive automation maintenance.

ITSM Incident Management

IT incident tracking, assignment, escalation, and resolution workflows. Open ITSM Console →

Business Context

The ITSM Incident endpoints enable automation of IT support workflows, including:

  • Automated incident creation from monitoring systems
  • Intelligent ticket routing based on category and team skills
  • SLA monitoring and escalation automation
  • Knowledge-base-driven auto-resolution
GET /itsm/incidents

Retrieve all incidents in the ITSM system with full details including caller info, assignment, SLA targets, and work notes

GET /itsm/incidents/:id

Get specific incident details by ID (e.g., INC-001)

PATCH /itsm/incidents/:id

General-purpose partial update for any incident field. Read-only fields (id, createdAt, notes, attachments) are ignored. Priority auto-recalculates if impact or urgency change.

Example Request Body

{
  "status": "In Progress",
  "impact": "High",
  "urgency": 2,
  "assignmentGroup": "Network Operations",
  "assignedTo": "Jane Doe",
  "description": "Updated description with new findings"
}

Example Response

{
  "message": "Incident INC-001 updated successfully",
  "incident": { "..." },
  "changes": [
    { "field": "status", "from": "New", "to": "In Progress" },
    { "field": "impact", "from": 3, "to": 1 },
    { "field": "priority", "from": "P3", "to": "P1" }
  ]
}

Note: Accepts string values ("High", "Medium", "Low") or numeric (1–4) for impact and urgency. Any subset of fields can be sent — only provided fields are updated.

POST /itsm/incidents

Create a new incident with auto-priority calculation from impact and urgency scores

Example Request Body

{
  "title": "Email service unavailable",
  "description": "Users reporting inability to send/receive emails since 9am",
  "impact": 2,
  "urgency": 1,
  "category": "Email",
  "callerName": "John Smith",
  "callerEmail": "john.smith@acme.com"
}
PATCH /itsm/incidents/:id/status

Update incident status (enforces valid workflow transitions: New → Open → In Progress → Pending → Resolved → Closed)

POST /itsm/incidents/:id/notes

Add a work note to an incident for tracking investigation progress and communication

POST /itsm/incidents/:id/assign

Assign incident to a team or technician

POST /itsm/incidents/:id/escalate

Escalate an incident to a higher priority level or management tier

POST /itsm/incidents/:id/resolve

Resolve incident with resolution code and notes

POST /itsm/incidents/:id/link

Link an incident to other records (problems, changes, or other incidents) for cross-referencing

GET /itsm/incidents/stats

Get incident statistics: counts by status/priority, SLA compliance rates, average resolution times

Use Case: Build an intelligent incident triage bot that auto-classifies incoming incidents, searches the knowledge base for matching solutions, and either auto-resolves with KB articles or routes to the appropriate team based on category and skill matching.

ITSM Change Management

Change request lifecycle, CAB approvals, and implementation tracking

GET /itsm/changes

Get all change requests with full details including risk assessment, implementation plans, and approval status

POST /itsm/changes

Create a new change request (Standard, Normal, or Emergency)

PATCH /itsm/changes/:id/status

Update the status of a change request (enforces valid workflow transitions)

POST /itsm/changes/:id/approve

CAB approve a change request with approver and comments

POST /itsm/changes/:id/reject

Reject a change request with reason and comments from a CAB reviewer

POST /itsm/changes/:id/implement

Start implementation of an approved change request, transitioning it to active work

POST /itsm/changes/:id/complete

Mark a change request as completed after successful implementation

GET /itsm/changes/calendar

Get change calendar grouped by scheduled date for conflict detection

GET /itsm/changes/stats

Get change management statistics: counts by type/status, approval rates, and success metrics

Use Case: Automate change approval workflows by checking policies, risk levels, and scheduling conflicts. Auto-approve low-risk standard changes and route high-risk changes to CAB for approval.

ITSM Service Requests

Service request submission, approval workflows, and fulfillment tracking with 12 catalog items

GET /itsm/requests

Get all service requests with full lifecycle details (submission, approval, fulfillment, closure)

POST /itsm/requests

Create a new service request from the catalog (laptops, software, VPN access, peripherals, etc.)

PATCH /itsm/requests/:id/status

Update service request status (enforces valid workflow transitions)

POST /itsm/requests/:id/approve

Approve a pending service request

POST /itsm/requests/:id/reject

Reject a service request with reason and comments

POST /itsm/requests/:id/fulfill

Mark a service request as fulfilled after completing the requested work

POST /itsm/requests/:id/assign

Assign a service request to a team or technician for fulfillment

POST /itsm/requests/:id/notes

Add a work note to a service request for tracking progress and communication

GET /itsm/requests/stats

Get service request statistics: counts by status/category, average fulfillment times

GET /itsm/requests/pending-approval

Get all service requests that are waiting for approval

GET /itsm/catalog

Get all 12 service catalog items with form fields, approval requirements, fulfillment times, and costs

Use Case: Build a self-service request automation that reads the service catalog, creates requests with proper form data, routes for approval, and tracks fulfillment status.

ITSM Problem Management

Root cause analysis, known error tracking, and incident-to-problem linking

GET /itsm/problems

Get all problem records with root cause analysis details and linked incidents

POST /itsm/problems

Create a new problem record for root cause investigation

PATCH /itsm/problems/:id/status

Update problem status (enforces valid workflow transitions)

PATCH /itsm/problems/:id/root-cause

Update the root cause analysis for a problem record

POST /itsm/problems/:id/link-incident

Link one or more incidents to a problem record for tracking related occurrences. Supports multiple input formats for flexibility.

Request Body Options

// Option 1: Array of IDs (preferred for multiple)
{ "incidentIds": ["INC-001", "INC-002", "INC-003"] }

// Option 2: Semicolon-separated string
{ "incidentIds": "INC-001; INC-002; INC-003" }

// Option 3: Single ID (backward compatible)
{ "incidentId": "INC-001" }

// Option 4: Comma/semicolon-separated via incidentId
{ "incidentId": "INC-001, INC-002; INC-003" }

Example Response

{
  "message": "Linked 3 incident(s) to problem PRB-001",
  "problem": { "..." },
  "linked": ["INC-001", "INC-002", "INC-003"],
  "linkedCount": 3,
  "notFound": []
}
POST /itsm/problems/:id/unlink-incident

Unlink an incident from a problem record. Also clears the incident's back-reference to this problem.

Request Body

{ "incidentId": "INC-001" }

Example Response

{
  "success": true,
  "message": "INC-001 unlinked from PRB-001",
  "data": { "..." }
}
GET /itsm/problems/known-errors

Get all known errors with documented workarounds for self-service resolution

Use Case: Automate problem identification by analyzing recurring incidents, creating problem records, linking related incidents, and tracking root cause analysis through to resolution.

ITSM Asset Management / CMDB

Configuration management database, asset lifecycle tracking, and inventory management

GET /itsm/assets

Get all CMDB assets (workstations, servers, network devices, printers, mobile devices)

POST /itsm/assets

Create a new asset record in the CMDB

PATCH /itsm/assets/:id/status

Update asset status (e.g., Active, In Maintenance, Retired, Decommissioned)

GET /itsm/assets/by-type/:type

Filter assets by type (e.g., workstation, server, network, printer, mobile)

GET /itsm/assets/:id/history

Get the change history and audit trail for a specific asset

GET /itsm/assets/stats

Get asset statistics: counts by type/status, warranty expiration summaries

Use Case: Automate asset lifecycle management by tracking inventory, monitoring warranty expirations, and linking assets to incidents for impact analysis.

ITSM Knowledge Base

Knowledge article management, search, publishing workflows, and usage analytics

GET /itsm/knowledge

Get all knowledge base articles for context grounding and self-service automation

POST /itsm/knowledge

Create a new knowledge base article (draft status by default)

PATCH /itsm/knowledge/:id/publish

Publish a draft knowledge base article, making it available for search and self-service

PATCH /itsm/knowledge/:id/archive

Archive an outdated knowledge base article

POST /itsm/knowledge/:id/helpful

Mark a knowledge article as helpful (increments helpfulness counter for ranking)

POST /itsm/knowledge/:id/view

Track a view on a knowledge article (increments view counter for analytics)

GET /itsm/knowledge/search?q=keyword

Search knowledge base by keyword (searches titles, content, and tags)

Use Case: Build an AI-powered IT support agent that uses knowledge base search for context grounding, checks asset details from the CMDB, and provides intelligent responses to user queries with relevant articles and troubleshooting steps.

ITSM Reports & Analytics

Cross-module reporting for incidents, SLA compliance, team performance, changes, and request fulfillment

GET /itsm/reports/incident-summary

Get incident summary report with breakdowns by status, priority, category, and trends

GET /itsm/reports/sla-compliance

Get SLA compliance report with response/resolution metrics and breach analysis

GET /itsm/reports/team-performance

Get team performance report with workload distribution, resolution rates, and response times per team

GET /itsm/reports/change-success-rate

Get change success rate report with implementation outcomes and rollback statistics

GET /itsm/reports/request-fulfillment

Get request fulfillment report with average fulfillment times, approval rates, and catalog item popularity

Use Case: Build an executive dashboard that aggregates ITSM reports into actionable insights, highlighting SLA breaches, team bottlenecks, and change failure trends for management review.

ITSM Audit, Notifications & Configuration

Audit trail, notification management, runbook execution, dashboard stats, teams, and demo reset

GET /itsm/dashboard/stats

Get aggregate dashboard statistics across all ITSM modules (incidents, changes, requests, assets)

GET /itsm/audit-log/recent

Get recent audit log entries showing all actions performed across ITSM modules

GET /itsm/audit-log/by-target/:targetId

Get audit log entries for a specific target record (e.g., INC-001, CHG-002)

GET /itsm/audit-log/by-actor/:actor

Get audit log entries for a specific actor (user or system) to track their actions

PATCH /itsm/notifications/:id/read

Mark a specific notification as read

POST /itsm/notifications/mark-all-read

Mark all notifications as read in bulk

POST /itsm/runbooks/:id/execute

Execute a runbook (predefined automated procedure) for incident remediation or maintenance tasks

GET /itsm/teams /itsm/technicians /itsm/policies

Get support teams, technicians with skills/workload, and IT governance policies

POST /itsm/reset

Reset all ITSM demo data back to its initial state (useful for workshop resets between sessions)

Use Case: Build compliance and audit automation that tracks all ITSM changes, monitors notification delivery, and executes runbooks for automated remediation workflows.

Quick Reference

Common patterns and integration tips

Common Integration Patterns

  • Data Enrichment: Combine multiple endpoints (e.g., workers + performance + onboarding) to create comprehensive views
  • Filtering Pattern: Endpoints marked with "Requires Client Filtering" return all data - filter client-side using your automation tool
  • Approval Workflows: Use PATCH endpoints to update statuses after business logic evaluation
  • Real-time Monitoring: Poll telemetry and alert endpoints on schedules for proactive issue detection

Automation Scenarios

  1. Employee Onboarding Dashboard: Combine HR endpoints to track new employee progress and identify bottlenecks
  2. Invoice Approval Automation: Route invoices based on amounts and vendor risk scores
  3. Customer Health Monitoring: Calculate risk scores using support tickets, engagement metrics, and renewal dates
  4. IoT Predictive Maintenance: Monitor device telemetry and create maintenance tickets before failures
  5. IT Incident Automation: Triage incidents, search knowledge base, auto-resolve or route to teams based on skills
  6. Change Approval Workflow: Check risk levels, validate against policies, auto-approve or escalate to CAB
  7. AI IT Support Agent: Use knowledge search for context grounding, CMDB for asset details, and incident APIs for ticket management