-
Notifications
You must be signed in to change notification settings - Fork 1
/
Job-Portal-Data.txt
329 lines (285 loc) · 12.7 KB
/
Job-Portal-Data.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
H2 DB
http://localhost:8080/h2-console
QUERY DATA :
INSERT INTO Jobs (id, title, description, location, salary, company_email, company_name, employer_name, job_type, applied_date)
VALUES
(1, 'Software Engineer', 'Develop software applications', 'New York', 80000.0, '[email protected]', 'ABC Inc.', 'John Doe', 'IT', '2023-03-25'),
(2, 'HR Manager', 'Manage human resources', 'Los Angeles', 60000.0, '[email protected]', 'XYZ Corp.', 'Jane Smith', 'HR', '2023-03-24'),
(3, 'Sales Representative', 'Sales and marketing', 'Chicago', 75000.0, '[email protected]', 'SalesCo', 'Mike Johnson', 'SALES', '2023-03-24'),
(4, 'Marketing Specialist', 'Marketing campaigns', 'San Francisco', 70000.0, '[email protected]', 'MarketingTech', 'Sarah Brown', 'MARKETING', '2023-03-24'),
(5, 'Data Scientist', 'Data analysis and modeling', 'Mumbai', 90000.0, '[email protected]', 'Indian Data', 'Rajesh Patel', 'IT', '2023-03-23');
(6, 'Network Administrator', 'Manage network infrastructure', 'Dallas', 75000.0, '[email protected]', 'TechNet', 'David Wilson', 'IT', '2023-03-23'),
(7, 'Finance Analyst', 'Financial data analysis', 'London', 68000.0, '[email protected]', 'Global Finance', 'Emily Turner', 'FINANCE', '2023-03-23'),
(8, 'Product Manager', 'Product development and strategy', 'San Jose', 85000.0, '[email protected]', 'Tech Innovations', 'Michael Clark', 'IT', '2023-03-22'),
(9, 'Customer Service Representative', 'Provide customer support', 'Toronto', 60000.0, '[email protected]', 'CustomerCare Inc.', 'Maria Rodriguez', 'SALES', '2023-03-22'),
(10, 'Graphic Designer', 'Create visual designs', 'Paris', 70000.0, '[email protected]', 'Creative Designs', 'Sophie Martin', 'MARKETING', '2023-03-22');
(11, 'IT Manager', 'Managing IT campaigns', 'San Francisco', 120000.0, '[email protected]', 'MarketingTech', 'Jitin Mishra', 'IT', '2023-03-21'),
(12, 'ML Engineer', 'Creating ML models', 'Mumbai', 98000.0, '[email protected]', 'Indian Data', 'Ashish Kumar', 'IT', '2023-03-21');
(13, 'Software Lead', 'Leading team of Software Engineers', 'Dallas', 85000.0, '[email protected]', 'TechNet', 'Rahul Sharma', 'IT', '2023-03-21'),
(14, 'Finance Analyst', 'Financial data analysis', 'London', 68000.0, '[email protected]', 'Global Finance', 'Yuvraj Shah', 'FINANCE', '2023-03-20'),
(15, 'Product Analyst', 'Product analysis', 'California', 85000.0, '[email protected]', 'Apple', 'Mitchell Stark', 'IT', '2023-03-19');
SWAGGER UI:
http://localhost:8080/swagger-ui.html
JSON DATA:
[
{
"id": 1,
"title": "Software Engineer",
"description": "Develop software applications",
"location": "New York",
"salary": 80000.0,
"companyEmail": "[email protected]",
"companyName": "ABC Inc.",
"employerName": "John Doe",
"jobType": "IT",
"appliedDate": "2023-03-25"
},
{
"id": 2,
"title": "HR Manager",
"description": "Manage human resources",
"location": "Los Angeles",
"salary": 60000.0,
"companyEmail": "[email protected]",
"companyName": "XYZ Corp.",
"employerName": "Jane Smith",
"jobType": "HR",
"appliedDate": "2023-03-24"
},
{
"id": 3,
"title": "Sales Representative",
"description": "Sales and marketing",
"location": "Chicago",
"salary": 75000.0,
"companyEmail": "[email protected]",
"companyName": "SalesCo",
"employerName": "Mike Johnson",
"jobType": "SALES",
"appliedDate": "2023-03-24"
},
{
"id": 4,
"title": "Marketing Specialist",
"description": "Marketing campaigns",
"location": "San Francisco",
"salary": 70000.0,
"companyEmail": "[email protected]",
"companyName": "MarketingTech",
"employerName": "Sarah Brown",
"jobType": "MARKETING",
"appliedDate": "2023-03-24"
},
{
"id": 5,
"title": "Data Scientist",
"description": "Data analysis and modeling",
"location": "Mumbai",
"salary": 90000.0,
"companyEmail": "[email protected]",
"companyName": "Indian Data",
"employerName": "Rajesh Patel",
"jobType": "IT",
"appliedDate": "2023-03-23"
}
]
[
{
"id": 6,
"title": "Network Administrator",
"description": "Manage network infrastructure",
"location": "Dallas",
"salary": 75000.0,
"companyEmail": "[email protected]",
"companyName": "TechNet",
"employerName": "David Wilson",
"jobType": "IT",
"appliedDate": "2023-03-23"
},
{
"id": 7,
"title": "Finance Analyst",
"description": "Financial data analysis",
"location": "London",
"salary": 68000.0,
"companyEmail": "[email protected]",
"companyName": "Global Finance",
"employerName": "Emily Turner",
"jobType": "FINANCE",
"appliedDate": "2023-03-23"
},
{
"id": 8,
"title": "Product Manager",
"description": "Product development and strategy",
"location": "San Jose",
"salary": 85000.0,
"companyEmail": "[email protected]",
"companyName": "Tech Innovations",
"employerName": "Michael Clark",
"jobType": "IT",
"appliedDate": "2023-03-22"
},
{
"id": 9,
"title": "Customer Service Representative",
"description": "Provide customer support",
"location": "Toronto",
"salary": 60000.0,
"companyEmail": "[email protected]",
"companyName": "CustomerCare Inc.",
"employerName": "Maria Rodriguez",
"jobType": "SALES",
"appliedDate": "2023-03-22"
},
{
"id": 10,
"title": "Graphic Designer",
"description": "Create visual designs",
"location": "Paris",
"salary": 70000.0,
"companyEmail": "[email protected]",
"companyName": "Creative Designs",
"employerName": "Sophie Martin",
"jobType": "MARKETING",
"appliedDate": "2023-03-22"
}
]
---------------------------------------
API Use case:
1. Get All Jobs
- Endpoint: GET `http://localhost:8080/jobs`
- Description: Get a list of all job postings.
2. Get Job by ID
- Endpoint: GET `http://localhost:8080/job/{id}`
- Description: Get a specific job posting by its ID.
3. Get All Jobs of the Same Type
- Endpoint: GET `http://localhost:8080/jobs/type/{type}`
- Description: Get all job postings of a specific job type.
4. Get All Jobs Above a Certain Salary
- Endpoint: GET `http://localhost:8080/jobs/salary/range/{salary}`
- Description: Get all job postings with a salary above a certain threshold.
5. Get All Jobs within the Same Company
- Endpoint: GET `http://localhost:8080/jobs/company/`
- Parameters: `companyName` (query parameter)
- Description: Get all job postings within the same company based on the company name.
6. Post a Job
- Endpoint: POST `http://localhost:8080/job`
- Request Body: JSON data representing the job posting.
- Description: Create a new job posting.
7. Post Multiple Jobs
- Endpoint: POST `http://localhost:8080/jobs`
- Request Body: List of JSON objects representing job postings.
- Description: Create multiple new job postings.
8. Update Salary by Job ID
- Endpoint: PUT `http://localhost:8080/job/id/{id}/salary/{salary}`
- Description: Update the salary of a job posting by its ID.
9. Update Location by Job ID
- Endpoint: PUT `http://localhost:8080/job/id/{id}/{loc}`
- Description: Update the location of a job posting by its ID.
10. Update Email by Job ID
- Endpoint: PUT `http://localhost:8080/job/id/{id}/email`
- Parameters: `email` (query parameter)
- Description: Update the email address of a job posting by its ID.
11. Update Salary of Similar Job Type
- Endpoint: PUT `http://localhost:8080/jobs/salaryHike/jobType/{type}`
- Description: Update the salaries of job postings with a similar job type by increasing them by 10%.
12. Delete Job by ID
- Endpoint: DELETE `http://localhost:8080/job/delete/id/{id}`
- Description: Delete a specific job posting by its ID.
13. Delete All Jobs from the Same Company
- Endpoint: DELETE `http://localhost:8080/jobs/company/{cName}`
- Description: Delete all job postings from the same company based on the company name.
----------------------------------------------------------------------------------------------------------------------------------------------------------
Example :
1. Get All Jobs
- Example Endpoint: GET `http://localhost:8080/jobs`
- Description: Get a list of all job postings.
- Example Response: List of job postings in JSON format.
2. Get Job by ID
- Example Endpoint: GET `http://localhost:8080/job/6`
- Description: Get a specific job posting by its ID.
- Example Response: JSON data for the job with ID 6.
3. Get All Jobs of the Same Type
- Example Endpoint: GET `http://localhost:8080/jobs/type/IT`
- Description: Get all job postings of the "IT" job type.
- Example Response: List of job postings with job type "IT" in JSON format.
4. Get All Jobs Above a Certain Salary
- Example Endpoint: GET `http://localhost:8080/jobs/salary/range/70000`
- Description: Get all job postings with a salary above $70,000.
- Example Response: List of job postings with salaries above $70,000 in JSON format.
5. Get All Jobs within the Same Company
- Example Endpoint: GET `http://localhost:8080/jobs/company/?companyName=TechNet`
- Description: Get all job postings within the company "TechNet" based on the company name.
- Example Response: List of job postings within "TechNet" in JSON format.
6. Post a Job
- Example Endpoint: POST `http://localhost:8080/job`
- Request Body: JSON data representing a new job posting.
- Description: Create a new job posting.
- Example Request Body:
```json
{
"title": "Software Engineer",
"description": "Develop software applications",
"location": "San Francisco",
"salary": 90000.0,
"companyEmail": "[email protected]",
"companyName": "Tech Innovations",
"employerName": "John Smith",
"jobType": "IT"
}
```
7. Post Multiple Jobs
- Example Endpoint: POST `http://localhost:8080/jobs`
- Request Body: List of JSON objects representing new job postings.
- Description: Create multiple new job postings.
- Example Request Body:
```json
[
{
"title": "Marketing Manager",
"description": "Lead marketing campaigns",
"location": "New York",
"salary": 80000.0,
"companyEmail": "[email protected]",
"companyName": "Marketing Pro",
"employerName": "Sarah Johnson",
"jobType": "MARKETING"
},
{
"title": "Sales Representative",
"description": "Generate sales leads",
"location": "Chicago",
"salary": 70000.0,
"companyEmail": "[email protected]",
"companyName": "Sales Solutions",
"employerName": "Robert Davis",
"jobType": "SALES"
}
]
```
8. Update Salary by Job ID
- Example Endpoint: PUT `http://localhost:8080/job/id/6/salary/80000`
- Description: Update the salary of the job with ID 6 to $80,000.
- Example Response: Confirmation message.
9. Update Location by Job ID
- Example Endpoint: PUT `http://localhost:8080/job/id/7/London`
- Description: Update the location of the job with ID 7 to "London".
- Example Response: Confirmation message.
10. Update Email by Job ID
- Example Endpoint: PUT `http://localhost:8080/job/id/8/email/[email protected]`
- Description: Update the email address of the job with ID 8 to "[email protected]".
- Example Response: Confirmation message.
11. Update Salary of Similar Job Type
- Example Endpoint: PUT `http://localhost:8080/jobs/salaryHike/jobType/IT`
- Description: Update the salaries of all "IT" job postings by increasing them by 10%.
- Example Response: Confirmation message.
12. Delete Job by ID
- Example Endpoint: DELETE `http://localhost:8080/job/delete/id/9`
- Description: Delete the job with ID 9.
- Example Response: Confirmation message.
13. Delete All Jobs from the Same Company
- Example Endpoint: DELETE `http://localhost:8080/jobs/company/CustomerCare Inc.`
- Description: Delete all job postings from the company "CustomerCare Inc."
- Example Response: Confirmation message.
----------------------------------------------------------------------------------------------------