Get List
GET/api/leaveapplications
API Endpoint: Get Leave Applications
Purpose
This endpoint retrieves a list of leave applications submitted by users. It is useful for administrators or users who want to view the status and details of leave applications.
Request Format
- Method: GET
- URL:
https://app.udyogx.in/api/leaveapplications
Response Structure
The response will contain a JSON object with the following structure:
- data: An array of leave application objects, each containing:
- id: Unique identifier for the leave application.
- userId: Identifier for the user who submitted the application.
- leaveType: Type of leave requested (e.g., sick, vacation).
- startDate: Start date of the leave.
- endDate: End date of the leave.
- status: Current status of the leave application (e.g., approved, pending, rejected).
- createdAt: Timestamp of when the application was created.
- updatedAt: Timestamp of the last update to the application.
Example Response
{
"data": [
{
"id": 1,
"userId": 101,
"leaveType": "sick",
"startDate": "2023-10-01",
"endDate": "2023-10-05",
"status": "approved",
"createdAt": "2023-09-25T12:00:00Z",
"updatedAt": "2023-09-26T12:00:00Z"
},
...
]
}
This endpoint does not require any request body parameters as it is a GET request. The response will provide all relevant information regarding the leave applications.
Responses
- 200