forked from instructure/pandarus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.json
214 lines (214 loc) · 9.19 KB
/
search.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
{
"apiVersion": "1.0",
"swaggerVersion": "1.2",
"basePath": "https://canvas.instructure.com/api",
"resourcePath": "/search",
"produces": [
"application/json"
],
"apis": [
{
"path": "/v1/conversations/find_recipients",
"description": "Find valid recipients (users, courses and groups) that the current user\ncan send messages to. The /api/v1/search/recipients path is the preferred\nendpoint, /api/v1/conversations/find_recipients is deprecated.\n\nPagination is supported.",
"operations": [
{
"method": "GET",
"summary": "Find recipients",
"notes": "Find valid recipients (users, courses and groups) that the current user\ncan send messages to. The /api/v1/search/recipients path is the preferred\nendpoint, /api/v1/conversations/find_recipients is deprecated.\n\nPagination is supported.",
"nickname": "find_recipients_conversations",
"parameters": [
{
"paramType": "query",
"name": "search",
"description": "Search terms used for matching users/courses/groups (e.g. \"bob smith\"). If\nmultiple terms are given (separated via whitespace), only results matching\nall terms will be returned.",
"type": "string",
"format": null,
"required": false
},
{
"paramType": "query",
"name": "context",
"description": "Limit the search to a particular course/group (e.g. \"course_3\" or \"group_4\").",
"type": "string",
"format": null,
"required": false
},
{
"paramType": "query",
"name": "exclude",
"description": "Array of ids to exclude from the search. These may be user ids or\ncourse/group ids prefixed with \"course_\" or \"group_\" respectively,\ne.g. exclude[]=1&exclude[]=2&exclude[]=course_3",
"type": "array",
"format": null,
"required": false,
"items": {
"type": "string"
}
},
{
"paramType": "query",
"name": "type",
"description": "Limit the search just to users or contexts (groups/courses).",
"type": "string",
"format": null,
"required": false,
"enum": [
"user",
"context"
]
},
{
"paramType": "query",
"name": "user_id",
"description": "Search for a specific user id. This ignores the other above parameters,\nand will never return more than one result.",
"type": "integer",
"format": "int64",
"required": false
},
{
"paramType": "query",
"name": "from_conversation_id",
"description": "When searching by user_id, only users that could be normally messaged by\nthis user will be returned. This parameter allows you to specify a\nconversation that will be referenced for a shared context -- if both the\ncurrent user and the searched user are in the conversation, the user will\nbe returned. This is used to start new side conversations.",
"type": "integer",
"format": "int64",
"required": false
},
{
"paramType": "query",
"name": "permissions",
"description": "Array of permission strings to be checked for each matched context (e.g.\n\"send_messages\"). This argument determines which permissions may be\nreturned in the response; it won't prevent contexts from being returned if\nthey don't grant the permission(s).",
"type": "array",
"format": null,
"required": false,
"items": {
"type": "string"
}
}
],
"type": "void"
}
]
},
{
"path": "/v1/search/recipients",
"description": "Find valid recipients (users, courses and groups) that the current user\ncan send messages to. The /api/v1/search/recipients path is the preferred\nendpoint, /api/v1/conversations/find_recipients is deprecated.\n\nPagination is supported.",
"operations": [
{
"method": "GET",
"summary": "Find recipients",
"notes": "Find valid recipients (users, courses and groups) that the current user\ncan send messages to. The /api/v1/search/recipients path is the preferred\nendpoint, /api/v1/conversations/find_recipients is deprecated.\n\nPagination is supported.",
"nickname": "find_recipients_search",
"parameters": [
{
"paramType": "query",
"name": "search",
"description": "Search terms used for matching users/courses/groups (e.g. \"bob smith\"). If\nmultiple terms are given (separated via whitespace), only results matching\nall terms will be returned.",
"type": "string",
"format": null,
"required": false
},
{
"paramType": "query",
"name": "context",
"description": "Limit the search to a particular course/group (e.g. \"course_3\" or \"group_4\").",
"type": "string",
"format": null,
"required": false
},
{
"paramType": "query",
"name": "exclude",
"description": "Array of ids to exclude from the search. These may be user ids or\ncourse/group ids prefixed with \"course_\" or \"group_\" respectively,\ne.g. exclude[]=1&exclude[]=2&exclude[]=course_3",
"type": "array",
"format": null,
"required": false,
"items": {
"type": "string"
}
},
{
"paramType": "query",
"name": "type",
"description": "Limit the search just to users or contexts (groups/courses).",
"type": "string",
"format": null,
"required": false,
"enum": [
"user",
"context"
]
},
{
"paramType": "query",
"name": "user_id",
"description": "Search for a specific user id. This ignores the other above parameters,\nand will never return more than one result.",
"type": "integer",
"format": "int64",
"required": false
},
{
"paramType": "query",
"name": "from_conversation_id",
"description": "When searching by user_id, only users that could be normally messaged by\nthis user will be returned. This parameter allows you to specify a\nconversation that will be referenced for a shared context -- if both the\ncurrent user and the searched user are in the conversation, the user will\nbe returned. This is used to start new side conversations.",
"type": "integer",
"format": "int64",
"required": false
},
{
"paramType": "query",
"name": "permissions",
"description": "Array of permission strings to be checked for each matched context (e.g.\n\"send_messages\"). This argument determines which permissions may be\nreturned in the response; it won't prevent contexts from being returned if\nthey don't grant the permission(s).",
"type": "array",
"format": null,
"required": false,
"items": {
"type": "string"
}
}
],
"type": "void"
}
]
},
{
"path": "/v1/search/all_courses",
"description": "A paginated list of all courses visible in the public index",
"operations": [
{
"method": "GET",
"summary": "List all courses",
"notes": "A paginated list of all courses visible in the public index",
"nickname": "list_all_courses",
"parameters": [
{
"paramType": "query",
"name": "search",
"description": "Search terms used for matching users/courses/groups (e.g. \"bob smith\"). If\nmultiple terms are given (separated via whitespace), only results matching\nall terms will be returned.",
"type": "string",
"format": null,
"required": false
},
{
"paramType": "query",
"name": "public_only",
"description": "Only return courses with public content. Defaults to false.",
"type": "boolean",
"format": null,
"required": false
},
{
"paramType": "query",
"name": "open_enrollment_only",
"description": "Only return courses that allow self enrollment. Defaults to false.",
"type": "boolean",
"format": null,
"required": false
}
],
"type": "void"
}
]
}
],
"models": {
}
}