@@ -28,7 +28,7 @@ For more information about SharePoint Add-in, see [SharePoint Add-ins](../sp-add
28
28
29
29
## Get available Add-ins in sites
30
30
31
- This API will return the Add-ins that could be used on the given sites. This contains two kinds of install, one is the Add-in installed on the site.
31
+ This API will return the Add-ins that could be used on the given sites. This contains two kinds of install, one is the Add-in installed on the site.
32
32
The other is the Add-in installed on the tenant level app catalog site, and it matches the conditions to use the Add-in.
33
33
For more information, see [ Tenancies and deployment scopes for SharePoint Add-ins] ( ../sp-add-ins/tenancies-and-deployment-scopes-for-sharepoint-add-ins.md ) .
34
34
@@ -42,13 +42,16 @@ POST {adminSiteUrl}/_api/web/AvailableAddIns
42
42
43
43
### Request body
44
44
45
- | Name | Required | Type | Description |
46
- | --------------------| ----------| ----------| -------------------------------------------------------------------------------------------------------|
47
- | serverRelativeUrls | yes | string[ ] | List of the server relative url of sites that want to get the available Add-ins. Maximum size is 500. |
45
+ | Name | Required | Type | Description |
46
+ | --------------------| ----------| ----------| -------------------------------------------------------------------------------------------------------------------------------------------------|
47
+ | serverRelativeUrls | no | string[ ] | List of the server relative url of sites that want to get the available Add-ins. Maximum size is 500. |
48
+ | urls | no | string[ ] | List of the url of sites that want to get the available Add-ins, both server relative url and absolute url are acceptable. Maximum size is 500. |
49
+
50
+ When urls is not null, serverRelativeUrls will be disregarded.
48
51
49
52
### Responses
50
53
51
- | Name | Type | Description |
54
+ | Name | Type | Description |
52
55
| -----------------------------| --------------------------------| --------------------------------------------------------------------------------------|
53
56
| addins | SPAddinInstanceInfo[ ] | Available Add-in instance object. |
54
57
| errorsWithServerRelativeUrl | SPErrorWithServerRelativeUrl[ ] | Server relative urls that failed to get available add-ins and corresponding reasons. |
@@ -88,7 +91,7 @@ POST {adminSiteUrl}/_api/web/AvailableAddIns
88
91
89
92
| Name | Type | Description |
90
93
| -------------------| --------| --------------------------------------------------------|
91
- | serverRelativeUrl | string | The serverRelativeUrl in the request body. |
94
+ | serverRelativeUrl | string | The serverRelativeUrl or url in the request body. |
92
95
| errorMessage | string | The error message why fetch the site's Add-ins failed. |
93
96
94
97
## Get Add-in permissions in site collections
@@ -111,13 +114,15 @@ POST {adminSiteUrl}/_api/web/AddinPermissions
111
114
112
115
#### SPAddinPermissionRequest
113
116
114
- | Name | Type | Description |
115
- | -------------------| ----------| --------------------------------------------------------------------------------------------------------------------------------|
116
- | serverRelativeUrl | string | The server relative url of the site collection. It will return site collection scope permissions of the given site collection. |
117
- | appIdentifiers | string[ ] | The identifier list of the Add-ins. |
117
+ | Name | Type | Description |
118
+ | -------------------| ----------| -------------------------------------------------------------------------------------------|
119
+ | serverRelativeUrl | string | The server relative url of the site collection. |
120
+ | url | string | The url of the site collection, both server relative url and absolute url are acceptable. |
121
+ | appIdentifiers | string[ ] | The identifier list of the Add-ins. |
118
122
119
- ### Responses
123
+ The serverRelativeUrl and url can't be both null. If both serverRelativeUrl and url are provided, the url will be used.
120
124
125
+ ### Responses
121
126
| Name | Type | Description |
122
127
| ------------------| -------------------------------| -----------------------------------------------------------------------|
123
128
| addinPermissions | SPAddinPermissionInfo[ ] | The returned permissions. |
@@ -131,6 +136,7 @@ POST {adminSiteUrl}/_api/web/AddinPermissions
131
136
| siteCollectionScopedPermissions | SPSiteCollectionScopedPermissionInfo[ ] | This is the permissions grant in site collection scope level. |
132
137
| appIdentifier | string | The identifier of the Add-in. |
133
138
| serverRelativeUrl | string | The server relative url of the site collection. |
139
+ | absoluteUrl | string | The absolute url of the site collection. |
134
140
| allowAppOnly | bool | This identifies if the Add-in allows app only mode. For more information, see [ Add-in authorization policy types in SharePoint] ( ../sp-add-ins/add-in-authorization-policy-types-in-sharepoint.md ) . |
135
141
136
142
#### SPTenantScopedPermissionInfo
@@ -155,11 +161,11 @@ POST {adminSiteUrl}/_api/web/AddinPermissions
155
161
156
162
#### SPAddinPermissionFailedInfo
157
163
158
- | Name | Type | Description |
159
- | -------------------| --------| -----------------------------------------------------------|
160
- | serverRelativeUrl | string | The server relative url of the site collection. |
161
- | appIdentifier | string | The identifier list of the Add-in. |
162
- | errorMessage | string | The error message why fetch the Add-in permission failed. |
164
+ | Name | Type | Description |
165
+ | -------------------| --------| ----------------------------------------------------------------- |
166
+ | serverRelativeUrl | string | The server relative url or absolute url of the site collection. |
167
+ | appIdentifier | string | The identifier list of the Add-in. |
168
+ | errorMessage | string | The error message why fetch the Add-in permission failed. |
163
169
164
170
## Get tenant ACS service principals
165
171
@@ -210,9 +216,12 @@ POST {adminSiteUrl}/_api/web/GetAddinPrincipalsHavingPermissionsInSites
210
216
211
217
### Request body
212
218
213
- | Name | Required | Type | Description |
214
- | --------------------| ----------| ----------| -------------------------------------------------------------------|
215
- | serverRelativeUrls | yes | string[ ] | List site collections' server relative url. Maximum size is 500. |
219
+ | Name | Required | Type | Description |
220
+ | --------------------| ----------| ----------| ------------------------------------------------------------------------------------------------------------|
221
+ | serverRelativeUrls | no | string[ ] | List site collections' server relative url. Maximum size is 500. |
222
+ | urls | no | string[ ] | List site collections' url, both server relative url and absolute url are acceptable. Maximum size is 500. |
223
+
224
+ When urls is not null, serverRelativeUrls will be disregarded.
216
225
217
226
### Responses
218
227
@@ -228,18 +237,19 @@ POST {adminSiteUrl}/_api/web/GetAddinPrincipalsHavingPermissionsInSites
228
237
| title | string | The title of the Add-in. |
229
238
| appIdentifier | string | The app identifier. |
230
239
| serverRelativeUrl | string | The server relative url of the site collection. |
240
+ | absoluteUrl | string | The absolute url of the site collection. |
231
241
232
242
233
243
#### SPErrorWithServerRelativeUrl
234
244
235
- | Name | Type | Description |
236
- | -------------------| --------| ----------------------------------------------------------|
237
- | serverRelativeUrl | string | The site collection's server relative url. |
238
- | errorMessage | string | The error message why fetch the Add-in principal failed. |
245
+ | Name | Type | Description |
246
+ | -------------------| --------| ------------------------------------------------------------ |
247
+ | serverRelativeUrl | string | The site collection's server relative url or absolute url. |
248
+ | errorMessage | string | The error message why fetch the Add-in principal failed. |
239
249
240
250
## Uninstall Add-ins
241
251
242
- This API will trigger an async job to uninstall the Add-in. If the job triggered successfully, the job id will be returned.
252
+ This API will trigger an async job to uninstall the Add-in. If the job triggered successfully, the job id will be returned.
243
253
244
254
This API needs the app to have Sites.FullControl.All permission.
245
255
@@ -257,10 +267,13 @@ POST {adminSiteUrl}/_api/web/UninstallAddins
257
267
258
268
#### SPUninstallAddinRequest
259
269
260
- | Name | Type | Description |
261
- | -------------------| --------| ----------------------------------|
262
- | serverRelativeUrl | string | The site's server relative url. |
263
- | appInstanceIds | Guid[ ] | The instance ids of the Add-ins. |
270
+ | Name | Type | Description |
271
+ | -------------------| --------| ---------------------------------------------------------------------------|
272
+ | serverRelativeUrl | string | The site's server relative url. |
273
+ | url | string | The site's url, both server relative url and absolute url are acceptable. |
274
+ | appInstanceIds | Guid[ ] | The instance ids of the Add-ins. |
275
+
276
+ The serverRelativeUrl and url can't be both null. If both serverRelativeUrl and url are provided, the url will be used.
264
277
265
278
### Responses
266
279
@@ -275,6 +288,7 @@ POST {adminSiteUrl}/_api/web/UninstallAddins
275
288
| -------------------| --------| ---------------------------------|
276
289
| appInstanceId | Guid | The instance id of the Add-in. |
277
290
| serverRelativeUrl | string | The site's server relative url. |
291
+ | absoluteUrl | string | The site's absolute url. |
278
292
| uninstallJobId | Guid | The triggered uninstall job id. |
279
293
280
294
#### SPFailToTriggerUninstallAddinJobResponse
@@ -288,8 +302,8 @@ POST {adminSiteUrl}/_api/web/UninstallAddins
288
302
289
303
## Get uninstall Add-in job status
290
304
291
- Since the uninstall Add-in is an async process, this API will provide the ability to check if the uninstall ends successfully.
292
- If the job ends successfully, then the job will be not found. If the job ends with failure, then it will return the error detail.
305
+ Since the uninstall Add-in is an async process, this API will provide the ability to check if the uninstall ends successfully.
306
+ If the job ends successfully, then the job will be not found. If the job ends with failure, then it will return the error detail.
293
307
294
308
This API needs the app to have at least Sites.Read.All permission.
295
309
@@ -301,16 +315,20 @@ POST {adminSiteUrl}/_api/web/GetAddinUninstallJobDetail
301
315
302
316
### Request body
303
317
304
- | Name | Required | Type | Description |
305
- | -------------------| ----------| --------| ---------------------------------|
306
- | jobId | yes | Guid | This uninstall job id. |
307
- | serverRelativeUrl | yes | string | The site's server relative url. |
318
+ | Name | Required | Type | Description |
319
+ | -------------------| ----------| --------| ----------------------------------------------------------------------------|
320
+ | jobId | yes | Guid | This uninstall job id. |
321
+ | serverRelativeUrl | no | string | The site's server relative url. |
322
+ | url | no | string | The site's url, both server relative url and absolute url are acceptable. |
323
+
324
+ The serverRelativeUrl and url can't be both null. If both serverRelativeUrl and url are provided, the url will be used.
308
325
309
326
### Responses
310
327
311
328
| Name | Type | Description |
312
329
| -------------------| -------------------------------| --------------------------------------------------|
313
330
| serverRelativeUrl | string | The site's server relative url. |
331
+ | absoluteUrl | string | The site's absolute url. |
314
332
| taskStartTime | DateTime | The time when the task starts executing. |
315
333
| jobId | Guid | The uninstall job id. |
316
334
| siteId | Guid | The site collection id. |
0 commit comments