Actions67
- Account Actions
- Asset Actions
- Asset Type Actions
- Base Data Actions
- Call Actions
- Contact Actions
- Contract Actions
- Crew Actions
- Document Actions
- Employee Actions
- Hours Actions
- Hour Type Actions
- Work Order Actions
Base Data → Get Departments
AI-generatedSummary
Retrieves departments from the McMain Base Data API, allowing optional request configuration such as batching, SSL handling, proxy, and timeout.
Inputs
- requestOptions — Configuration for the HTTP request, including batching settings, SSL verification, proxy URL, and request timeout.
- batchSize — Number of items per batch for throttling requests; -1 disables batching, 0 treats as 1.
- batchInterval — Milliseconds between batches; 0 disables interval-based batching.
- allowUnauthorizedCerts — If true, accepts responses with invalid SSL certificates.
- proxy — HTTP proxy URL, optionally with authentication credentials.
- timeout — Request timeout in milliseconds; minimum value is 1.
Output shape
an array of department objects returned by the API
The response contains a list of departments; no pagination is indicated, and optional fields may be omitted.
Examples
Example 1: Fetch all departments using default settings
No additional Request Options needed; default timeout (10000 ms) is used.
Example 2: Process departments in batches of 100 with a 500 ms interval
Set batchSize to 100 and batchInterval to 500 in Request Options.
Example 3: Ignore SSL certificate errors for self‑signed endpoints
Enable allowUnauthorizedCerts and optionally set a custom proxy.