McMain icon

McMain

Interact with McMain API

Employee → Get List

AI-generated

Summary

Retrieve a list of employees from the McMain API.

Inputs

  • returnAll — If true, return all results without a limit; otherwise use the Limit parameter to cap the number of records returned.
  • limit — Maximum number of employee records to return (1‑500). Ignored when returnAll is true.
  • filters — Fixed collection allowing addition of filter criteria such as Employee ID (crNmr), Full Name (crName), Crew ID (crCrew), or Crew Name (cwName).
  • requestOptions — Collection of advanced request settings including batching, SSL validation, proxy, and timeout.

Output shape

An array of employee objects returned by the API.

The response is a list; pagination details are not exposed — up to limit items are returned, and the result may include an error envelope if the request fails.

Examples

Example 1: Fetch up to 100 employees filtered by employee ID

returnAll=false, limit=100, filters=[{name:'crNmr',value:'123'}]

Example 2: Retrieve all employees with batch processing enabled

returnAll=true, requestOptions.batch.batchSize=50, requestOptions.batch.batchInterval=1000

Example 3: Call the endpoint with a custom proxy and timeout

limit=50, filters=[], requestOptions.proxy='http://proxy.example.com:3128', requestOptions.timeout=15000

Discussion