# List leaves **GET /leaves** ## Servers - https://open.api.missionx.ai/v2: https://open.api.missionx.ai/v2 () ## Authentication methods - O auth2 ## Parameters #### Query parameters - **type** (array[string]) One or more types to filter leaves by. - **status** (array[string]) One or more statuses to filter leaves by. - **codeId** (array[string]) One or more code ids to filter leaves by. This is the `org.leaveCodes[].id` value - **person** (array[string]) One or more person IDs to filter the results by. This is the `people[].person._id` value. - **overlapsDateRangeFrom** (string) Limit the results by an overlapping date range. This is the date range start value. The `overlapsDateRangeTo` is required as well. Format is `overlapsDateRangeFrom=`, e.g. `overlapsDateRangeFrom=2025-02-24T00:00:00.000Z`. The date is in [ISOString](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString). - **overlapsDateRangeTo** (string) Limit the results by an overlapping date range. This is the date range end value. The `overlapsDateRangeFrom` is required as well. Format is `overlapsDateRangeTo=`, e.g. `overlapsDateRangeTo=2025-02-28T00:00:00.000Z`. The date is in [ISOString](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString). - **select** (array[string]) One or more properties to be included in the response, instead of the full payload. E.g. `select=endDate,projectStatus`. You can also exclude fields by prefixing with a minus sign, e.g. `select=-endDate,-projectStatus`, but you cannot mix both. - **sortBy** (string) Optionally, the field to sort the results by. By default, results are sorted by created date. Only `updatedAt` is supported at this moment (Note: `updatedAt` equals to `createdAt` for documents that have never been updated). - **sortDirection** (string) Optionally, the direction to sort the documents by. For ascending (oldest first) use either `1` or `asc`. By default sorting is descending (latest first), `-1` or `desc`. - **limit** (integer) Optionally, change the default document response limit of `40`. - **count** (boolean | number) Includes a `count` property in the response, which holds the total number of results matching the query. The value does not change between pages and represents the accurate, total number of results to be expected. Note: The use of this parameter will have a performance impact on the first paginated request. ## Responses ### 200: Successful response #### Body Parameters: application/json (object) - **value** (array[object]) - **nextLink** (string) The full URL to be used in order to fetch the next page of results. If not defined, it means there are no more pages. Note: The documents are not being counted to know when all documents have been exhausted, we simply check if the length of the paginated list is less than the paginated limit. This means that if by coincidence the last paginated document list has the same length as the paginated limit, `nextLink` will be defined and will result in an empty list of documents. - **count** (number) The total count of results for the specific request. It's included in the response only when the `count` boolean query parameter is provided and truthy, e.g. `?count=1`. The value is being calculated only during the first request and then repeated on the subsequent paginated responses. [Powered by Bump.sh](https://bump.sh)