Skip to content

API endpoint for fetching application times data in Job Analytics#2260

Open
handikaharianto wants to merge 3 commits into
developmentfrom
handika/job-posting-page-analytics-backend
Open

API endpoint for fetching application times data in Job Analytics#2260
handikaharianto wants to merge 3 commits into
developmentfrom
handika/job-posting-page-analytics-backend

Conversation

@handikaharianto

Copy link
Copy Markdown

Description

This is the API endpoint for fetching the application time in job analytics.

Related PRS (if any):

This backend PR is related to the frontend side's PR 5043

Main changes explained:

  • Create src/controllers/jobAnalytics/applicationTimeController.js for fetching the application times data
  • Create src/models/jobAnalytics/applicationTime.js for MongoDB schema
  • Create src/routes/jobAnalytics/applicationTimeRoutes.js for defining the API endpoint routes
  • Update src/startup/routes.js for connecting the API endpoint on the backend side

How to test:

  1. check into handika/job-posting-page-analytics-backend branch
  2. do npm install and npm run dev to run this PR locally
  3. log as admin user (If you're using Postman to test this API endpoint, add Authorization in the key and JWT token that you received when you login as the value)
  4. call the API endpoint http://localhost:4500/api/analytics/application-time. Optional params: startDate=2025-06-28T14:52:56.012Z, roles=Software Engineer, Manager (roles is comma-separated if there are more than one value being passed)
  5. verify whether the API endpoint returns the correct data

Screenshots or videos of changes:

image image

Note:

None.

@sonarqubecloud

sonarqubecloud Bot commented Jul 1, 2026

Copy link
Copy Markdown

@HemanthNidamanuru HemanthNidamanuru left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Handika,

I tested this PR locally on the handika/job-posting-page-analytics-backend branch.

After logging in as an admin user and testing the /api/analytics/application-time endpoint with the JWT token, the API is returning the correct data.

I also verified the optional query parameters, and the response looks good from my side.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants