Source profileQuality 92/100

WYRE-AI/msp-claude-plugins/msp-claude-plugins/connectwise/automate/skills/api-patterns/SKILL.md

ConnectWise Automate API Patterns

ConnectWise Automate REST API fundamentals: integrator and user+2FA authentication, token lifecycle, pagination, OData-style filtering, rate limiting, and error handling patterns for API integration.

Source repository stars
42
Declared platforms
0
Static risk flags
1
Last source update
2026-08-28
Source checked
2026-08-28

Decision brief

What it does: where it fits

ConnectWise Automate REST API fundamentals: integrator and user+2FA authentication, token lifecycle, pagination, OData-style filtering, rate limiting, and error handling patterns for API integration.

Best for

    Not for

    • Tasks that require unconfirmed production actions or broad system permissions.
    • Environments where the pinned source and install steps cannot be inspected.

    Compatibility matrix

    Platform support, with evidence labels

    PlatformStatusEvidenceWhat to check
    CodexNot declaredNo explicit evidencePortability before use
    Claude CodeNot declaredNo explicit evidencePortability before use
    CursorNot declaredNo explicit evidencePortability before use
    Gemini CLINot declaredNo explicit evidencePortability before use
    Open the compatibility checker

    Installation

    Inspect first. Install second.

    The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

    Source-detected install commandSource
    npx skills add https://github.com/WYRE-AI/msp-claude-plugins --skill "msp-claude-plugins/connectwise/automate/skills/api-patterns"
    Safe inspection promptEditorial

    Inspect the Agent Skill "ConnectWise Automate API Patterns" from https://github.com/WYRE-AI/msp-claude-plugins/blob/5005f73ba2f52cd299f58aa6bb79f4e70ae87103/msp-claude-plugins/connectwise/automate/skills/api-patterns/SKILL.md at commit 5005f73ba2f52cd299f58aa6bb79f4e70ae87103. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

    Workflow

    What the source asks the agent to do

    1. 01

      Anti-triggers

      "ConnectWise" is an umbrella brand over three products with three unrelated APIs. Loading the wrong one produces auth failures that read like permission problems:

      ConnectWise PSA (Manage) — hosted atConnectWise CPQ (Sell/Quosal) — its own host and credential set"ConnectWise" is an umbrella brand over three products with three unrelated APIs. Loading the wrong one produces auth failures that read like permission problems:
    2. 02

      Key Concepts

      Replace {automate-server} with your Automate server hostname.

      Token Expiry: Typically 4 hours (configurable on server)Refresh Strategy: Request new token before expiryStorage: Cache token securely, reuse until near expiry
    3. 03

      API Base URL

      Replace {automate-server} with your Automate server hostname.

      Replace {automate-server} with your Automate server hostname.
    4. 04

      Authentication Methods

      Review the “Authentication Methods” section in the pinned source before continuing.

      Review and apply the “Authentication Methods” source section.
    5. 05

      Authentication Flow

      Review the “Authentication Flow” section in the pinned source before continuing.

      Review and apply the “Authentication Flow” source section.

    Permission review

    Static risk signals and limitations

    Network access

    medium · line 27

    The documentation includes network, browsing, or remote request actions.

    https://{automate-server}/cwa/api/v1/

    Evidence record

    Why each signal appears

    EvidenceSourceComputedTestedEditorial
    SignalValueEvidence typeMeaning
    Quality score92/100ComputedDocumentation, specificity, maintenance, and trust rules
    Repository stars42SourceRepository attention, not individual Skill quality
    Compatibility0 platformsSourceDeclared in the catalog source record
    Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

    Pinned source

    Provenance and original SKILL.md

    Repository
    WYRE-AI/msp-claude-plugins
    Skill path
    msp-claude-plugins/connectwise/automate/skills/api-patterns/SKILL.md
    Commit
    5005f73ba2f52cd299f58aa6bb79f4e70ae87103
    License
    Apache-2.0
    Collected
    2026-08-28
    Default branch
    main
    View the original SKILL.md

    ConnectWise Automate API Patterns

    Overview

    The ConnectWise Automate REST API v1 provides programmatic access to computers, clients, scripts, monitors, alerts, and more. This skill covers authentication, token management, pagination, filtering, error handling, and performance optimization patterns.

    Anti-triggers

    "ConnectWise" is an umbrella brand over three products with three unrelated APIs. Loading the wrong one produces auth failures that read like permission problems:

    • ConnectWise PSA (Manage) — hosted at api-*.myconnectwise.net/{codebase}/apis/3.0/, authenticated with public/private key plus a clientId header, and filtered with plural conditions=. An Automate bearer token will not authenticate against it. Use connectwise-psa-api-patterns.
    • ConnectWise CPQ (Sell/Quosal) — its own host and credential set again; use connectwise-cpq-api-patterns.

    Key Concepts

    API Base URL

    https://{automate-server}/cwa/api/v1/
    

    Replace {automate-server} with your Automate server hostname.

    Authentication Methods

    MethodDescriptionUse Case
    IntegratorServer-to-server credentialsAPI integrations, automation
    User + 2FAUser credentials with optional MFAUser-context operations

    Authentication Flow

    ┌─────────────┐     1. POST /APICredentials     ┌─────────────────────┐
    │   Client    │ ─────────────────────────────>  │  Automate Server    │
    │             │     (username + password)       │                     │
    │             │ <─────────────────────────────  │                     │
    └─────────────┘     2. Access Token + Expiry    └─────────────────────┘
           │
           │  3. API Request with Authorization Header
           ▼
    ┌───────────────────────────────────────────────────────────────────┐
    │  GET /cwa/api/v1/Computers                                        │
    │  Authorization: Bearer <access_token>                             │
    └───────────────────────────────────────────────────────────────────┘
    

    Token Lifecycle

    • Token Expiry: Typically 4 hours (configurable on server)
    • Refresh Strategy: Request new token before expiry
    • Storage: Cache token securely, reuse until near expiry

    Field Reference

    Environment Variables

    # Integrator credentials (recommended for automation)
    export CONNECTWISE_AUTOMATE_SERVER="automate.example.com"
    export CONNECTWISE_AUTOMATE_USERNAME="integrator-username"
    export CONNECTWISE_AUTOMATE_PASSWORD="integrator-password"
    
    # User credentials with optional 2FA
    export CONNECTWISE_AUTOMATE_SERVER="automate.example.com"
    export CONNECTWISE_AUTOMATE_USER="username"
    export CONNECTWISE_AUTOMATE_PASS="password"
    export CONNECTWISE_AUTOMATE_2FA="optional-2fa-key"
    

    Token Response Fields

    interface TokenResponse {
      AccessToken: string;          // Bearer token for API requests
      TokenType: string;            // "Bearer"
      ExpiresIn: number;            // Seconds until expiry
      RefreshToken: string;         // Token for refresh (if enabled)
      UserID: number;               // Authenticated user ID
      Username: string;             // Authenticated username
    }
    

    API Patterns

    Token Acquisition - Integrator

    POST /cwa/api/v1/APICredentials
    Content-Type: application/json
    
    {
      "Username": "{integrator-username}",
      "Password": "{integrator-password}"
    }
    

    Response:

    {
      "AccessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
      "TokenType": "Bearer",
      "ExpiresIn": 14400,
      "UserID": 1,
      "Username": "integrator"
    }
    

    Token Acquisition - User with 2FA

    POST /cwa/api/v1/APICredentials
    Content-Type: application/json
    
    {
      "Username": "{username}",
      "Password": "{password}",
      "TwoFactorCode": "{6-digit-code}"
    }
    

    Request Headers

    HeaderValueDescription
    AuthorizationBearer {token}Required for all API requests
    Content-Typeapplication/jsonRequired for POST/PUT/PATCH
    Acceptapplication/jsonResponse format

    Token Refresh

    POST /cwa/api/v1/APICredentials/Refresh
    Content-Type: application/json
    
    {
      "RefreshToken": "{refresh-token}"
    }
    

    Pagination

    ConnectWise Automate uses offset-based pagination with lowercase page/pageSize query parameters (max pageSize is 1000):

    ParameterTypeDefaultMaxDescription
    pageinteger1-Page number (1-based)
    pageSizeinteger501000Items per page
    GET /cwa/api/v1/Computers?page=1&pageSize=100
    Authorization: Bearer {token}
    

    Track pagination via response headers rather than assuming page count:

    HeaderDescription
    X-Total-CountTotal number of items
    X-PageCurrent page number
    X-Page-SizeItems per page
    X-Total-PagesTotal number of pages

    See references/examples.md for a complete fetchAllComputers pagination loop that reads X-Total-Pages and paces requests to respect rate limits.

    Filtering with OData

    ConnectWise Automate supports OData-style filtering with the condition parameter.

    Filter Operators

    OperatorDescriptionExample
    =EqualStatus = 'Online'
    !=Not equalStatus != 'Offline'
    >Greater thanComputerID > 100
    <Less thanTotalMemory < 4096
    >=Greater or equalSeverity >= 3
    <=Less or equalDiskFreePercent <= 10
    containsString containsName contains 'DC'
    startswithString starts withName startswith 'ACME'
    endswithString ends withName endswith '01'
    inValue in listStatus in ('Online','Offline')

    Logical Operators

    OperatorDescriptionExample
    andLogical ANDStatus = 'Online' and ClientID = 100
    orLogical ORStatus = 'Offline' or Status = 'Unknown'
    notLogical NOTnot (Status = 'Offline')

    Filter Examples

    # Computers that are online
    GET /cwa/api/v1/Computers?condition=Status = 'Online'
    
    # Computers for a specific client
    GET /cwa/api/v1/Computers?condition=ClientID = 100
    
    # Windows servers that are online
    GET /cwa/api/v1/Computers?condition=OS contains 'Server' and Status = 'Online'
    
    # Computers with names starting with "ACME"
    GET /cwa/api/v1/Computers?condition=Name startswith 'ACME'
    
    # Alerts with severity 3 or higher
    GET /cwa/api/v1/Alerts?condition=Severity >= 3
    
    # Active alerts for a client
    GET /cwa/api/v1/Alerts?condition=ClientID = 100 and Status in ('New','Active')
    
    # Offline computers with recent contact
    GET /cwa/api/v1/Computers?condition=Status = 'Offline' and LastContact >= '2024-02-14'
    

    URL Encoding

    Always URL-encode the condition parameter:

    const condition = "Status = 'Online' and ClientID = 100";
    const url = `/Computers?condition=${encodeURIComponent(condition)}`;
    

    Rate Limiting

    ConnectWise Automate enforces rate limits to protect server resources (~60 requests per minute, ~10 concurrent; daily limits vary by config). Exceeding them returns HTTP 429.

    HeaderDescription
    X-RateLimit-LimitMax requests per window
    X-RateLimit-RemainingRemaining requests
    X-RateLimit-ResetSeconds until reset
    Retry-AfterSeconds to wait (on 429)

    On a 429, read Retry-After and wait before retrying; on a 5xx, retry with exponential backoff. See references/examples.md for a requestWithRetry implementation.

    Error Handling

    Common statuses: 401 (token expired - re-authenticate), 403 (permission denied), 404 (not found), 429 (rate limited - see Rate Limiting above), 500/503 (retry with backoff). Error responses are shaped as { "error": { "code", "message", "details" } }.

    See references/errors.md for the complete HTTP status code table, error response format, and a reusable AutomateAPIError/handleApiResponse error-handling pattern.

    Complete API Client

    A full ConnectWiseAutomateClient class that combines token caching, retry-with-backoff, and pagination-aware request methods (getComputers, getClients, getAlerts, runScript) is available in references/examples.md.

    Best Practices

    1. Cache tokens - Reuse tokens until near expiry
    2. Use integrator credentials - More reliable for automation
    3. Implement rate limiting - Stay under ~60 req/min
    4. Use pagination - Always handle multiple pages
    5. Filter at API level - Use condition parameter, not client-side filtering
    6. Handle errors gracefully - Implement retry with backoff
    7. URL-encode conditions - Prevent syntax errors
    8. Log API calls - Enable debugging and audit trails
    9. Validate inputs - Check data before sending

    Common Query Patterns

    Get All Online Computers for Client

    const computers = await client.getComputers(
      "ClientID = 100 and Status = 'Online'"
    );
    

    Get Critical Alerts

    const alerts = await client.getAlerts(
      "Severity >= 3 and Status in ('New','Active')"
    );
    

    Search Computers by Name

    const computers = await client.getComputers(
      "Name contains 'DC'"
    );
    

    Get Recently Offline Computers

    const yesterday = new Date(Date.now() - 86400000).toISOString();
    const computers = await client.getComputers(
      `Status = 'Offline' and LastContact >= '${yesterday}'`
    );
    

    Batch Operations with Rate Limiting

    async function batchProcess(items, processor, { batchSize = 10, delayMs = 1000 }) {
      const results = [];
    
      for (let i = 0; i < items.length; i += batchSize) {
        const batch = items.slice(i, i + batchSize);
    
        // Process batch in parallel
        const batchResults = await Promise.all(
          batch.map(item => processor(item).catch(e => ({ error: e.message })))
        );
        results.push(...batchResults);
    
        // Respect rate limits between batches
        if (i + batchSize < items.length) {
          await sleep(delayMs);
        }
      }
    
      return results;
    }
    

    Related Skills

    Frequently asked questions

    What to verify before installation and use

    What does the ConnectWise Automate API Patterns source document cover?

    ConnectWise Automate REST API fundamentals: integrator and user+2FA authentication, token lifecycle, pagination, OData-style filtering, rate limiting, and error handling patterns for API integration.

    How do I install ConnectWise Automate API Patterns?

    The source record exposes this install command: npx skills add https://github.com/WYRE-AI/msp-claude-plugins --skill "msp-claude-plugins/connectwise/automate/skills/api-patterns". Inspect the command and pinned source before running it.

    Which permission-related actions were detected?

    Static rules flagged network in the source; the page lists the matching lines and excerpts.

    Alternatives

    Compare before choosing

    Computed 10029,236

    garrytan/gbrain

    bulk-ingestion

    End-to-end discipline for turning any large data source (audio libraries, email takeouts, document corpora, chat exports, API dumps) into brain pages at scale. The lifecycle spine: SCHEMA → ACCESS → TRIAL → EVALUATE → IMPROVE → CODIFY → TEST → SKILLIFY → BULK → MONITOR. State is tracked in a durable JSON manifest (see MANIFEST-PATTERN.md) so any crash, session boundary, or subagent fan-out resumes from ground truth instead of memory.

    Computed 10025,136

    alirezarezvani/claude-skills

    app-store-optimization

    App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

    Computed 1005,277

    dotnet/skills

    migrate-vstest-to-mtp

    Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing

    Computed 100147

    oaustegard/claude-skills

    featuring

    Generate hierarchical _FEATURES.md files that describe what a codebase DOES from a user/consumer perspective, anchored to source symbols via tree-sitting. Supports large complex codebases through feature-driven decomposition into sub-feature files. Uses a multi-pass synthesis: orientation → detail → overview rewrite. Use when someone says "what does this do", "document features", "feature inventory", "_FEATURES.md", or needs to understand a codebase's purpose before modifying it. Complements tre