-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathswagger.yaml
219 lines (219 loc) · 5.38 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
swagger: '2.0'
info:
title: OSU Directory Web API
description: Search LDAP directory entries.
version: "1"
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/directory-api
host: api.oregonstate.edu
schemes:
- https
basePath: /v1
produces:
- application/json
security:
- OAuth2:
- full
paths:
/directory:
get:
tags:
- directory
operationId: getBySearchQuery
description: Get entries in directory matching all terms in search query
produces:
- application/json
parameters:
- name: q
in: query
description: |
For basic directory searches. Searches by username, full name,
and email address.
type: string
required: false
- name: primaryAffiliation
in: query
description: Filter by primary affiliation
type: string
required: false
enum:
- Employee
- Other
- Retiree
- Student
- Unknown
- name: lastName
in: query
description: Filter by last name
type: string
required: false
- name: emailAddress
in: query
description: Filter by email address
type: string
required: false
- name: officePhoneNumber
in: query
description: Filter by office phone number
type: string
required: false
- name: alternatePhoneNumber
in: query
description: Filter by alternate phone number
type: string
required: false
- name: homePhoneNumber
in: query
description: Filter by home phone number
type: string
required: false
- name: phoneNumber
in: query
description: Filter by any phone number
type: string
required: false
- name: faxNumber
in: query
description: Filter by fax number
type: string
required: false
- name: officeAddress
in: query
description: Filter by office address
type: string
required: false
- name: department
in: query
description: Filter by department
type: string
required: false
- $ref: '#/parameters/pretty'
responses:
"200":
description: Array of directory entities
schema:
type: array
items:
$ref: "#/definitions/ResultObject"
"400":
description: Bad request
schema:
$ref: "#/definitions/Error"
/directory/{osuuid}:
get:
tags:
- directory
operationId: getByOSUUID
description: Get entries in directory filtered by query parameters
parameters:
- name: osuuid
in: path
description: "OSUUID of the person to be fetched."
type: integer
format: int64
required: true
- $ref: '#/parameters/pretty'
responses:
"200":
description: Directory entity
schema:
$ref: "#/definitions/ResultObject"
"404":
description: Not found
schema:
$ref: "#/definitions/Error"
parameters:
pretty:
name: pretty
in: query
type: boolean
required: false
description: If true, JSON response will be pretty-printed
securityDefinitions:
OAuth2:
type: oauth2
flow: application
tokenUrl: https://api.oregonstate.edu/oauth2/token
scopes:
full: Full access to the API
definitions:
ResultObject:
properties:
data:
type: array
items:
$ref: "#/definitions/ResourceObject"
ResourceObject:
properties:
id:
type: integer
type:
type: string
example: "directory"
attributes:
$ref: "#/definitions/Attributes"
links:
$ref: "#/definitions/ResourceLinks"
Attributes:
properties:
firstName:
type: string
lastName:
type: string
fullName:
type: string
primaryAffiliation:
type: string
jobTitle:
type: string
department:
type: string
departmentMailingAddress:
type: string
homePhoneNumber:
type: string
homeAddress:
type: string
officePhoneNumber:
type: string
officeAddress:
type: string
faxNumber:
type: string
emailAddress:
type: string
format: email
username:
type: string
alternatePhoneNumber:
type: string
osuuid:
type: integer
format: int64
ResourceLinks:
properties:
self:
type: string
Error:
type: object
properties:
status:
type: integer
format: int32
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.