Skip to content

Commit 4b13690

Browse files
committed
update the addin apis to accept full url as input
1 parent b80ec0f commit 4b13690

File tree

1 file changed

+31
-18
lines changed

1 file changed

+31
-18
lines changed

docs/apis/addin-management-apis.md

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ For more information about SharePoint Add-in, see [SharePoint Add-ins](../sp-add
2828

2929
## Get available Add-ins in sites
3030

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.
3232
The other is the Add-in installed on the tenant level app catalog site, and it matches the conditions to use the Add-in.
3333
For more information, see [Tenancies and deployment scopes for SharePoint Add-ins](../sp-add-ins/tenancies-and-deployment-scopes-for-sharepoint-add-ins.md).
3434

@@ -42,9 +42,11 @@ POST {adminSiteUrl}/_api/web/AvailableAddIns
4242

4343
### Request body
4444

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. |
48+
| fullUrls | no | string[] | List of the full url of sites that want to get the available Add-ins. |
49+
Max total count for serverRelativeUrls and fullUrls is 500. And they can't be both empty.
4850

4951
### Responses
5052

@@ -88,7 +90,7 @@ POST {adminSiteUrl}/_api/web/AvailableAddIns
8890

8991
| Name | Type | Description |
9092
|-------------------|--------|--------------------------------------------------------|
91-
| serverRelativeUrl | string | The serverRelativeUrl in the request body. |
93+
| serverRelativeUrl | string | The serverRelativeUrl or fullUrl in the request body. |
9294
| errorMessage | string | The error message why fetch the site's Add-ins failed. |
9395

9496
## Get Add-in permissions in site collections
@@ -114,6 +116,7 @@ POST {adminSiteUrl}/_api/web/AddinPermissions
114116
| Name | Type | Description |
115117
|-------------------|----------|--------------------------------------------------------------------------------------------------------------------------------|
116118
| serverRelativeUrl | string | The server relative url of the site collection. It will return site collection scope permissions of the given site collection. |
119+
| fullUrl | string | The full url of the site collection. It will return site collection scope permissions of the given site collection. |
117120
| appIdentifiers | string[] | The identifier list of the Add-ins. |
118121

119122
### Responses
@@ -131,6 +134,7 @@ POST {adminSiteUrl}/_api/web/AddinPermissions
131134
| siteCollectionScopedPermissions | SPSiteCollectionScopedPermissionInfo[] | This is the permissions grant in site collection scope level. |
132135
| appIdentifier | string | The identifier of the Add-in. |
133136
| serverRelativeUrl | string | The server relative url of the site collection. |
137+
| fullUrl | string | The full url of the site collection. |
134138
| 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). |
135139

136140
#### SPTenantScopedPermissionInfo
@@ -155,11 +159,11 @@ POST {adminSiteUrl}/_api/web/AddinPermissions
155159

156160
#### SPAddinPermissionFailedInfo
157161

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. |
162+
| Name | Type | Description |
163+
|-------------------|--------|-------------------------------------------------------------|
164+
| serverRelativeUrl | string | The server relative url or full url of the site collection. |
165+
| appIdentifier | string | The identifier list of the Add-in. |
166+
| errorMessage | string | The error message why fetch the Add-in permission failed. |
163167

164168
## Get tenant ACS service principals
165169

@@ -210,9 +214,11 @@ POST {adminSiteUrl}/_api/web/GetAddinPrincipalsHavingPermissionsInSites
210214

211215
### Request body
212216

213-
| Name | Required | Type | Description |
214-
|--------------------|----------|----------|-------------------------------------------------------------------|
215-
| serverRelativeUrls | yes | string[] | List site collections' server relative url. Maximum size is 500. |
217+
| Name | Required | Type | Description |
218+
|--------------------|----------|----------|---------------------------------------------|
219+
| serverRelativeUrls | no | string[] | List site collections' server relative url. |
220+
| fullUrls | no | string[] | List site collections' full url. |
221+
Max total count for serverRelativeUrls and fullUrls is 500. And they can't be both empty.
216222

217223
### Responses
218224

@@ -228,18 +234,19 @@ POST {adminSiteUrl}/_api/web/GetAddinPrincipalsHavingPermissionsInSites
228234
| title | string | The title of the Add-in. |
229235
| appIdentifier | string | The app identifier. |
230236
| serverRelativeUrl | string | The server relative url of the site collection. |
237+
| fullUrl | string | The full url of the site collection. |
231238

232239

233240
#### SPErrorWithServerRelativeUrl
234241

235242
| Name | Type | Description |
236243
|-------------------|--------|----------------------------------------------------------|
237-
| serverRelativeUrl | string | The site collection's server relative url. |
244+
| serverRelativeUrl | string | The site collection's server relative url or full url. |
238245
| errorMessage | string | The error message why fetch the Add-in principal failed. |
239246

240247
## Uninstall Add-ins
241248

242-
This API will trigger an async job to uninstall the Add-in. If the job triggered successfully, the job id will be returned.
249+
This API will trigger an async job to uninstall the Add-in. If the job triggered successfully, the job id will be returned.
243250

244251
This API needs the app to have Sites.FullControl.All permission.
245252

@@ -260,7 +267,9 @@ POST {adminSiteUrl}/_api/web/UninstallAddins
260267
| Name | Type | Description |
261268
|-------------------|--------|----------------------------------|
262269
| serverRelativeUrl | string | The site's server relative url. |
270+
| fullUrl | string | The site's full url. |
263271
| appInstanceIds | Guid[] | The instance ids of the Add-ins. |
272+
The serverRelativeUrl and fullUrl can't be both empty.
264273

265274
### Responses
266275

@@ -275,6 +284,7 @@ POST {adminSiteUrl}/_api/web/UninstallAddins
275284
|-------------------|--------|---------------------------------|
276285
| appInstanceId | Guid | The instance id of the Add-in. |
277286
| serverRelativeUrl | string | The site's server relative url. |
287+
| fullUrl | string | The site's full url. |
278288
| uninstallJobId | Guid | The triggered uninstall job id. |
279289

280290
#### SPFailToTriggerUninstallAddinJobResponse
@@ -288,8 +298,8 @@ POST {adminSiteUrl}/_api/web/UninstallAddins
288298

289299
## Get uninstall Add-in job status
290300

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.
301+
Since the uninstall Add-in is an async process, this API will provide the ability to check if the uninstall ends successfully.
302+
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.
293303

294304
This API needs the app to have at least Sites.Read.All permission.
295305

@@ -304,13 +314,16 @@ POST {adminSiteUrl}/_api/web/GetAddinUninstallJobDetail
304314
| Name | Required | Type | Description |
305315
|-------------------|----------|--------|---------------------------------|
306316
| jobId | yes | Guid | This uninstall job id. |
307-
| serverRelativeUrl | yes | string | The site's server relative url. |
317+
| serverRelativeUrl | no | string | The site's server relative url. |
318+
| fullUrl | no | string | The site's full url. |
319+
The serverRelativeUrl and fullUrl can't be both empty.
308320

309321
### Responses
310322

311323
| Name | Type | Description |
312324
|-------------------|-------------------------------|--------------------------------------------------|
313325
| serverRelativeUrl | string | The site's server relative url. |
326+
| fullUrl | string | The site's full url. |
314327
| taskStartTime | DateTime | The time when the task starts executing. |
315328
| jobId | Guid | The uninstall job id. |
316329
| siteId | Guid | The site collection id. |

0 commit comments

Comments
 (0)