title | description | ms.date | ms.author | author | manager | ms.reviewer | audience | ms.topic | ms.collection | ms.localizationpriority |
---|---|---|---|---|---|---|---|---|---|---|
BatchDelete |
Use REST API to remove an applied document understanding model from one or more libraries. |
09/23/2022 |
chucked |
chuckedmonson |
pamgreen |
ssquires |
admin |
reference |
m365initiative-syntex |
high |
Removes an applied document understanding model from one or more libraries. Note that a model must be removed from all libraries before it can be deleted (see example).
POST /_api/machinelearning/publications/batchdelete HTTP/1.1
None
Header | Value |
---|---|
Accept | application/json;odata=verbose |
Content-Type | application/json;odata=verbose;charset=utf-8 |
x-requestdigest | The appropriate digest for current site. |
Name | Required | Type | Description |
---|---|---|---|
Publications | yes | MachineLearningPublicationEntityData[] | The collection of MachineLearningPublicationEntityData each of which specifies the model and target document library. |
Name | Required | Type | Description |
---|---|---|---|
ModelUniqueId | yes | string | The unique ID of the model file. |
TargetSiteUrl | yes | string | The full URL of the target library site. |
TargetWebServerRelativeUrl | yes | string | The server relative URL of the web for the target library. |
TargetLibraryServerRelativeUrl | yes | string | The server relative URL of the target library. |
Name | Type | Description |
---|---|---|
200 OK | This is a customized API to support removing a model from multi document libraries. In the case of partial success, 200 OK could still be returned and the caller needs to inspect the response body to understand if the model has been successfully removed from a document library. |
Name | Type | Description |
---|---|---|
TotalSuccesses | int | The total number of a model being successfully removed from a document library. |
TotalFailures | int | The total number of a model failing to be removed from a document library. |
Details | MachineLearningPublicationResult[] | The collection of MachineLearningPublicationResult each of which specifies the detailed result of removing the model from a document library. |
Name | Type | Description |
---|---|---|
StatusCode | int | The HTTP status code. |
ErrorMessage | string | The error message which tells what's wrong when apply the model to the document library. |
Publication | MachineLearningPublicationEntityData | It specifies the model info and the target document library. |
Name | Type | Description |
---|---|---|
ModelUniqueId | string | The unique ID of the model file. |
TargetSiteUrl | string | The full URL of the target library site. |
TargetWebServerRelativeUrl | string | The server relative URL of the web for the target library. |
TargetLibraryServerRelativeUrl | string | The server relative URL of the target library. |
In this sample, the ID of the Contoso Contract document understanding model is 7645e69d-21fb-4a24-a17a-9bdfa7cb63dc
.
{
"publications": [
{
"ModelUniqueId": "7645e69d-21fb-4a24-a17a-9bdfa7cb63dc",
"TargetSiteUrl": "https://constco.sharepoint-df.com/sites/docsite",
"TargetWebServerRelativeUrl": "/sites/docsite ",
"TargetLibraryServerRelativeUrl": "/sites/dcocsite/joedcos"
}
]
}
In the response, TotalFailures and TotalSuccesses refer to the number of failures and successes of the model being removed from the specified libraries.
Status code: 200
{
"Details": [
{
"ErrorMessage": null,
"Publication": {
"ModelUniqueId": "7645e69d-21fb-4a24-a17a-9bdfa7cb63dc",
"TargetSiteUrl": "https://contoso.sharepoint.com/sites/repository/",
"TargetWebServerRelativeUrl": "/sites/repository",
"TargetLibraryServerRelativeUrl": "/sites/repository/contracts",
"ViewOption": "NewViewAsDefault"
},
"StatusCode": 200
}
],
"TotalFailures": 0,
"TotalSuccesses": 1
}