Run saved query
Runs a saved query and returns its rows.
GET https://cotlet.dev/api/v1/peoplehr/queries/run
read
Returns the columns of the query and its rows as PeopleHR shows them, the same data the Export to CSV button gives. Dates keep the format PeopleHR uses in the result. It reads only and changes nothing.
Parameters
| Name | Type | Description |
|---|---|---|
| name string required | string | Exact name from list_queries. |
| cursor string | string | Next page cursor from the previous call. |
Request
curl "https://cotlet.dev/api/v1/peoplehr/queries/run?name=Jane+Doe" \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("peoplehr", "run_query", {"name":"Jane Doe"}) const result = await cotlet.call('peoplehr', 'run_query', {"name":"Jane Doe"}); cotlet call peoplehr run_query --data '{"name":"Jane Doe"}' Example response
{
"name": "Probation ending soon",
"columns": [
"Employee",
"Probation End Date",
"Probation Status"
],
"rows": [
[
"Ana Lopez",
"2027-02-16",
"In probation"
],
[
"Jake Ortiz",
"2026-12-04",
"In probation"
]
],
"next_cursor": null
}