forked from osu-mist/hr-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yaml
286 lines (283 loc) · 8.49 KB
/
swagger.yaml
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
swagger: '2.0'
info:
title: HR API
description: |
API to retrieve the departments, position titles, and ID's tied to a department and business center.
version: '1.0'
license:
name: GNU Affero General Public License Version 3
url: http://www.gnu.org/licenses/agpl-3.0.en.html
externalDocs:
description: GitHub Repository
url: https://github.com/osu-mist/hr-api
schemes:
- https
produces:
- application/json
basePath: /v1/hr
paths:
/positions:
get:
summary: List positions
description: List position (job) titles and numbers in a single business center and department.
parameters:
- in: query
name: type
description: The type of positions to list. Currently the API only supports "student" positions.
required: true
type: string
- $ref: '#/parameters/businessCenter'
- $ref: '#/parameters/pretty'
responses:
200:
description: List of positions
schema:
$ref: "#/definitions/PositionsResultObject"
400:
description: Bad request
schema:
$ref: '#/definitions/Error'
500:
description: Internal Server Error
schema:
$ref: '#/definitions/Error'
/departments:
get:
summary: List departments
description: Return org code and org description (departments) for a single business center
parameters:
- $ref: '#/parameters/businessCenter'
- $ref: '#/parameters/pretty'
responses:
200:
description: List of departments
schema:
$ref: "#/definitions/DepartmentsResultObject"
400:
description: Bad request
schema:
$ref: '#/definitions/Error'
500:
description: Internal Server Error
schema:
$ref: '#/definitions/Error'
/locations:
get:
summary: List locations
description: Return a list of HR locations that can be related to a job record, including minimum wages if applicable.
parameters:
- in: query
name: state
description: "Filter by state code. Use ANSI standard INCITS 38:2009 for state codes."
required: false
type: string
- $ref: '#/parameters/date'
- $ref: '#/parameters/pretty'
responses:
200:
description: List of locations
schema:
$ref: "#/definitions/LocationsResultObject"
400:
description: Bad request
schema:
$ref: '#/definitions/Error'
500:
description: Internal Server Error
schema:
$ref: '#/definitions/Error'
/locations/{id}:
get:
summary: Get location by ID
description: Return a single HR location that can be related to a job record, including minimum wages if applicable.
parameters:
- in: path
name: id
description: ID of location.
required: true
type: string
- $ref: '#/parameters/date'
- $ref: '#/parameters/pretty'
responses:
200:
description: Location
schema:
$ref: "#/definitions/LocationResultObject"
400:
description: Bad request
schema:
$ref: '#/definitions/Error'
404:
description: Location not found
schema:
$ref: '#/definitions/Error'
500:
description: Internal Server Error
schema:
$ref: '#/definitions/Error'
parameters:
pretty:
name: pretty
in: query
type: boolean
required: false
description: If true, JSON response will be pretty-printed
businessCenter:
name: businessCenter
in: query
description: "4-character business center name"
required: true
type: string
date:
name: date
in: query
description: "Date to search by for minimum wage data. Minimum wage depends on the date. Example: '2018-12-31'"
required: false
type: string
format: date
default: The current date
definitions:
Error:
properties:
status:
type: integer
description: HTTP status code.
developerMessage:
type: string
description: An error string aimed at developers.
userMesage:
type: string
description: An error string aimed at end users.
code:
type: integer
description: Error code.
details:
type: string
description: A link to further information about the error.
PositionsResultObject:
properties:
data:
type: array
items:
properties:
id:
type: string
example: "C12345"
type:
type: string
example: position
attributes:
properties:
title:
type: string
description: Position title
class:
type: string
description: Position class
businessCenter:
type: string
description: Name of the business center
positionNumber:
type: string
description: Position number
example: "C12345"
organizationCode:
type: string
description: Numeric orgCode for the department
lowSalaryPoint:
type: number
format: float
description: Low point for position salary
example: 10.5
highSalaryPoint:
type: number
format: float
description: High point for position salary
example: 15.25
nationalOccupationCode:
type: string
description: Numeric national occupation code
example: "1234"
nationalOccupationCodeDescription:
type: string
description: Description of nationalOccupationCode
example: "Colleges/Schools Professionals"
DepartmentsResultObject:
properties:
data:
type: array
items:
properties:
id:
type: string
example: "123456"
type:
type: string
example: department
attributes:
properties:
name:
type: string
description: Name of the department usually referred to as orgDescription.
businessCenter:
type: string
description: Name of the business center
organizationCode:
type: string
example: "123456"
description: Numeric orgCode for the department
LocationsResultObject:
properties:
data:
type: array
items:
$ref: '#/definitions/LocationResourceObject'
LocationResultObject:
properties:
data:
$ref: '#/definitions/LocationResourceObject'
LocationResourceObject:
properties:
id:
type: string
example: "40"
type:
type: string
example: location
attributes:
properties:
name:
type: string
city:
type: string
example: Corvallis
county:
type: string
example: Benton County
state:
type: string
example: Oregon
stateCode:
type: string
description: "State code/abbreviation which follows ANSI standard INCITS 38:2009"
example: OR
minimumWageClassification:
type: string
description: Classification of location related to minimum wage. This classification affects the value of minimum wage for a given date.
enum:
- Standard
- Nonurban
- Urban
example: Standard
minimumWage:
type: number
format: float
description: |
Minimum wage for location.
Currently, minimum wage is only available for Oregon locations.
This value can be affected by the date query parameter.
example: 10.25
minimumWageDate:
type: string
format: date
description: Date used to determine minimum wage.