-
Notifications
You must be signed in to change notification settings - Fork 88
/
Copy pathTreyResearch API.postman_collection.json
363 lines (363 loc) · 24.5 KB
/
TreyResearch API.postman_collection.json
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
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
{
"info": {
"_postman_id": "32c7d928-e0f9-4061-afd7-9ac1482de262",
"name": "TreyResearch API",
"description": "# 🚀 Get started here\n\nThis template guides you through API operations (GET, POST) available to developers to test out APIs for a consultant and project management company - Trey Research. Trey Research is a fictitious consulting company that supplies talent in the software and pharmaceuticals industries.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "4380975"
},
"item": [
{
"name": "Get my consulting profile and projects",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:7071/api/me/",
"protocol": "http",
"host": [
"localhost"
],
"port": "7071",
"path": [
"api",
"me",
""
]
},
"description": "This API endpoint is a GET request designed to retrieve the consulting profile and data of the logged in user (for now with no auth it is always a mock user Avery). \nWhen a client makes a GET request to this endpoint, they should expect a 200 OK status code upon success, indicating that the request has been processed and the data is being sent in the response. The response body will typically be in JSON format as shown below:\n\n``` json\n{\n \"results\": [\n {\n \"id\": \"1\",\n \"name\": \"Avery Howard\",\n \"email\": \"[email protected]\",\n \"phone\": \"1-555-456-7890\",\n \"imageUrl\": \"https://bobgerman.github.io/fictitiousAiGenerated/Avery.jpg\",\n \"location\": {\n \"street\": \"5 Wayside Rd.\",\n \"city\": \"Burlington\",\n \"state\": \"MA\",\n \"country\": \"USA\",\n \"postalCode\": \"01803\",\n \"latitude\": 42.5048,\n \"longitude\": -71.1956....\n ]\n}\n\n ```"
},
"response": []
},
{
"name": "Get all consultants",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:7071/api/consultants/",
"protocol": "http",
"host": [
"localhost"
],
"port": "7071",
"path": [
"api",
"consultants",
""
]
},
"description": "This API endpoint is a GET request designed to retrieve all consultants in Trey Research \nWhen a client makes a GET request to this endpoint, they should expect a 200 OK status code upon success, indicating that the request has been processed and the data is being sent in the response. The response body will typically be in JSON format as shown below:\n\n``` json\n{\n \"results\": [\n {\n \"id\": \"1\",\n \"name\": \"Avery Howard\",\n \"email\": \"[email protected]\",\n \"phone\": \"1-555-456-7890\",\n \"imageUrl\": \"https://bobgerman.github.io/fictitiousAiGenerated/Avery.jpg\",\n ....\n },\n {\n \"id\": \"2\",\n \"name\": \"Dominique Dutertre\",\n \"email\": \"[email protected]\",\n \"phone\": \"1-555-567-7890\",\n \"imageUrl\": \"https://bobgerman.github.io/fictitiousAiGenerated/Dominique.jpg\",\n ....\n },\n ...\n}\n\n ```"
},
"response": []
},
{
"name": "Get consultants with name",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:7071/api/consultants/?consultantName=Avery",
"protocol": "http",
"host": [
"localhost"
],
"port": "7071",
"path": [
"api",
"consultants",
""
],
"query": [
{
"key": "consultantName",
"value": "Avery"
}
]
},
"description": "This API endpoint is a GET request designed to retrieve a list of consultants whose names, or parts of their names, match a given name. The endpoint uses query parameter `consultantName` to accept a search string, which it then uses to query the database and return matching consultant profiles.\n\nWhen a client makes a GET request to this endpoint, they should expect a 200 OK status code upon success, indicating that the request has been processed and the data is being sent in the response. The response body will typically be in JSON format as shown below:\n\n``` json\n{\n \"results\": [\n {\n \"id\": \"1\",\n \"name\": \"Avery Howard\",\n \"email\": \"[email protected]\",\n \"phone\": \"1-555-456-7890\",\n \"imageUrl\": \"https://bobgerman.github.io/fictitiousAiGenerated/Avery.jpg\",\n \"location\": {\n \"street\": \"5 Wayside Rd.\",\n \"city\": \"Burlington\",\n \"state\": \"MA\",\n \"country\": \"USA\",\n \"postalCode\": \"01803\",\n \"latitude\": 42.5048,\n \"longitude\": -71.1956....\n ]\n}\n\n ```"
},
"response": []
},
{
"name": "Get consultants with projects based on projects they are assigned",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:7071/api/consultants/?projectName=Financial",
"protocol": "http",
"host": [
"localhost"
],
"port": "7071",
"path": [
"api",
"consultants",
""
],
"query": [
{
"key": "projectName",
"value": "Financial"
}
]
},
"description": "This API endpoint is a GET request designed to retrieve a list of consultants who is assigned to projects which has its name or parts of its names, match a given project name. The endpoint uses query parameter `projectName` to accept a search string, which it then uses to query the database and return matching consultant profiles.\n\nWhen a client makes a GET request to this endpoint, they should expect a 200 OK status code upon success, indicating that the request has been processed and the data is being sent in the response. The response body will typically be in JSON format as shown below:\n\n``` json\n{\n \"results\": [\n {\n \"id\": \"1\",\n \"name\": \"Avery Howard\",\n \"email\": \"[email protected]\",\n \"phone\": \"1-555-456-7890\",\n \"imageUrl\": \"https://bobgerman.github.io/fictitiousAiGenerated/Avery.jpg\",\n .....\n \"projects\": [\n {\n \"projectName\": \"Financial data plugin for Microsoft Copilot\",\n \"projectDescription\": \"Extend Woodgrove's financial analytics platform to integrate with Microsoft Copilot\",\n \"projectLocation\": {\n \"street\": \"1 Microsoft Way\",\n \"city\": \"Redmond\",\n \"state\": \"WA\",\n \"country\": \"USA\",\n \"postalCode\": \"98052\",\n \"latitude\": 47.6396,\n \"longitude\": -122.1295,\n \"mapUrl\": \"https://dev.virtualearth.net/REST/v1/Imagery/Map/Road/?47.6396,-122.1295mapSize=450,600&pp=47.6396,-122.1295&key=xxxxxxxxxxxxxxxxxxxxxxx\"\n },\n \"clientName\": \"Woodgrove Bank\",\n \"clientContact\": \"Bi Gao\",\n \"clientEmail\": \"[email protected]\",\n \"role\": \"Architect\",\n \"forecastThisMonth\": 98,\n \"forecastNextMonth\": 1,\n \"deliveredLastMonth\": 0\n .....\n ]\n}\n\n ```"
},
"response": []
},
{
"name": "Get consultants with a certain skill listed",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:7071/api/consultants/?skill=TypeScript",
"protocol": "http",
"host": [
"localhost"
],
"port": "7071",
"path": [
"api",
"consultants",
""
],
"query": [
{
"key": "skill",
"value": "TypeScript"
}
]
},
"description": "This API endpoint is a GET request designed to retrieve a list of consultants based on skills in their skill list. The endpoint uses query parameter `skill` to accept a search string, which it then uses to query the database and return matching consultant profiles.\n\nWhen a client makes a GET request to this endpoint, they should expect a 200 OK status code upon success, indicating that the request has been processed and the data is being sent in the response. The response body will typically be in JSON format as shown below:\n\n``` json\n{\n \"results\": [\n {\n \"id\": \"1\",\n \"name\": \"Avery Howard\",\n \"email\": \"[email protected]\",\n \"phone\": \"1-555-456-7890\",\n \"imageUrl\": \"https://bobgerman.github.io/fictitiousAiGenerated/Avery.jpg\",\n .....\n \"projects\": [\n \"skills\": [\n \"C#\",\n \"JavaScript\",\n \"TypeScript\",\n \"React\",\n \"Node.js\"\n ],\n \"certifications\": [\n \"MCSADA\",\n \"Azure Developer Associate\",\n \"MCAAF\",\n \"Azure AI Fundamentals\"\n ],\n \"roles\": [\n \"Project lead\",\n \"Developer\",\n \"Architect\",\n \"DevOps\"\n ],\n .....\n ]\n}\n\n ```"
},
"response": []
},
{
"name": "Get consultants with a certain certification listed",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:7071/api/consultants/?certification=azure",
"protocol": "http",
"host": [
"localhost"
],
"port": "7071",
"path": [
"api",
"consultants",
""
],
"query": [
{
"key": "certification",
"value": "azure"
}
]
},
"description": "This API endpoint is a GET request designed to retrieve a list of consultants based on the certifications they have acquired. The endpoint uses query parameter `certification` to accept a search string, which it then uses to query the database and return matching consultant profiles.\n\nWhen a client makes a GET request to this endpoint, they should expect a 200 OK status code upon success, indicating that the request has been processed and the data is being sent in the response. The response body will typically be in JSON format as shown below:\n\n``` json\n{\n \"results\": [\n {\n \"id\": \"1\",\n \"name\": \"Avery Howard\",\n \"email\": \"[email protected]\",\n \"phone\": \"1-555-456-7890\",\n \"imageUrl\": \"https://bobgerman.github.io/fictitiousAiGenerated/Avery.jpg\",\n .....\n \"projects\": [\n \"skills\": [\n \"C#\",\n \"JavaScript\",\n \"TypeScript\",\n \"React\",\n \"Node.js\"\n ],\n \"certifications\": [\n \"MCSADA\",\n \"Azure Developer Associate\",\n \"MCAAF\",\n \"Azure AI Fundamentals\"\n ],\n \"roles\": [\n \"Project lead\",\n \"Developer\",\n \"Architect\",\n \"DevOps\"\n ],\n .....\n ]\n}\n\n ```"
},
"response": []
},
{
"name": "Get consultants with a certain role listed",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:7071/api/consultants/?role=developer",
"protocol": "http",
"host": [
"localhost"
],
"port": "7071",
"path": [
"api",
"consultants",
""
],
"query": [
{
"key": "role",
"value": "developer"
}
]
},
"description": "This API endpoint is a GET request designed to retrieve a list of consultants based on their roles. The endpoint uses query parameter `role` to accept a search string, which it then uses to query the database and return matching consultant profiles.\n\nWhen a client makes a GET request to this endpoint, they should expect a 200 OK status code upon success, indicating that the request has been processed and the data is being sent in the response. The response body will typically be in JSON format as shown below:\n\n``` json\n{\n \"results\": [\n {\n \"id\": \"1\",\n \"name\": \"Avery Howard\",\n \"email\": \"[email protected]\",\n \"phone\": \"1-555-456-7890\",\n \"imageUrl\": \"https://bobgerman.github.io/fictitiousAiGenerated/Avery.jpg\",\n .....\n \"projects\": [\n \"skills\": [\n \"C#\",\n \"JavaScript\",\n \"TypeScript\",\n \"React\",\n \"Node.js\"\n ],\n \"certifications\": [\n \"MCSADA\",\n \"Azure Developer Associate\",\n \"MCAAF\",\n \"Azure AI Fundamentals\"\n ],\n \"roles\": [\n \"Project lead\",\n \"Developer\",\n \"Architect\",\n \"DevOps\"\n ],\n .....\n ]\n}\n\n ```"
},
"response": []
},
{
"name": "Get consultants has x hours available in the current or next month",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:7071/api/consultants/?availability=2",
"protocol": "http",
"host": [
"localhost"
],
"port": "7071",
"path": [
"api",
"consultants",
""
],
"query": [
{
"key": "availability",
"value": "2"
}
]
},
"description": "This API endpoint is a GET request designed to retrieve a list of consultants who have x hours available in the current month or next. The endpoint uses query parameter `availability` to accept the value of `x` hours, which it then uses to query the database and return matching consultant profiles.\n\nWhen a client makes a GET request to this endpoint, they should expect a 200 OK status code upon success, indicating that the request has been processed and the data is being sent in the response. The response body will typically be in JSON format as shown below:\n\n``` json\n{\n \"results\": [\n {\n \"id\": \"1\",\n \"name\": \"Avery Howard\",\n \"email\": \"[email protected]\",\n \"phone\": \"1-555-456-7890\",\n \"imageUrl\": \"https://bobgerman.github.io/fictitiousAiGenerated/Avery.jpg\",\n .....\n }\n ],\n \"forecastThisMonth\": 138,\n \"forecastNextMonth\": 41,\n \"deliveredLastMonth\": 0,\n \"deliveredThisMonth\": 2\n .....\n ]\n}\n\n ```"
},
"response": []
},
{
"name": "Get Get all projects",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:7071/api/projects/",
"protocol": "http",
"host": [
"localhost"
],
"port": "7071",
"path": [
"api",
"projects",
""
]
},
"description": "This API endpoint is a GET request designed to retrieve all projects in Trey Research \nWhen a client makes a GET request to this endpoint, they should expect a 200 OK status code upon success, indicating that the request has been processed and the data is being sent in the response. The response body will typically be in JSON format as shown below: \n\n``` json\n{\n \"results\": [\n {\n \"id\": \"1\",\n \"name\": \"CRM Cloud Migration\",\n \"description\": \"Migrate Adatum's CRM system to Dynamics 365\",\n \"clientName\": \"Adatum Corporation\",\n \"clientContact\": \"Natasha Jones\",\n \"clientEmail\": \"[email protected]\",\n ....\n \"forecastThisMonth\": 10,\n \"forecastNextMonth\": 0,\n \"deliveredLastMonth\": 0,\n \"deliveredThisMonth\": 0\n },\n {\n \"id\": \"10\",\n \"name\": \"Financial data plugin for Microsoft Copilot\",\n \"description\": \"Extend Woodgrove's financial analytics platform to integrate with Microsoft Copilot\",\n \"clientName\": \"Woodgrove Bank\",\n \"clientContact\": \"Bi Gao\",\n \"clientEmail\": \"[email protected]\",\n .....\n \"forecastThisMonth\": 118,\n \"forecastNextMonth\": 21,\n \"deliveredLastMonth\": 0,\n \"deliveredThisMonth\": 2\n },\n .....\n ]\n}\n\n ```"
},
"response": []
},
{
"name": "Get projects with name",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:7071/api/projects/?projectName=Financial",
"protocol": "http",
"host": [
"localhost"
],
"port": "7071",
"path": [
"api",
"projects",
""
],
"query": [
{
"key": "projectName",
"value": "Financial"
}
]
},
"description": "This API endpoint is a GET request designed to retrieve a list of project which have name, or parts of its name, matching a given name. The endpoint uses query parameter `projectName` to accept a search string, which it then uses to query the database and return matching projects.\n\nWhen a client makes a GET request to this endpoint, they should expect a 200 OK status code upon success, indicating that the request has been processed and the data is being sent in the response. The response body will typically be in JSON format as shown below:\n\n``` json\n{\n \"results\": [\n {\n \"id\": \"10\",\n \"name\": \"Financial data plugin for Microsoft Copilot\",\n \"description\": \"Extend Woodgrove's financial analytics platform to integrate with Microsoft Copilot\",\n \"clientName\": \"Woodgrove Bank\",\n \"clientContact\": \"Bi Gao\",\n \"clientEmail\": \"[email protected]\",\n \"location\": {\n \"street\": \"1 Microsoft Way\",\n \"city\": \"Redmond\",\n \"state\": \"WA\",\n \"country\": \"USA\",\n \"postalCode\": \"98052\",\n \"latitude\": 47.6396,\n \"longitude\": -122.1295,\n \"mapUrl\": \"https://dev.virtualearth.net/REST/v1/Imagery/Map/Road/?47.6396,-122.1295mapSize=450,600&pp=47.6396,-122.1295&key=xxxxxxxxxxxxxxxxxxxxxxx\"\n },\n ...\n }\n ]\n}\n\n ```"
},
"response": []
},
{
"name": "Get projects based on consultant name assigned",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:7071/api/projects/?consultantName=Avery",
"protocol": "http",
"host": [
"localhost"
],
"port": "7071",
"path": [
"api",
"projects",
""
],
"query": [
{
"key": "consultantName",
"value": "Avery"
}
]
},
"description": "This API endpoint is a GET request designed to retrieve a list of project which have consultants who's name, or parts of their name, matching a given name. The endpoint uses query parameter `consultantName` to accept a search string, which it then uses to query the database and return matching projects.\n\nWhen a client makes a GET request to this endpoint, they should expect a 200 OK status code upon success, indicating that the request has been processed and the data is being sent in the response. The response body will typically be in JSON format as shown below:\n\n``` json\n{\n \"results\": [\n {\n \"id\": \"10\",\n \"name\": \"Financial data plugin for Microsoft Copilot\",\n \"description\": \"Extend Woodgrove's financial analytics platform to integrate with Microsoft Copilot\",\n \"clientName\": \"Woodgrove Bank\",\n \"clientContact\": \"Bi Gao\",\n \"clientEmail\": \"[email protected]\",\n ....\n \"consultants\": [\n {\n \"consultantName\": \"Avery Howard\",\n \"consultantLocation\": {\n \"street\": \"5 Wayside Rd.\",\n \"city\": \"Burlington\",\n \"state\": \"MA\",\n \"country\": \"USA\",\n \"postalCode\": \"01803\",\n \"latitude\": 42.5048,\n \"longitude\": -71.1956,\n \"mapUrl\": \"https://dev.virtualearth.net/REST/v1/Imagery/Map/Road/?42.5048,-71.1956mapSize=450,600&pp=42.5048,-71.1956&key=xxxxxxxxxxxxxxxxxxxxxxx\"\n },\n \"role\": \"Developer\",\n \"forecastThisMonth\": 40,\n \"forecastNextMonth\": 40,\n \"deliveredLastMonth\": 0,\n \"deliveredThisMonth\": 0\n }\n ],\n \"forecastThisMonth\": 40,\n \"forecastNextMonth\": 40,\n \"deliveredLastMonth\": 0,\n \"deliveredThisMonth\": 0\n }\n ]\n}\n\n ```"
},
"response": []
},
{
"name": "Add hours to a project",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"projectName\": \"Woodgrove\",\n \"hours\": 2\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://localhost:7071/api/me/chargeTime",
"protocol": "http",
"host": [
"localhost"
],
"port": "7071",
"path": [
"api",
"me",
"chargeTime"
]
},
"description": "This API endpoint is a POST request that allows users to log hours spent on a project. The request body must be in JSON format and include the `projectName` and `hours` fields.\n\nWhen a client makes a POST request to this endpoint with the appropriate JSON body, they should expect a 200 Created status code upon successful creation of the log entry.\n\nThe JSON request body should look like this:\n\n``` json\n{\n\"projectName\": \"Woodgrove\",\n\"hours\": 2\n}\n\n ```\n\nAnd its sample response:\n\n``` json\n{\n \"results\": {\n \"status\": 200,\n \"clientName\": \"Woodgrove Bank\",\n \"projectName\": \"Financial data plugin for Microsoft Copilot\",\n \"remainingForecast\": 96,\n \"message\": \"Charged 2 hours to Woodgrove Bank on project \\\"Financial data plugin for Microsoft Copilot\\\". You have 96 hours remaining this month.\"\n }\n}\n\n ```"
},
"response": []
},
{
"name": "Assign a consultant to a project",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"projectName\": \"CRM Cloud Migration\",\n \"consultantName\": \"Lois\",\n \"role\": \"project lead\",\n \"forecast\": 10\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://localhost:7071/api/projects/assignConsultant",
"protocol": "http",
"host": [
"localhost"
],
"port": "7071",
"path": [
"api",
"projects",
"assignConsultant"
]
},
"description": "This API endpoint is a POST request that assigns a consultant to a project with some forcast alloted.\n\nWhen a client makes a POST request to this endpoint with the appropriate JSON body, they should expect a 200 Created status code upon successful creation of the log entry.\n\nThe JSON request body should look like this:\n\n``` json\n{\n \"projectName\": \"CRM Cloud Migration\",\n \"consultantName\": \"Lois\",\n \"role\": \"project lead\",\n \"forecast\": 10\n}\n\n ```\n\nAnd its sample response:\n\n``` json\n{\n \"results\": {\n \"status\": 200,\n \"clientName\": \"Adatum Corporation\",\n \"projectName\": \"CRM Cloud Migration\",\n \"consultantName\": \"Lois Wyn\",\n \"remainingForecast\": 10,\n \"message\": \"Added consultant Lois Wyn to Adatum Corporation on project \\\"CRM Cloud Migration\\\" with 10 hours forecast this month.\"\n }\n}\n\n ```"
},
"response": []
}
]
}