/halopsa:api-patternsfrom halopsa
Explains HaloPSA REST API patterns: OAuth 2.0 client-credentials auth, tenant parameter, filtering, pagination, array-wrapped POST bodies, rate-limits, scopes, and error codes.
Ships in halopsa. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The HaloPSA REST API provides access to all PSA entities including tickets, clients, assets, contracts, and more. This skill covers OAuth 2.0 Client Credentials authentication, tenant configuration, query patterns, pagination, and error handling.
HaloPSA uses OAuth 2.0 Client Credentials flow for API authentication. This is different from basic API key authentication - you must obtain an access token before making API requests.
HaloPSA has two server URLs:
| Server | Purpose | Example |
|---|---|---|
| Authorization Server | Token endpoint | https://yourcompany.halopsa.com/auth |
| Resource Server | API endpoints | https://yourcompany.halopsa.com/api |
Find these in Configuration > Integrations > HaloPSA API > API Details.
POST https://{base_url}/auth/token?tenant={tenant_name}
Form-encoded body with grant_type=client_credentials, client_id, client_secret, and scope. The tenant query parameter is required for cloud-hosted instances and omitted for self-hosted. Tokens are returned with an expires_in (typically 3600s) - cache them and refresh with a buffer before expiry.
See references/auth.md for the full token request/response, parameter table, environment configuration, a caching token-manager class, and the scope catalog.
GET /api/Tickets
Authorization: Bearer {access_token}
Content-Type: application/json
| Instance Type | URL Pattern |
|---|---|
| Cloud-hosted | https://{company}.halopsa.com/api |
| Self-hosted | https://{your-server}/api |
Filters are plain query parameters, e.g. GET /api/Tickets?client_id=123&status_id=1&tickettype_id=5. Date ranges use _start / _end suffixes on the date field (dateoccurred_start, dateoccurred_end).
See references/api.md for the endpoint catalog, the full query-parameter table, and complete CRUD request shapes.
| Parameter | Type | Default | Description |
|---|---|---|---|
page_no | int | 1 | Page number (1-based) |
page_size | int | 50 | Results per page |
count | int | - | Total count (in response) |
GET /api/Tickets?page_no=1&page_size=100
Results come back under a key named for the entity (not a generic data/items key), alongside record_count:
{
"record_count": 523,
"tickets": [
{ "id": 1, "summary": "..." },
{ "id": 2, "summary": "..." }
]
}
See references/examples.md for a full pagination loop, retry, and batch-processing implementations.
id field to update an existing record instead of creating one.DELETE /api/{Entity}/{id}, but not all entities support it.HaloPSA rate limits return HTTP 429 Too Many Requests, sometimes with a Retry-After header and a JSON body carrying retry_after seconds. Back off for the indicated interval plus jitter, and space bulk operations into batches with a delay between them.
| Code | Meaning | Action |
|---|---|---|
| 200 | Success | Process response |
| 201 | Created | Entity created |
| 400 | Bad Request | Check request format/values |
| 401 | Unauthorized | Refresh token or check credentials |
| 403 | Forbidden | Check permissions |
| 404 | Not Found | Entity doesn't exist |
| 429 | Rate Limited | Implement backoff |
| 500 | Server Error | Retry with backoff |
Validation errors (400) return a details array naming the offending field and reason. See references/api.md for the error and rate-limit response shapes, and references/examples.md for a status-code dispatch handler.
expires_in duration; refresh before expiry rather than per-requestCause: Client credentials are incorrect or application is disabled.
Fix:
Cause: Incorrect or missing tenant parameter.
Fix:
Cause: Token used with wrong server URL.
Fix: Ensure Resource Server URL is correct (/api path).
What SKILL.md sets; muted values are Claude Code's defaults
When authenticating to or calling the HaloPSA REST API directly or through MCP tools. Use when: halopsa api, halopsa authentication, halopsa oauth, halopsa token, halopsa query, halopsa pagination, halopsa rate limit, halopsa rest, or halo api.
Three short reads, in order
halopsa, oauth2, rest-api, pagination, filtering, api-authentication
npx claudepluginhub wyre-ai/msp-claude-plugins --plugin halopsa7 skills in this plugin
/agentsHaloPSA AgentsHaloPSA agents (technicians) and teams as a read-only MCP surface: listing technicians, retrieving agent detail, listing team structures, and the inactive-agent filter. Agent IDs resolved here are what ticket assignment needs./assetsHaloPSA AssetsHaloPSA asset/CMDB data model: asset (configuration item) fields, device types and statuses, links to clients, sites, users, tickets, and contracts, plus parent-child asset relationships. Covers the Asset API surface, hardware lifecycle workflows, RMM auto-sync and device matching, and validation errors.
/Other plugins' skills for the same job