From 4e27dc2fb607a28ccd872978b09aa912d4d684f7 Mon Sep 17 00:00:00 2001 From: mkm17 Date: Mon, 30 Sep 2024 21:52:55 +0200 Subject: [PATCH] Adds `spp model get` command closes #6105 --- docs/docs/cmd/spp/model/model-get.mdx | 308 ++++++++++++++++++ docs/src/config/sidebars.ts | 9 + src/m365/spp/commands.ts | 3 +- src/m365/spp/commands/model/model-get.spec.ts | 300 +++++++++++++++++ src/m365/spp/commands/model/model-get.ts | 129 ++++++++ src/utils/spp.spec.ts | 48 +++ src/utils/spp.ts | 28 ++ 7 files changed, 824 insertions(+), 1 deletion(-) create mode 100644 docs/docs/cmd/spp/model/model-get.mdx create mode 100644 src/m365/spp/commands/model/model-get.spec.ts create mode 100644 src/m365/spp/commands/model/model-get.ts create mode 100644 src/utils/spp.spec.ts create mode 100644 src/utils/spp.ts diff --git a/docs/docs/cmd/spp/model/model-get.mdx b/docs/docs/cmd/spp/model/model-get.mdx new file mode 100644 index 00000000000..a691d5094ef --- /dev/null +++ b/docs/docs/cmd/spp/model/model-get.mdx @@ -0,0 +1,308 @@ +import Global from '/docs/cmd/_global.mdx'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +# spp model get + +Retrieves information about a document understanding model + +## Usage + +```sh +m365 spp model get [options] +``` + +## Options + +```md definition-list +`-u, --siteUrl ` +: The URL of the content center site. + +`-i, --id [id]` +: The unique ID of the model to retrieve. Specify id or title but not both. + +`-t, --title [title]` +: The display name (case-sensitive) of the model to retrieve. Specify id or title but not both. + +`--listPublications` +: Retrieves information about the library where it has been applied. +``` + + + +## Examples + +Retrieve information about a SharePoint Premium document understanding model, using model UniqueId. + +```sh +m365 spp model get --siteUrl "https://contoso.sharepoint.com/sites/ContentCenter" --id "7645e69d-21fb-4a24-a17a-9bdfa7cb63dc" +``` + +Retrieve information about a SharePoint Premium document understanding model, using model Title + +```sh +m365 spp model get --siteUrl "https://contoso.sharepoint.com/sites/ContentCenter" --title "climicrosoft365Model.classifier" +``` + +## Response + + + + + ```json + { + "AIBuilderHybridModelType": null, + "AzureCognitivePrebuiltModelName": null, + "BaseContentTypeName": null, + "ConfidenceScore": "{\"trainingStatus\":{\"kind\":\"original\",\"ClassifierStatus\":{\"TrainingStatus\":\"success\",\"TimeStamp\":1604429035541},\"ExtractorsStatus\":[{\"TimeStamp\":1595871764667,\"ExtractorName\":\"Adressee\",\"TrainingStatus\":\"success\"},{\"TimeStamp\":1595871896822,\"ExtractorName\":\"Discount Percentage\",\"TrainingStatus\":\"success\"},{\"TimeStamp\":1595871961934,\"ExtractorName\":\"Date of Change\",\"TrainingStatus\":\"success\"},{\"TimeStamp\":1604407772191,\"ExtractorName\":\"Date Completed\",\"TrainingStatus\":\"success\"},{\"TimeStamp\":1604429033385,\"ExtractorName\":\"Contributor\",\"TrainingStatus\":\"success\"}]},\"modelAccuracy\":{\"Classifier\":1,\"Extractors\":{\"Adressee\":1,\"Discount Percentage\":1,\"Date of Change\":1,\"Date Completed\":1,\"Contributor\":1}},\"perSampleAccuracy\":{\"43\":{\"Classifier\":1,\"Extractors\":{\"Contributor\":1}},\"44\":{\"Classifier\":1,\"Extractors\":{\"Contributor\":1}},\"45\":{\"Classifier\":1,\"Extractors\":{\"Contributor\":1}},\"48\":{\"Classifier\":1,\"Extractors\":{\"Contributor\":1}},\"50\":{\"Classifier\":1,\"Extractors\":{\"Contributor\":1}},\"52\":{\"Classifier\":1,\"Extractors\":{}}},\"perSamplePrediction\":{\"43\":{\"Extractors\":{\"Contributor\":[\"Benefit Change Notice\"]}},\"44\":{\"Extractors\":{\"Contributor\":[\"Benefit Change Notice\"]}},\"45\":{\"Extractors\":{\"Contributor\":[\"Benefit Change Notice\"]}},\"48\":{\"Extractors\":{\"Contributor\":[\"Benefit Change Notice\"]}},\"50\":{\"Extractors\":{\"Contributor\":[\"Benefit Change Notice\"]}}},\"trainingFailures\":{}}", + "ContentTypeGroup": "Intelligent Document Content Types", + "ContentTypeId": "0x010100B992472522B7C04E9101F1CFD07E4ADC", + "ContentTypeName": "BenefitsChangeNotice", + "Created": "2020-11-03T12:30:55Z", + "CreatedBy": "i:0#.w|sharepoint\\system", + "DriveId": "b!7w273MPU8kiqSKc6SWaUkQ3wyRgeHbxDh-e6ShP9X-cXa2m8jDdHQ7UJXVLMbzgj", + "Explanations": "{\"Classifier\":[{\"id\":\"24f0b71f-87c6-4f7d-9797-88e9eab00cb6\",\"kind\":\"dictionaryFeature\",\"name\":\"Contains \\\"Benefit Change Notice\\\"\",\"active\":true,\"nGrams\":[\"Benefit Change Notice\"],\"caseSensitive\":true,\"ignoreDigitIdentity\":false,\"ignoreLetterIdentity\":false},{\"id\":\"849c3ca4-296a-4209-be33-d5be0f942d39\",\"kind\":\"modelFeature\",\"name\":\"Adressee\",\"active\":true,\"modelReference\":\"Adressee\",\"conceptId\":\"0a18ef8b-c0cd-435d-8a45-37738fef4f6f\"},{\"id\":\"41f80170-c054-42ae-8b30-cd0d9bc35874\",\"kind\":\"modelFeature\",\"name\":\"Discount Percentage\",\"active\":true,\"modelReference\":\"Discount Percentage\",\"conceptId\":\"48c09840-d2da-4416-a02d-68113da24d18\"},{\"id\":\"c3c46580-5570-4ea7-baa9-69bfc1f9e088\",\"kind\":\"modelFeature\",\"name\":\"Date of Change\",\"active\":true,\"modelReference\":\"Date of Change\",\"conceptId\":\"f39b4e2a-e945-4a2e-99a0-561334037a66\"},{\"id\":\"e138c9e0-849b-4207-9d5e-3e9925340bb5\",\"kind\":\"modelFeature\",\"name\":\"Date Completed\",\"active\":true,\"modelReference\":\"Date Completed\",\"conceptId\":\"3559972a-d7c5-4ccb-b8cb-e4b852da2399\"},{\"id\":\"ceb16569-72a4-486a-a7cc-296bad0747c0\",\"kind\":\"modelFeature\",\"name\":\"Contributor\",\"active\":true,\"modelReference\":\"Contributor\",\"conceptId\":\"6af8ef33-4bf1-49ca-93d3-7a2358746747\"}],\"Extractors\":{\"Adressee\":[{\"id\":\"c661eef3-c1cc-4c9f-a4c8-5b617dd46f88\",\"kind\":\"dictionaryFeature\",\"name\":\"\\\"Dear\\\"\",\"active\":true,\"nGrams\":[\"Dear\"],\"caseSensitive\":true,\"ignoreDigitIdentity\":false,\"ignoreLetterIdentity\":false}],\"Discount Percentage\":[{\"id\":\"a4f9c304-8867-4b82-abb6-b968e7ebca3b\",\"kind\":\"dictionaryFeature\",\"name\":\"\\\"a\\\"\",\"active\":true,\"nGrams\":[\"a\"],\"caseSensitive\":false,\"ignoreDigitIdentity\":false,\"ignoreLetterIdentity\":false},{\"id\":\"73f7ba0b-e69e-418e-8483-201bb2fb9c54\",\"kind\":\"dictionaryFeature\",\"name\":\"\\\"%\\\"\",\"active\":true,\"nGrams\":[\"%\"],\"caseSensitive\":false,\"ignoreDigitIdentity\":false,\"ignoreLetterIdentity\":false},{\"id\":\"3e4f9a86-226d-4f4b-af7d-891dc817ee8d\",\"kind\":\"proximityFeature\",\"name\":\"Proximity Between \\\"a\\\" and \\\"%\\\"\",\"active\":true,\"patterns\":[[{\"id\":\"a4f9c304-8867-4b82-abb6-b968e7ebca3b\",\"kind\":\"proximityFeatureReference\"},{\"kind\":\"proximityTokenRange\",\"minCount\":1,\"maxCount\":6},{\"id\":\"73f7ba0b-e69e-418e-8483-201bb2fb9c54\",\"kind\":\"proximityFeatureReference\"}]]}],\"Date of Change\":[{\"id\":\"76ba0449-f94c-4b8c-bd9e-abbb89c6ae25\",\"kind\":\"dictionaryFeature\",\"name\":\"Date (numeric)\",\"active\":true,\"nGrams\":[\"1/1/11\",\"1/11/11\",\"11/1/11\",\"11/11/11\",\"1/1/1111\",\"1/11/1111\",\"11/1/1111\",\"11/11/1111\",\"1111/1/1\",\"1111/1/11\",\"1111/11/11\",\"1111/11/11\"],\"caseSensitive\":true,\"ignoreDigitIdentity\":true,\"ignoreLetterIdentity\":false}],\"Date Completed\":[{\"id\":\"3f8b332a-abcd-4475-ad80-fbd827e265d4\",\"kind\":\"dictionaryFeature\",\"name\":\"Date (numeric)\",\"active\":true,\"nGrams\":[\"1/1/11\",\"1/11/11\",\"11/1/11\",\"11/11/11\",\"1/1/1111\",\"1/11/1111\",\"11/1/1111\",\"11/11/1111\",\"1111/1/1\",\"1111/1/11\",\"1111/11/11\",\"1111/11/11\"],\"caseSensitive\":true,\"ignoreDigitIdentity\":true,\"ignoreLetterIdentity\":false}],\"Contributor\":[{\"id\":\"9abdbfc9-6425-4e03-a344-305d3e60ad7f\",\"kind\":\"dictionaryFeature\",\"name\":\"text\",\"active\":true,\"nGrams\":[\"Benefit Change + Notice\"],\"caseSensitive\":false,\"ignoreDigitIdentity\":false,\"ignoreLetterIdentity\":false}]}}", + "ID": 3, + "LastTrained": "2020-11-03T18:43:53Z", + "ListID": "bc696b17-378c-4347-b509-5d52cc6f3823", + "ModelSettings": null, + "ModelType": 2, + "Modified": "2024-06-27T02:45:32Z", + "ModifiedBy": "i:0#.w|sharepoint\\system", + "ObjectId": "01XHOXSCXFBUHLC2OA7FDJB52PXCWAAE3S", + "PublicationType": 0, + "Schemas": "{\"Extractors\":{\"Adressee\":{\"concepts\":{\"0a18ef8b-c0cd-435d-8a45-37738fef4f6f\":{\"name\":\"Adressee\"}},\"relationships\":[]},\"Discount Percentage\":{\"concepts\":{\"48c09840-d2da-4416-a02d-68113da24d18\":{\"name\":\"Discount Percentage\"}},\"relationships\":[]},\"Date of Change\":{\"concepts\":{\"f39b4e2a-e945-4a2e-99a0-561334037a66\":{\"name\":\"Date of Change\"}},\"relationships\":[]},\"Date Completed\":{\"concepts\":{\"3559972a-d7c5-4ccb-b8cb-e4b852da2399\":{\"name\":\"Date Completed\"}},\"relationships\":[]},\"Contributor\":{\"concepts\":{\"6af8ef33-4bf1-49ca-93d3-7a2358746747\":{\"name\":\"Contributor\"}},\"relationships\":[]}}}", + "SourceSiteUrl": "https://contoso.sharepoint.com/sites/ContentCenter", + "SourceUrl": null, + "SourceWebServerRelativeUrl": "/sites/ContentCenter", + "UniqueId": "b10e0de5-c069-46f9-90f7-4fb8ac001372", + } + ``` + + + + + ```text + AIBuilderHybridModelType : null + AzureCognitivePrebuiltModelName: null + BaseContentTypeName : null + ConfidenceScore : {"trainingStatus":{"kind":"original","ClassifierStatus":{"TrainingStatus":"success","TimeStamp":1604429035541},"ExtractorsStatus":[{"TimeStamp":1595871764667,"ExtractorName":"Adressee","TrainingStatus":"success"},{"TimeStamp":1595871896822,"ExtractorName":"Discount Percentage","TrainingStatus":"success"},{"TimeStamp":1595871961934,"ExtractorName":"Date of Change","TrainingStatus":"success"},{"TimeStamp":1604407772191,"ExtractorName":"Date Completed","TrainingStatus":"success"},{"TimeStamp":1604429033385,"ExtractorName":"Contributor","TrainingStatus":"success"}]},"modelAccuracy":{"Classifier":1,"Extractors":{"Adressee":1,"Discount Percentage":1,"Date of Change":1,"Date Completed":1,"Contributor":1}},"perSampleAccuracy":{"43":{"Classifier":1,"Extractors":{"Contributor":1}},"44":{"Classifier":1,"Extractors":{"Contributor":1}},"45":{"Classifier":1,"Extractors":{"Contributor":1}},"48":{"Classifier":1,"Extractors":{"Contributor":1}},"50":{"Classifier":1,"Extractors":{"Contributor":1}},"52":{"Classifier":1,"Extractors":{}}},"perSamplePrediction":{"43":{"Extractors":{"Contributor":["Benefit Change Notice"]}},"44":{"Extractors":{"Contributor":["Benefit Change Notice"]}},"45":{"Extractors":{"Contributor":["Benefit Change Notice"]}},"48":{"Extractors":{"Contributor":["Benefit Change Notice"]}},"50":{"Extractors":{"Contributor":["Benefit Change Notice"]}}},"trainingFailures":{}} + ContentTypeGroup : Intelligent Document Content Types + ContentTypeId : 0x010100B992472522B7C04E9101F1CFD07E4ADC + ContentTypeName : BenefitsChangeNotice + Created : 2020-11-03T12:30:55Z + CreatedBy : i:0#.w|sharepoint\system + DriveId : b!7w273MPU8kiqSKc6SWaUkQ3wyRgeHbxDh-e6ShP9X-cXa2m8jDdHQ7UJXVLMbzgj + Explanations : {"Classifier":[{"id":"24f0b71f-87c6-4f7d-9797-88e9eab00cb6","kind":"dictionaryFeature","name":"Contains \"Benefit Change Notice\"","active":true,"nGrams":["Benefit Change Notice"],"caseSensitive":true,"ignoreDigitIdentity":false,"ignoreLetterIdentity":false},{"id":"849c3ca4-296a-4209-be33-d5be0f942d39","kind":"modelFeature","name":"Adressee","active":true,"modelReference":"Adressee","conceptId":"0a18ef8b-c0cd-435d-8a45-37738fef4f6f"},{"id":"41f80170-c054-42ae-8b30-cd0d9bc35874","kind":"modelFeature","name":"Discount Percentage","active":true,"modelReference":"Discount Percentage","conceptId":"48c09840-d2da-4416-a02d-68113da24d18"},{"id":"c3c46580-5570-4ea7-baa9-69bfc1f9e088","kind":"modelFeature","name":"Date of Change","active":true,"modelReference":"Date of Change","conceptId":"f39b4e2a-e945-4a2e-99a0-561334037a66"},{"id":"e138c9e0-849b-4207-9d5e-3e9925340bb5","kind":"modelFeature","name":"Date Completed","active":true,"modelReference":"Date Completed","conceptId":"3559972a-d7c5-4ccb-b8cb-e4b852da2399"},{"id":"ceb16569-72a4-486a-a7cc-296bad0747c0","kind":"modelFeature","name":"Contributor","active":true,"modelReference":"Contributor","conceptId":"6af8ef33-4bf1-49ca-93d3-7a2358746747"}],"Extractors":{"Adressee":[{"id":"c661eef3-c1cc-4c9f-a4c8-5b617dd46f88","kind":"dictionaryFeature","name":"\"Dear\"","active":true,"nGrams":["Dear"],"caseSensitive":true,"ignoreDigitIdentity":false,"ignoreLetterIdentity":false}],"Discount Percentage":[{"id":"a4f9c304-8867-4b82-abb6-b968e7ebca3b","kind":"dictionaryFeature","name":"\"a\"","active":true,"nGrams":["a"],"caseSensitive":false,"ignoreDigitIdentity":false,"ignoreLetterIdentity":false},{"id":"73f7ba0b-e69e-418e-8483-201bb2fb9c54","kind":"dictionaryFeature","name":"\"%\"","active":true,"nGrams":["%"],"caseSensitive":false,"ignoreDigitIdentity":false,"ignoreLetterIdentity":false},{"id":"3e4f9a86-226d-4f4b-af7d-891dc817ee8d","kind":"proximityFeature","name":"Proximity Between \"a\" and \"%\"","active":true,"patterns":[[{"id":"a4f9c304-8867-4b82-abb6-b968e7ebca3b","kind":"proximityFeatureReference"},{"kind":"proximityTokenRange","minCount":1,"maxCount":6},{"id":"73f7ba0b-e69e-418e-8483-201bb2fb9c54","kind":"proximityFeatureReference"}]]}],"Date of Change":[{"id":"76ba0449-f94c-4b8c-bd9e-abbb89c6ae25","kind":"dictionaryFeature","name":"Date (numeric)","active":true,"nGrams":["1/1/11","1/11/11","11/1/11","11/11/11","1/1/1111","1/11/1111","11/1/1111","11/11/1111","1111/1/1","1111/1/11","1111/11/11","1111/11/11"],"caseSensitive":true,"ignoreDigitIdentity":true,"ignoreLetterIdentity":false}],"Date Completed":[{"id":"3f8b332a-abcd-4475-ad80-fbd827e265d4","kind":"dictionaryFeature","name":"Date (numeric)","active":true,"nGrams":["1/1/11","1/11/11","11/1/11","11/11/11","1/1/1111","1/11/1111","11/1/1111","11/11/1111","1111/1/1","1111/1/11","1111/11/11","1111/11/11"],"caseSensitive":true,"ignoreDigitIdentity":true,"ignoreLetterIdentity":false}],"Contributor":[{"id":"9abdbfc9-6425-4e03-a344-305d3e60ad7f","kind":"dictionaryFeature","name":"text","active":true,"nGrams":["Benefit Change Notice"],"caseSensitive":false,"ignoreDigitIdentity":false,"ignoreLetterIdentity":false}]}} + ID : 3 + LastTrained : 2020-11-03T18:43:53Z + ListID : bc696b17-378c-4347-b509-5d52cc6f3823 + ModelSettings : null + ModelType : 2 + Modified : 2024-06-27T02:45:32Z + ModifiedBy : i:0#.w|sharepoint\system + ObjectId : 01XHOXSCXFBUHLC2OA7FDJB52PXCWAAE3S + PublicationType : 0 + SourceSiteUrl : https://contoso.sharepoint.com/sites/ContentCenter + SourceUrl : null + SourceWebServerRelativeUrl : /sites/ContentCenter + UniqueId : b10e0de5-c069-46f9-90f7-4fb8ac001372 + ``` + + + + + ```csv + AIBuilderHybridModelType,AzureCognitivePrebuiltModelName,BaseContentTypeName,ConfidenceScore,ContentTypeGroup,ContentTypeId,ContentTypeName,Created,CreatedBy,DriveId,Explanations,ID,LastTrained,ListID,ModelSettings,ModelType,Modified,ModifiedBy,ObjectId,PublicationType,Schemas,SourceSiteUrl,SourceUrl,SourceWebServerRelativeUrl,UniqueId + ,,,"{""trainingStatus"":{""kind"":""original"",""ClassifierStatus"":{""TrainingStatus"":""success"",""TimeStamp"":1604429035541},""ExtractorsStatus"":[{""TimeStamp"":1595871764667,""ExtractorName"":""Adressee"",""TrainingStatus"":""success""},{""TimeStamp"":1595871896822,""ExtractorName"":""Discount Percentage"",""TrainingStatus"":""success""},{""TimeStamp"":1595871961934,""ExtractorName"":""Date of Change"",""TrainingStatus"":""success""},{""TimeStamp"":1604407772191,""ExtractorName"":""Date Completed"",""TrainingStatus"":""success""},{""TimeStamp"":1604429033385,""ExtractorName"":""Contributor"",""TrainingStatus"":""success""}]},""modelAccuracy"":{""Classifier"":1,""Extractors"":{""Adressee"":1,""Discount Percentage"":1,""Date of Change"":1,""Date Completed"":1,""Contributor"":1}},""perSampleAccuracy"":{""43"":{""Classifier"":1,""Extractors"":{""Contributor"":1}},""44"":{""Classifier"":1,""Extractors"":{""Contributor"":1}},""45"":{""Classifier"":1,""Extractors"":{""Contributor"":1}},""48"":{""Classifier"":1,""Extractors"":{""Contributor"":1}},""50"":{""Classifier"":1,""Extractors"":{""Contributor"":1}},""52"":{""Classifier"":1,""Extractors"":{}}},""perSamplePrediction"":{""43"":{""Extractors"":{""Contributor"":[""Benefit Change Notice""]}},""44"":{""Extractors"":{""Contributor"":[""Benefit Change Notice""]}},""45"":{""Extractors"":{""Contributor"":[""Benefit Change Notice""]}},""48"":{""Extractors"":{""Contributor"":[""Benefit Change Notice""]}},""50"":{""Extractors"":{""Contributor"":[""Benefit Change Notice""]}}},""trainingFailures"":{}}",Intelligent Document Content Types,0x010100B992472522B7C04E9101F1CFD07E4ADC,BenefitsChangeNotice,2020-11-03T12:30:55Z,i:0#.w|sharepoint\system,b!7w273MPU8kiqSKc6SWaUkQ3wyRgeHbxDh-e6ShP9X-cXa2m8jDdHQ7UJXVLMbzgj,"{""Classifier"":[{""id"":""24f0b71f-87c6-4f7d-9797-88e9eab00cb6"",""kind"":""dictionaryFeature"",""name"":""Contains \""Benefit Change Notice\"""",""active"":true,""nGrams"":[""Benefit Change Notice""],""caseSensitive"":true,""ignoreDigitIdentity"":false,""ignoreLetterIdentity"":false},{""id"":""849c3ca4-296a-4209-be33-d5be0f942d39"",""kind"":""modelFeature"",""name"":""Adressee"",""active"":true,""modelReference"":""Adressee"",""conceptId"":""0a18ef8b-c0cd-435d-8a45-37738fef4f6f""},{""id"":""41f80170-c054-42ae-8b30-cd0d9bc35874"",""kind"":""modelFeature"",""name"":""Discount Percentage"",""active"":true,""modelReference"":""Discount Percentage"",""conceptId"":""48c09840-d2da-4416-a02d-68113da24d18""},{""id"":""c3c46580-5570-4ea7-baa9-69bfc1f9e088"",""kind"":""modelFeature"",""name"":""Date of Change"",""active"":true,""modelReference"":""Date of Change"",""conceptId"":""f39b4e2a-e945-4a2e-99a0-561334037a66""},{""id"":""e138c9e0-849b-4207-9d5e-3e9925340bb5"",""kind"":""modelFeature"",""name"":""Date Completed"",""active"":true,""modelReference"":""Date Completed"",""conceptId"":""3559972a-d7c5-4ccb-b8cb-e4b852da2399""},{""id"":""ceb16569-72a4-486a-a7cc-296bad0747c0"",""kind"":""modelFeature"",""name"":""Contributor"",""active"":true,""modelReference"":""Contributor"",""conceptId"":""6af8ef33-4bf1-49ca-93d3-7a2358746747""}],""Extractors"":{""Adressee"":[{""id"":""c661eef3-c1cc-4c9f-a4c8-5b617dd46f88"",""kind"":""dictionaryFeature"",""name"":""\""Dear\"""",""active"":true,""nGrams"":[""Dear""],""caseSensitive"":true,""ignoreDigitIdentity"":false,""ignoreLetterIdentity"":false}],""Discount Percentage"":[{""id"":""a4f9c304-8867-4b82-abb6-b968e7ebca3b"",""kind"":""dictionaryFeature"",""name"":""\""a\"""",""active"":true,""nGrams"":[""a""],""caseSensitive"":false,""ignoreDigitIdentity"":false,""ignoreLetterIdentity"":false},{""id"":""73f7ba0b-e69e-418e-8483-201bb2fb9c54"",""kind"":""dictionaryFeature"",""name"":""\""%\"""",""active"":true,""nGrams"":[""%""],""caseSensitive"":false,""ignoreDigitIdentity"":false,""ignoreLetterIdentity"":false},{""id"":""3e4f9a86-226d-4f4b-af7d-891dc817ee8d"",""kind"":""proximityFeature"",""name"":""Proximity Between \""a\"" and \""%\"""",""active"":true,""patterns"":[[{""id"":""a4f9c304-8867-4b82-abb6-b968e7ebca3b"",""kind"":""proximityFeatureReference""},{""kind"":""proximityTokenRange"",""minCount"":1,""maxCount"":6},{""id"":""73f7ba0b-e69e-418e-8483-201bb2fb9c54"",""kind"":""proximityFeatureReference""}]]}],""Date of Change"":[{""id"":""76ba0449-f94c-4b8c-bd9e-abbb89c6ae25"",""kind"":""dictionaryFeature"",""name"":""Date (numeric)"",""active"":true,""nGrams"":[""1/1/11"",""1/11/11"",""11/1/11"",""11/11/11"",""1/1/1111"",""1/11/1111"",""11/1/1111"",""11/11/1111"",""1111/1/1"",""1111/1/11"",""1111/11/11"",""1111/11/11""],""caseSensitive"":true,""ignoreDigitIdentity"":true,""ignoreLetterIdentity"":false}],""Date Completed"":[{""id"":""3f8b332a-abcd-4475-ad80-fbd827e265d4"",""kind"":""dictionaryFeature"",""name"":""Date (numeric)"",""active"":true,""nGrams"":[""1/1/11"",""1/11/11"",""11/1/11"",""11/11/11"",""1/1/1111"",""1/11/1111"",""11/1/1111"",""11/11/1111"",""1111/1/1"",""1111/1/11"",""1111/11/11"",""1111/11/11""],""caseSensitive"":true,""ignoreDigitIdentity"":true,""ignoreLetterIdentity"":false}],""Contributor"":[{""id"":""9abdbfc9-6425-4e03-a344-305d3e60ad7f"",""kind"":""dictionaryFeature"",""name"":""text"",""active"":true,""nGrams"":[""Benefit Change Notice""],""caseSensitive"":false,""ignoreDigitIdentity"":false,""ignoreLetterIdentity"":false}]}}",3,2020-11-03T18:43:53Z,bc696b17-378c-4347-b509-5d52cc6f3823,,2,2024-06-27T02:45:32Z,i:0#.w|sharepoint\system,01XHOXSCXFBUHLC2OA7FDJB52PXCWAAE3S,0,"{""Extractors"":{""Adressee"":{""concepts"":{""0a18ef8b-c0cd-435d-8a45-37738fef4f6f"":{""name"":""Adressee""}},""relationships"":[]},""Discount Percentage"":{""concepts"":{""48c09840-d2da-4416-a02d-68113da24d18"":{""name"":""Discount Percentage""}},""relationships"":[]},""Date of Change"":{""concepts"":{""f39b4e2a-e945-4a2e-99a0-561334037a66"":{""name"":""Date of Change""}},""relationships"":[]},""Date Completed"":{""concepts"":{""3559972a-d7c5-4ccb-b8cb-e4b852da2399"":{""name"":""Date Completed""}},""relationships"":[]},""Contributor"":{""concepts"":{""6af8ef33-4bf1-49ca-93d3-7a2358746747"":{""name"":""Contributor""}},""relationships"":[]}}}",https://contoso.sharepoint.com/sites/ContentCenter,,/sites/ContentCenter,b10e0de5-c069-46f9-90f7-4fb8ac001372 + ``` + + + + + ```md + # spp model get --siteUrl "https://contoso.sharepoint.com/sites/ContentCenter" --id "b10e0de5-c069-46f9-90f7-4fb8ac001372" --listPublications "true" + + Date: 29/09/2024 + + ## 3 + + Property | Value + ---------|------- + ConfidenceScore | {"trainingStatus":{"kind":"original","ClassifierStatus":{"TrainingStatus":"success","TimeStamp":1604429035541},"ExtractorsStatus":[{"TimeStamp":1595871764667,"ExtractorName":"Adressee","TrainingStatus":"success"},{"TimeStamp":1595871896822,"ExtractorName":"Discount Percentage","TrainingStatus":"success"},{"TimeStamp":1595871961934,"ExtractorName":"Date of Change","TrainingStatus":"success"},{"TimeStamp":1604407772191,"ExtractorName":"Date Completed","TrainingStatus":"success"},{"TimeStamp":1604429033385,"ExtractorName":"Contributor","TrainingStatus":"success"}]},"modelAccuracy":{"Classifier":1,"Extractors":{"Adressee":1,"Discount Percentage":1,"Date of Change":1,"Date Completed":1,"Contributor":1}},"perSampleAccuracy":{"43":{"Classifier":1,"Extractors":{"Contributor":1}},"44":{"Classifier":1,"Extractors":{"Contributor":1}},"45":{"Classifier":1,"Extractors":{"Contributor":1}},"48":{"Classifier":1,"Extractors":{"Contributor":1}},"50":{"Classifier":1,"Extractors":{"Contributor":1}},"52":{"Classifier":1,"Extractors":{}}},"perSamplePrediction":{"43":{"Extractors":{"Contributor":["Benefit Change Notice"]}},"44":{"Extractors":{"Contributor":["Benefit Change Notice"]}},"45":{"Extractors":{"Contributor":["Benefit Change Notice"]}},"48":{"Extractors":{"Contributor":["Benefit Change Notice"]}},"50":{"Extractors":{"Contributor":["Benefit Change Notice"]}}},"trainingFailures":{}} + ContentTypeGroup | Intelligent Document Content Types + ContentTypeId | 0x010100B992472522B7C04E9101F1CFD07E4ADC + ContentTypeName | BenefitsChangeNotice + Created | 2020-11-03T12:30:55Z + CreatedBy | i:0#.w\|sharepoint\system + DriveId | b!7w273MPU8kiqSKc6SWaUkQ3wyRgeHbxDh-e6ShP9X-cXa2m8jDdHQ7UJXVLMbzgj + Explanations | {"Classifier":[{"id":"24f0b71f-87c6-4f7d-9797-88e9eab00cb6","kind":"dictionaryFeature","name":"Contains \"Benefit Change Notice\"","active":true,"nGrams":["Benefit Change Notice"],"caseSensitive":true,"ignoreDigitIdentity":false,"ignoreLetterIdentity":false},{"id":"849c3ca4-296a-4209-be33-d5be0f942d39","kind":"modelFeature","name":"Adressee","active":true,"modelReference":"Adressee","conceptId":"0a18ef8b-c0cd-435d-8a45-37738fef4f6f"},{"id":"41f80170-c054-42ae-8b30-cd0d9bc35874","kind":"modelFeature","name":"Discount Percentage","active":true,"modelReference":"Discount Percentage","conceptId":"48c09840-d2da-4416-a02d-68113da24d18"},{"id":"c3c46580-5570-4ea7-baa9-69bfc1f9e088","kind":"modelFeature","name":"Date of Change","active":true,"modelReference":"Date of Change","conceptId":"f39b4e2a-e945-4a2e-99a0-561334037a66"},{"id":"e138c9e0-849b-4207-9d5e-3e9925340bb5","kind":"modelFeature","name":"Date Completed","active":true,"modelReference":"Date Completed","conceptId":"3559972a-d7c5-4ccb-b8cb-e4b852da2399"},{"id":"ceb16569-72a4-486a-a7cc-296bad0747c0","kind":"modelFeature","name":"Contributor","active":true,"modelReference":"Contributor","conceptId":"6af8ef33-4bf1-49ca-93d3-7a2358746747"}],"Extractors":{"Adressee":[{"id":"c661eef3-c1cc-4c9f-a4c8-5b617dd46f88","kind":"dictionaryFeature","name":"\"Dear\"","active":true,"nGrams":["Dear"],"caseSensitive":true,"ignoreDigitIdentity":false,"ignoreLetterIdentity":false}],"Discount Percentage":[{"id":"a4f9c304-8867-4b82-abb6-b968e7ebca3b","kind":"dictionaryFeature","name":"\"a\"","active":true,"nGrams":["a"],"caseSensitive":false,"ignoreDigitIdentity":false,"ignoreLetterIdentity":false},{"id":"73f7ba0b-e69e-418e-8483-201bb2fb9c54","kind":"dictionaryFeature","name":"\"%\"","active":true,"nGrams":["%"],"caseSensitive":false,"ignoreDigitIdentity":false,"ignoreLetterIdentity":false},{"id":"3e4f9a86-226d-4f4b-af7d-891dc817ee8d","kind":"proximityFeature","name":"Proximity Between \"a\" and \"%\"","active":true,"patterns":[[{"id":"a4f9c304-8867-4b82-abb6-b968e7ebca3b","kind":"proximityFeatureReference"},{"kind":"proximityTokenRange","minCount":1,"maxCount":6},{"id":"73f7ba0b-e69e-418e-8483-201bb2fb9c54","kind":"proximityFeatureReference"}]]}],"Date of Change":[{"id":"76ba0449-f94c-4b8c-bd9e-abbb89c6ae25","kind":"dictionaryFeature","name":"Date (numeric)","active":true,"nGrams":["1/1/11","1/11/11","11/1/11","11/11/11","1/1/1111","1/11/1111","11/1/1111","11/11/1111","1111/1/1","1111/1/11","1111/11/11","1111/11/11"],"caseSensitive":true,"ignoreDigitIdentity":true,"ignoreLetterIdentity":false}],"Date Completed":[{"id":"3f8b332a-abcd-4475-ad80-fbd827e265d4","kind":"dictionaryFeature","name":"Date (numeric)","active":true,"nGrams":["1/1/11","1/11/11","11/1/11","11/11/11","1/1/1111","1/11/1111","11/1/1111","11/11/1111","1111/1/1","1111/1/11","1111/11/11","1111/11/11"],"caseSensitive":true,"ignoreDigitIdentity":true,"ignoreLetterIdentity":false}],"Contributor":[{"id":"9abdbfc9-6425-4e03-a344-305d3e60ad7f","kind":"dictionaryFeature","name":"text","active":true,"nGrams":["Benefit Change Notice"],"caseSensitive":false,"ignoreDigitIdentity":false,"ignoreLetterIdentity":false}]}} + ID | 3 + LastTrained | 2020-11-03T18:43:53Z + ListID | bc696b17-378c-4347-b509-5d52cc6f3823 + ModelType | 2 + Modified | 2024-06-27T02:45:32Z + ModifiedBy | i:0#.w\|sharepoint\system + ObjectId | 01XHOXSCXFBUHLC2OA7FDJB52PXCWAAE3S + PublicationType | 0 + Schemas | {"Extractors":{"Adressee":{"concepts":{"0a18ef8b-c0cd-435d-8a45-37738fef4f6f":{"name":"Adressee"}},"relationships":[]},"Discount Percentage":{"concepts":{"48c09840-d2da-4416-a02d-68113da24d18":{"name":"Discount Percentage"}},"relationships":[]},"Date of Change":{"concepts":{"f39b4e2a-e945-4a2e-99a0-561334037a66":{"name":"Date of Change"}},"relationships":[]},"Date Completed":{"concepts":{"3559972a-d7c5-4ccb-b8cb-e4b852da2399":{"name":"Date Completed"}},"relationships":[]},"Contributor":{"concepts":{"6af8ef33-4bf1-49ca-93d3-7a2358746747":{"name":"Contributor"}},"relationships":[]}}} + SourceSiteUrl | https://contoso.sharepoint.com/sites/ContentCenter + SourceWebServerRelativeUrl | /sites/ContentCenter + UniqueId | b10e0de5-c069-46f9-90f7-4fb8ac001372 + ``` + + + + +### `listPublications` response + +When we make use of the option `listPublications` the response will differ. + +## Response + + + + + ```json + { + "AIBuilderHybridModelType": null, + "AzureCognitivePrebuiltModelName": null, + "BaseContentTypeName": null, + "ConfidenceScore": "{\"trainingStatus\":{\"kind\":\"original\",\"ClassifierStatus\":{\"TrainingStatus\":\"success\",\"TimeStamp\":1604429035541},\"ExtractorsStatus\":[{\"TimeStamp\":1595871764667,\"ExtractorName\":\"Adressee\",\"TrainingStatus\":\"success\"},{\"TimeStamp\":1595871896822,\"ExtractorName\":\"Discount Percentage\",\"TrainingStatus\":\"success\"},{\"TimeStamp\":1595871961934,\"ExtractorName\":\"Date of Change\",\"TrainingStatus\":\"success\"},{\"TimeStamp\":1604407772191,\"ExtractorName\":\"Date Completed\",\"TrainingStatus\":\"success\"},{\"TimeStamp\":1604429033385,\"ExtractorName\":\"Contributor\",\"TrainingStatus\":\"success\"}]},\"modelAccuracy\":{\"Classifier\":1,\"Extractors\":{\"Adressee\":1,\"Discount Percentage\":1,\"Date of Change\":1,\"Date Completed\":1,\"Contributor\":1}},\"perSampleAccuracy\":{\"43\":{\"Classifier\":1,\"Extractors\":{\"Contributor\":1}},\"44\":{\"Classifier\":1,\"Extractors\":{\"Contributor\":1}},\"45\":{\"Classifier\":1,\"Extractors\":{\"Contributor\":1}},\"48\":{\"Classifier\":1,\"Extractors\":{\"Contributor\":1}},\"50\":{\"Classifier\":1,\"Extractors\":{\"Contributor\":1}},\"52\":{\"Classifier\":1,\"Extractors\":{}}},\"perSamplePrediction\":{\"43\":{\"Extractors\":{\"Contributor\":[\"Benefit Change Notice\"]}},\"44\":{\"Extractors\":{\"Contributor\":[\"Benefit Change Notice\"]}},\"45\":{\"Extractors\":{\"Contributor\":[\"Benefit Change Notice\"]}},\"48\":{\"Extractors\":{\"Contributor\":[\"Benefit Change Notice\"]}},\"50\":{\"Extractors\":{\"Contributor\":[\"Benefit Change Notice\"]}}},\"trainingFailures\":{}}", + "ContentTypeGroup": "Intelligent Document Content Types", + "ContentTypeId": "0x010100B992472522B7C04E9101F1CFD07E4ADC", + "ContentTypeName": "BenefitsChangeNotice", + "Created": "2020-11-03T12:30:55Z", + "CreatedBy": "i:0#.w|sharepoint\\system", + "DriveId": "b!7w273MPU8kiqSKc6SWaUkQ3wyRgeHbxDh-e6ShP9X-cXa2m8jDdHQ7UJXVLMbzgj", + "Explanations": "{\"Classifier\":[{\"id\":\"24f0b71f-87c6-4f7d-9797-88e9eab00cb6\",\"kind\":\"dictionaryFeature\",\"name\":\"Contains \\\"Benefit Change Notice\\\"\",\"active\":true,\"nGrams\":[\"Benefit Change Notice\"],\"caseSensitive\":true,\"ignoreDigitIdentity\":false,\"ignoreLetterIdentity\":false},{\"id\":\"849c3ca4-296a-4209-be33-d5be0f942d39\",\"kind\":\"modelFeature\",\"name\":\"Adressee\",\"active\":true,\"modelReference\":\"Adressee\",\"conceptId\":\"0a18ef8b-c0cd-435d-8a45-37738fef4f6f\"},{\"id\":\"41f80170-c054-42ae-8b30-cd0d9bc35874\",\"kind\":\"modelFeature\",\"name\":\"Discount Percentage\",\"active\":true,\"modelReference\":\"Discount Percentage\",\"conceptId\":\"48c09840-d2da-4416-a02d-68113da24d18\"},{\"id\":\"c3c46580-5570-4ea7-baa9-69bfc1f9e088\",\"kind\":\"modelFeature\",\"name\":\"Date of Change\",\"active\":true,\"modelReference\":\"Date of Change\",\"conceptId\":\"f39b4e2a-e945-4a2e-99a0-561334037a66\"},{\"id\":\"e138c9e0-849b-4207-9d5e-3e9925340bb5\",\"kind\":\"modelFeature\",\"name\":\"Date Completed\",\"active\":true,\"modelReference\":\"Date Completed\",\"conceptId\":\"3559972a-d7c5-4ccb-b8cb-e4b852da2399\"},{\"id\":\"ceb16569-72a4-486a-a7cc-296bad0747c0\",\"kind\":\"modelFeature\",\"name\":\"Contributor\",\"active\":true,\"modelReference\":\"Contributor\",\"conceptId\":\"6af8ef33-4bf1-49ca-93d3-7a2358746747\"}],\"Extractors\":{\"Adressee\":[{\"id\":\"c661eef3-c1cc-4c9f-a4c8-5b617dd46f88\",\"kind\":\"dictionaryFeature\",\"name\":\"\\\"Dear\\\"\",\"active\":true,\"nGrams\":[\"Dear\"],\"caseSensitive\":true,\"ignoreDigitIdentity\":false,\"ignoreLetterIdentity\":false}],\"Discount Percentage\":[{\"id\":\"a4f9c304-8867-4b82-abb6-b968e7ebca3b\",\"kind\":\"dictionaryFeature\",\"name\":\"\\\"a\\\"\",\"active\":true,\"nGrams\":[\"a\"],\"caseSensitive\":false,\"ignoreDigitIdentity\":false,\"ignoreLetterIdentity\":false},{\"id\":\"73f7ba0b-e69e-418e-8483-201bb2fb9c54\",\"kind\":\"dictionaryFeature\",\"name\":\"\\\"%\\\"\",\"active\":true,\"nGrams\":[\"%\"],\"caseSensitive\":false,\"ignoreDigitIdentity\":false,\"ignoreLetterIdentity\":false},{\"id\":\"3e4f9a86-226d-4f4b-af7d-891dc817ee8d\",\"kind\":\"proximityFeature\",\"name\":\"Proximity Between \\\"a\\\" and \\\"%\\\"\",\"active\":true,\"patterns\":[[{\"id\":\"a4f9c304-8867-4b82-abb6-b968e7ebca3b\",\"kind\":\"proximityFeatureReference\"},{\"kind\":\"proximityTokenRange\",\"minCount\":1,\"maxCount\":6},{\"id\":\"73f7ba0b-e69e-418e-8483-201bb2fb9c54\",\"kind\":\"proximityFeatureReference\"}]]}],\"Date of Change\":[{\"id\":\"76ba0449-f94c-4b8c-bd9e-abbb89c6ae25\",\"kind\":\"dictionaryFeature\",\"name\":\"Date (numeric)\",\"active\":true,\"nGrams\":[\"1/1/11\",\"1/11/11\",\"11/1/11\",\"11/11/11\",\"1/1/1111\",\"1/11/1111\",\"11/1/1111\",\"11/11/1111\",\"1111/1/1\",\"1111/1/11\",\"1111/11/11\",\"1111/11/11\"],\"caseSensitive\":true,\"ignoreDigitIdentity\":true,\"ignoreLetterIdentity\":false}],\"Date Completed\":[{\"id\":\"3f8b332a-abcd-4475-ad80-fbd827e265d4\",\"kind\":\"dictionaryFeature\",\"name\":\"Date (numeric)\",\"active\":true,\"nGrams\":[\"1/1/11\",\"1/11/11\",\"11/1/11\",\"11/11/11\",\"1/1/1111\",\"1/11/1111\",\"11/1/1111\",\"11/11/1111\",\"1111/1/1\",\"1111/1/11\",\"1111/11/11\",\"1111/11/11\"],\"caseSensitive\":true,\"ignoreDigitIdentity\":true,\"ignoreLetterIdentity\":false}],\"Contributor\":[{\"id\":\"9abdbfc9-6425-4e03-a344-305d3e60ad7f\",\"kind\":\"dictionaryFeature\",\"name\":\"text\",\"active\":true,\"nGrams\":[\"Benefit Change + Notice\"],\"caseSensitive\":false,\"ignoreDigitIdentity\":false,\"ignoreLetterIdentity\":false}]}}", + "ID": 3, + "LastTrained": "2020-11-03T18:43:53Z", + "ListID": "bc696b17-378c-4347-b509-5d52cc6f3823", + "ModelSettings": null, + "ModelType": 2, + "Modified": "2024-06-27T02:45:32Z", + "ModifiedBy": "i:0#.w|sharepoint\\system", + "ObjectId": "01XHOXSCXFBUHLC2OA7FDJB52PXCWAAE3S", + "PublicationType": 0, + "Schemas": "{\"Extractors\":{\"Adressee\":{\"concepts\":{\"0a18ef8b-c0cd-435d-8a45-37738fef4f6f\":{\"name\":\"Adressee\"}},\"relationships\":[]},\"Discount Percentage\":{\"concepts\":{\"48c09840-d2da-4416-a02d-68113da24d18\":{\"name\":\"Discount Percentage\"}},\"relationships\":[]},\"Date of Change\":{\"concepts\":{\"f39b4e2a-e945-4a2e-99a0-561334037a66\":{\"name\":\"Date of Change\"}},\"relationships\":[]},\"Date Completed\":{\"concepts\":{\"3559972a-d7c5-4ccb-b8cb-e4b852da2399\":{\"name\":\"Date Completed\"}},\"relationships\":[]},\"Contributor\":{\"concepts\":{\"6af8ef33-4bf1-49ca-93d3-7a2358746747\":{\"name\":\"Contributor\"}},\"relationships\":[]}}}", + "SourceSiteUrl": "https://contoso.sharepoint.com/sites/ContentCenter", + "SourceUrl": null, + "SourceWebServerRelativeUrl": "/sites/ContentCenter", + "UniqueId": "b10e0de5-c069-46f9-90f7-4fb8ac001372", + "Publications": [ + { + "Created": "2020-11-03T12:52:12Z", + "CreatedBy": "i:0#.f|membership|user@contoso.onmicrosoft.com", + "DriveId": "b!7w273MPU8kiqSKc6SWaUkQ3wyRgeHbxDh-e6ShP9X-e-6B-bO36LRI87VfSrxwy9", + "HasTargetSitePermission": true, + "ID": 1, + "ModelId": 3, + "ModelName": "BenefitsChangeNotice.classifier", + "ModelType": 0, + "ModelUniqueId": "b10e0de5-c069-46f9-90f7-4fb8ac001372", + "ModelVersion": "2.0", + "Modified": "2020-11-03T18:45:18Z", + "ModifiedBy": "i:0#.f|membership|user@contoso.onmicrosoft.com", + "ObjectId": "01XHOXSCVXVZCQAAQWCNGK6NGADKKZUMW7", + "PublicationType": 1, + "TargetLibraryId": "7eb6c306-1680-4ba9-9bbe-6b5b7efb27be", + "TargetLibraryName": "Documents", + "TargetLibraryRemoved": false, + "TargetLibraryServerRelativeUrl": "/sites/Spaces/Shared%20Documents", + "TargetLibraryUrl": "https://contoso.sharepoint.com/sites/Spaces/Shared%20Documents", + "TargetSiteId": "7e44de0a-30e3-45ab-a601-057298c9068f", + "TargetSiteUrl": "https://contoso.sharepoint.com/sites/Spaces", + "TargetTableListId": "00000000-0000-0000-0000-000000000000", + "TargetTableListName": null, + "TargetTableListRemoved": false, + "TargetTableListServerRelativeUrl": null, + "TargetTableListUrl": null, + "TargetWebId": "9166df43-8e45-43b8-94ef-3a22826346de", + "TargetWebName": "Spaces", + "TargetWebServerRelativeUrl": "/sites/Spaces", + "UniqueId": "0045aeb7-1602-4c13-af34-c01a959a32df", + "ViewOption": "NewViewAsDefault" + } + ] + } + ``` + + + + + ```text + AIBuilderHybridModelType : null + AzureCognitivePrebuiltModelName: null + BaseContentTypeName : null + ConfidenceScore : {"trainingStatus":{"kind":"original","ClassifierStatus":{"TrainingStatus":"success","TimeStamp":1604429035541},"ExtractorsStatus":[{"TimeStamp":1595871764667,"ExtractorName":"Adressee","TrainingStatus":"success"},{"TimeStamp":1595871896822,"ExtractorName":"Discount Percentage","TrainingStatus":"success"},{"TimeStamp":1595871961934,"ExtractorName":"Date of Change","TrainingStatus":"success"},{"TimeStamp":1604407772191,"ExtractorName":"Date Completed","TrainingStatus":"success"},{"TimeStamp":1604429033385,"ExtractorName":"Contributor","TrainingStatus":"success"}]},"modelAccuracy":{"Classifier":1,"Extractors":{"Adressee":1,"Discount Percentage":1,"Date of Change":1,"Date Completed":1,"Contributor":1}},"perSampleAccuracy":{"43":{"Classifier":1,"Extractors":{"Contributor":1}},"44":{"Classifier":1,"Extractors":{"Contributor":1}},"45":{"Classifier":1,"Extractors":{"Contributor":1}},"48":{"Classifier":1,"Extractors":{"Contributor":1}},"50":{"Classifier":1,"Extractors":{"Contributor":1}},"52":{"Classifier":1,"Extractors":{}}},"perSamplePrediction":{"43":{"Extractors":{"Contributor":["Benefit Change Notice"]}},"44":{"Extractors":{"Contributor":["Benefit Change Notice"]}},"45":{"Extractors":{"Contributor":["Benefit Change Notice"]}},"48":{"Extractors":{"Contributor":["Benefit Change Notice"]}},"50":{"Extractors":{"Contributor":["Benefit Change Notice"]}}},"trainingFailures":{}} + ContentTypeGroup : Intelligent Document Content Types + ContentTypeId : 0x010100B992472522B7C04E9101F1CFD07E4ADC + ContentTypeName : BenefitsChangeNotice + Created : 2020-11-03T12:30:55Z + CreatedBy : i:0#.w|sharepoint\system + DriveId : b!7w273MPU8kiqSKc6SWaUkQ3wyRgeHbxDh-e6ShP9X-cXa2m8jDdHQ7UJXVLMbzgj + Explanations : {"Classifier":[{"id":"24f0b71f-87c6-4f7d-9797-88e9eab00cb6","kind":"dictionaryFeature","name":"Contains \"Benefit Change Notice\"","active":true,"nGrams":["Benefit Change Notice"],"caseSensitive":true,"ignoreDigitIdentity":false,"ignoreLetterIdentity":false},{"id":"849c3ca4-296a-4209-be33-d5be0f942d39","kind":"modelFeature","name":"Adressee","active":true,"modelReference":"Adressee","conceptId":"0a18ef8b-c0cd-435d-8a45-37738fef4f6f"},{"id":"41f80170-c054-42ae-8b30-cd0d9bc35874","kind":"modelFeature","name":"Discount Percentage","active":true,"modelReference":"Discount Percentage","conceptId":"48c09840-d2da-4416-a02d-68113da24d18"},{"id":"c3c46580-5570-4ea7-baa9-69bfc1f9e088","kind":"modelFeature","name":"Date of Change","active":true,"modelReference":"Date of Change","conceptId":"f39b4e2a-e945-4a2e-99a0-561334037a66"},{"id":"e138c9e0-849b-4207-9d5e-3e9925340bb5","kind":"modelFeature","name":"Date Completed","active":true,"modelReference":"Date Completed","conceptId":"3559972a-d7c5-4ccb-b8cb-e4b852da2399"},{"id":"ceb16569-72a4-486a-a7cc-296bad0747c0","kind":"modelFeature","name":"Contributor","active":true,"modelReference":"Contributor","conceptId":"6af8ef33-4bf1-49ca-93d3-7a2358746747"}],"Extractors":{"Adressee":[{"id":"c661eef3-c1cc-4c9f-a4c8-5b617dd46f88","kind":"dictionaryFeature","name":"\"Dear\"","active":true,"nGrams":["Dear"],"caseSensitive":true,"ignoreDigitIdentity":false,"ignoreLetterIdentity":false}],"Discount Percentage":[{"id":"a4f9c304-8867-4b82-abb6-b968e7ebca3b","kind":"dictionaryFeature","name":"\"a\"","active":true,"nGrams":["a"],"caseSensitive":false,"ignoreDigitIdentity":false,"ignoreLetterIdentity":false},{"id":"73f7ba0b-e69e-418e-8483-201bb2fb9c54","kind":"dictionaryFeature","name":"\"%\"","active":true,"nGrams":["%"],"caseSensitive":false,"ignoreDigitIdentity":false,"ignoreLetterIdentity":false},{"id":"3e4f9a86-226d-4f4b-af7d-891dc817ee8d","kind":"proximityFeature","name":"Proximity Between \"a\" and \"%\"","active":true,"patterns":[[{"id":"a4f9c304-8867-4b82-abb6-b968e7ebca3b","kind":"proximityFeatureReference"},{"kind":"proximityTokenRange","minCount":1,"maxCount":6},{"id":"73f7ba0b-e69e-418e-8483-201bb2fb9c54","kind":"proximityFeatureReference"}]]}],"Date of Change":[{"id":"76ba0449-f94c-4b8c-bd9e-abbb89c6ae25","kind":"dictionaryFeature","name":"Date (numeric)","active":true,"nGrams":["1/1/11","1/11/11","11/1/11","11/11/11","1/1/1111","1/11/1111","11/1/1111","11/11/1111","1111/1/1","1111/1/11","1111/11/11","1111/11/11"],"caseSensitive":true,"ignoreDigitIdentity":true,"ignoreLetterIdentity":false}],"Date Completed":[{"id":"3f8b332a-abcd-4475-ad80-fbd827e265d4","kind":"dictionaryFeature","name":"Date (numeric)","active":true,"nGrams":["1/1/11","1/11/11","11/1/11","11/11/11","1/1/1111","1/11/1111","11/1/1111","11/11/1111","1111/1/1","1111/1/11","1111/11/11","1111/11/11"],"caseSensitive":true,"ignoreDigitIdentity":true,"ignoreLetterIdentity":false}],"Contributor":[{"id":"9abdbfc9-6425-4e03-a344-305d3e60ad7f","kind":"dictionaryFeature","name":"text","active":true,"nGrams":["Benefit Change Notice"],"caseSensitive":false,"ignoreDigitIdentity":false,"ignoreLetterIdentity":false}]}} + ID : 3 + LastTrained : 2020-11-03T18:43:53Z + ListID : bc696b17-378c-4347-b509-5d52cc6f3823 + ModelSettings : null + ModelType : 2 + Modified : 2024-06-27T02:45:32Z + ModifiedBy : i:0#.w|sharepoint\system + ObjectId : 01XHOXSCXFBUHLC2OA7FDJB52PXCWAAE3S + PublicationType : 0 + Publications : [{"Created":"2020-11-03T12:52:12Z","CreatedBy":"i:0#.f|membership|user@contoso.onmicrosoft.com","DriveId":"b!7w273MPU8kiqSKc6SWaUkQ3wyRgeHbxDh-e6ShP9X-e-6B-bO36LRI87VfSrxwy9","HasTargetSitePermission":true,"ID":1,"ModelId":3,"ModelName":"BenefitsChangeNotice.classifier","ModelType":0,"ModelUniqueId":"b10e0de5-c069-46f9-90f7-4fb8ac001372","ModelVersion":"2.0","Modified":"2020-11-03T18:45:18Z","ModifiedBy":"i:0#.f|membership|user@contoso.onmicrosoft.com","ObjectId":"01XHOXSCVXVZCQAAQWCNGK6NGADKKZUMW7","PublicationType":1,"TargetLibraryId":"7eb6c306-1680-4ba9-9bbe-6b5b7efb27be","TargetLibraryName":"Documents","TargetLibraryRemoved":false,"TargetLibraryServerRelativeUrl":"/sites/Spaces/Shared%20Documents","TargetLibraryUrl":"https://contoso.sharepoint.com/sites/Spaces/Shared%20Documents","TargetSiteId":"7e44de0a-30e3-45ab-a601-057298c9068f","TargetSiteUrl":"https://contoso.sharepoint.com/sites/Spaces","TargetTableListId":"00000000-0000-0000-0000-000000000000","TargetTableListName":null,"TargetTableListRemoved":false,"TargetTableListServerRelativeUrl":null,"TargetTableListUrl":null,"TargetWebId":"9166df43-8e45-43b8-94ef-3a22826346de","TargetWebName":"Spaces","TargetWebServerRelativeUrl":"/sites/Spaces","UniqueId":"0045aeb7-1602-4c13-af34-c01a959a32df","ViewOption":"NewViewAsDefault"}] + Schemas : {"Extractors":{"Adressee":{"concepts":{"0a18ef8b-c0cd-435d-8a45-37738fef4f6f":{"name":"Adressee"}},"relationships":[]},"Discount Percentage":{"concepts":{"48c09840-d2da-4416-a02d-68113da24d18":{"name":"Discount Percentage"}},"relationships":[]},"Date of Change":{"concepts":{"f39b4e2a-e945-4a2e-99a0-561334037a66":{"name":"Date of Change"}},"relationships":[]},"Date Completed":{"concepts":{"3559972a-d7c5-4ccb-b8cb-e4b852da2399":{"name":"Date Completed"}},"relationships":[]},"Contributor":{"concepts":{"6af8ef33-4bf1-49ca-93d3-7a2358746747":{"name":"Contributor"}},"relationships":[]}}} + SourceSiteUrl : https://contoso.sharepoint.com/sites/ContentCenter + SourceUrl : null + SourceWebServerRelativeUrl : /sites/ContentCenter + UniqueId : b10e0de5-c069-46f9-90f7-4fb8ac001372 + ``` + + + + + ```csv + AIBuilderHybridModelType,AzureCognitivePrebuiltModelName,BaseContentTypeName,ConfidenceScore,ContentTypeGroup,ContentTypeId,ContentTypeName,Created,CreatedBy,DriveId,Explanations,ID,LastTrained,ListID,ModelSettings,ModelType,Modified,ModifiedBy,ObjectId,PublicationType,Schemas,SourceSiteUrl,SourceUrl,SourceWebServerRelativeUrl,UniqueId + ,,,"{""trainingStatus"":{""kind"":""original"",""ClassifierStatus"":{""TrainingStatus"":""success"",""TimeStamp"":1604429035541},""ExtractorsStatus"":[{""TimeStamp"":1595871764667,""ExtractorName"":""Adressee"",""TrainingStatus"":""success""},{""TimeStamp"":1595871896822,""ExtractorName"":""Discount Percentage"",""TrainingStatus"":""success""},{""TimeStamp"":1595871961934,""ExtractorName"":""Date of Change"",""TrainingStatus"":""success""},{""TimeStamp"":1604407772191,""ExtractorName"":""Date Completed"",""TrainingStatus"":""success""},{""TimeStamp"":1604429033385,""ExtractorName"":""Contributor"",""TrainingStatus"":""success""}]},""modelAccuracy"":{""Classifier"":1,""Extractors"":{""Adressee"":1,""Discount Percentage"":1,""Date of Change"":1,""Date Completed"":1,""Contributor"":1}},""perSampleAccuracy"":{""43"":{""Classifier"":1,""Extractors"":{""Contributor"":1}},""44"":{""Classifier"":1,""Extractors"":{""Contributor"":1}},""45"":{""Classifier"":1,""Extractors"":{""Contributor"":1}},""48"":{""Classifier"":1,""Extractors"":{""Contributor"":1}},""50"":{""Classifier"":1,""Extractors"":{""Contributor"":1}},""52"":{""Classifier"":1,""Extractors"":{}}},""perSamplePrediction"":{""43"":{""Extractors"":{""Contributor"":[""Benefit Change Notice""]}},""44"":{""Extractors"":{""Contributor"":[""Benefit Change Notice""]}},""45"":{""Extractors"":{""Contributor"":[""Benefit Change Notice""]}},""48"":{""Extractors"":{""Contributor"":[""Benefit Change Notice""]}},""50"":{""Extractors"":{""Contributor"":[""Benefit Change Notice""]}}},""trainingFailures"":{}}",Intelligent Document Content Types,0x010100B992472522B7C04E9101F1CFD07E4ADC,BenefitsChangeNotice,2020-11-03T12:30:55Z,i:0#.w|sharepoint\system,b!7w273MPU8kiqSKc6SWaUkQ3wyRgeHbxDh-e6ShP9X-cXa2m8jDdHQ7UJXVLMbzgj,"{""Classifier"":[{""id"":""24f0b71f-87c6-4f7d-9797-88e9eab00cb6"",""kind"":""dictionaryFeature"",""name"":""Contains \""Benefit Change Notice\"""",""active"":true,""nGrams"":[""Benefit Change Notice""],""caseSensitive"":true,""ignoreDigitIdentity"":false,""ignoreLetterIdentity"":false},{""id"":""849c3ca4-296a-4209-be33-d5be0f942d39"",""kind"":""modelFeature"",""name"":""Adressee"",""active"":true,""modelReference"":""Adressee"",""conceptId"":""0a18ef8b-c0cd-435d-8a45-37738fef4f6f""},{""id"":""41f80170-c054-42ae-8b30-cd0d9bc35874"",""kind"":""modelFeature"",""name"":""Discount Percentage"",""active"":true,""modelReference"":""Discount Percentage"",""conceptId"":""48c09840-d2da-4416-a02d-68113da24d18""},{""id"":""c3c46580-5570-4ea7-baa9-69bfc1f9e088"",""kind"":""modelFeature"",""name"":""Date of Change"",""active"":true,""modelReference"":""Date of Change"",""conceptId"":""f39b4e2a-e945-4a2e-99a0-561334037a66""},{""id"":""e138c9e0-849b-4207-9d5e-3e9925340bb5"",""kind"":""modelFeature"",""name"":""Date Completed"",""active"":true,""modelReference"":""Date Completed"",""conceptId"":""3559972a-d7c5-4ccb-b8cb-e4b852da2399""},{""id"":""ceb16569-72a4-486a-a7cc-296bad0747c0"",""kind"":""modelFeature"",""name"":""Contributor"",""active"":true,""modelReference"":""Contributor"",""conceptId"":""6af8ef33-4bf1-49ca-93d3-7a2358746747""}],""Extractors"":{""Adressee"":[{""id"":""c661eef3-c1cc-4c9f-a4c8-5b617dd46f88"",""kind"":""dictionaryFeature"",""name"":""\""Dear\"""",""active"":true,""nGrams"":[""Dear""],""caseSensitive"":true,""ignoreDigitIdentity"":false,""ignoreLetterIdentity"":false}],""Discount Percentage"":[{""id"":""a4f9c304-8867-4b82-abb6-b968e7ebca3b"",""kind"":""dictionaryFeature"",""name"":""\""a\"""",""active"":true,""nGrams"":[""a""],""caseSensitive"":false,""ignoreDigitIdentity"":false,""ignoreLetterIdentity"":false},{""id"":""73f7ba0b-e69e-418e-8483-201bb2fb9c54"",""kind"":""dictionaryFeature"",""name"":""\""%\"""",""active"":true,""nGrams"":[""%""],""caseSensitive"":false,""ignoreDigitIdentity"":false,""ignoreLetterIdentity"":false},{""id"":""3e4f9a86-226d-4f4b-af7d-891dc817ee8d"",""kind"":""proximityFeature"",""name"":""Proximity Between \""a\"" and \""%\"""",""active"":true,""patterns"":[[{""id"":""a4f9c304-8867-4b82-abb6-b968e7ebca3b"",""kind"":""proximityFeatureReference""},{""kind"":""proximityTokenRange"",""minCount"":1,""maxCount"":6},{""id"":""73f7ba0b-e69e-418e-8483-201bb2fb9c54"",""kind"":""proximityFeatureReference""}]]}],""Date of Change"":[{""id"":""76ba0449-f94c-4b8c-bd9e-abbb89c6ae25"",""kind"":""dictionaryFeature"",""name"":""Date (numeric)"",""active"":true,""nGrams"":[""1/1/11"",""1/11/11"",""11/1/11"",""11/11/11"",""1/1/1111"",""1/11/1111"",""11/1/1111"",""11/11/1111"",""1111/1/1"",""1111/1/11"",""1111/11/11"",""1111/11/11""],""caseSensitive"":true,""ignoreDigitIdentity"":true,""ignoreLetterIdentity"":false}],""Date Completed"":[{""id"":""3f8b332a-abcd-4475-ad80-fbd827e265d4"",""kind"":""dictionaryFeature"",""name"":""Date (numeric)"",""active"":true,""nGrams"":[""1/1/11"",""1/11/11"",""11/1/11"",""11/11/11"",""1/1/1111"",""1/11/1111"",""11/1/1111"",""11/11/1111"",""1111/1/1"",""1111/1/11"",""1111/11/11"",""1111/11/11""],""caseSensitive"":true,""ignoreDigitIdentity"":true,""ignoreLetterIdentity"":false}],""Contributor"":[{""id"":""9abdbfc9-6425-4e03-a344-305d3e60ad7f"",""kind"":""dictionaryFeature"",""name"":""text"",""active"":true,""nGrams"":[""Benefit Change Notice""],""caseSensitive"":false,""ignoreDigitIdentity"":false,""ignoreLetterIdentity"":false}]}}",3,2020-11-03T18:43:53Z,bc696b17-378c-4347-b509-5d52cc6f3823,,2,2024-06-27T02:45:32Z,i:0#.w|sharepoint\system,01XHOXSCXFBUHLC2OA7FDJB52PXCWAAE3S,0,"{""Extractors"":{""Adressee"":{""concepts"":{""0a18ef8b-c0cd-435d-8a45-37738fef4f6f"":{""name"":""Adressee""}},""relationships"":[]},""Discount Percentage"":{""concepts"":{""48c09840-d2da-4416-a02d-68113da24d18"":{""name"":""Discount Percentage""}},""relationships"":[]},""Date of Change"":{""concepts"":{""f39b4e2a-e945-4a2e-99a0-561334037a66"":{""name"":""Date of Change""}},""relationships"":[]},""Date Completed"":{""concepts"":{""3559972a-d7c5-4ccb-b8cb-e4b852da2399"":{""name"":""Date Completed""}},""relationships"":[]},""Contributor"":{""concepts"":{""6af8ef33-4bf1-49ca-93d3-7a2358746747"":{""name"":""Contributor""}},""relationships"":[]}}}",https://contoso.sharepoint.com/sites/ContentCenter,,/sites/ContentCenter,b10e0de5-c069-46f9-90f7-4fb8ac001372 + ``` + + + + + ```md + # spp model get --siteUrl "https://contoso.sharepoint.com/sites/ContentCenter" --id "b10e0de5-c069-46f9-90f7-4fb8ac001372" --listPublications "true" + + Date: 29/09/2024 + + ## 3 + + Property | Value + ---------|------- + ConfidenceScore | {"trainingStatus":{"kind":"original","ClassifierStatus":{"TrainingStatus":"success","TimeStamp":1604429035541},"ExtractorsStatus":[{"TimeStamp":1595871764667,"ExtractorName":"Adressee","TrainingStatus":"success"},{"TimeStamp":1595871896822,"ExtractorName":"Discount Percentage","TrainingStatus":"success"},{"TimeStamp":1595871961934,"ExtractorName":"Date of Change","TrainingStatus":"success"},{"TimeStamp":1604407772191,"ExtractorName":"Date Completed","TrainingStatus":"success"},{"TimeStamp":1604429033385,"ExtractorName":"Contributor","TrainingStatus":"success"}]},"modelAccuracy":{"Classifier":1,"Extractors":{"Adressee":1,"Discount Percentage":1,"Date of Change":1,"Date Completed":1,"Contributor":1}},"perSampleAccuracy":{"43":{"Classifier":1,"Extractors":{"Contributor":1}},"44":{"Classifier":1,"Extractors":{"Contributor":1}},"45":{"Classifier":1,"Extractors":{"Contributor":1}},"48":{"Classifier":1,"Extractors":{"Contributor":1}},"50":{"Classifier":1,"Extractors":{"Contributor":1}},"52":{"Classifier":1,"Extractors":{}}},"perSamplePrediction":{"43":{"Extractors":{"Contributor":["Benefit Change Notice"]}},"44":{"Extractors":{"Contributor":["Benefit Change Notice"]}},"45":{"Extractors":{"Contributor":["Benefit Change Notice"]}},"48":{"Extractors":{"Contributor":["Benefit Change Notice"]}},"50":{"Extractors":{"Contributor":["Benefit Change Notice"]}}},"trainingFailures":{}} + ContentTypeGroup | Intelligent Document Content Types + ContentTypeId | 0x010100B992472522B7C04E9101F1CFD07E4ADC + ContentTypeName | BenefitsChangeNotice + Created | 2020-11-03T12:30:55Z + CreatedBy | i:0#.w\|sharepoint\system + DriveId | b!7w273MPU8kiqSKc6SWaUkQ3wyRgeHbxDh-e6ShP9X-cXa2m8jDdHQ7UJXVLMbzgj + Explanations | {"Classifier":[{"id":"24f0b71f-87c6-4f7d-9797-88e9eab00cb6","kind":"dictionaryFeature","name":"Contains \"Benefit Change Notice\"","active":true,"nGrams":["Benefit Change Notice"],"caseSensitive":true,"ignoreDigitIdentity":false,"ignoreLetterIdentity":false},{"id":"849c3ca4-296a-4209-be33-d5be0f942d39","kind":"modelFeature","name":"Adressee","active":true,"modelReference":"Adressee","conceptId":"0a18ef8b-c0cd-435d-8a45-37738fef4f6f"},{"id":"41f80170-c054-42ae-8b30-cd0d9bc35874","kind":"modelFeature","name":"Discount Percentage","active":true,"modelReference":"Discount Percentage","conceptId":"48c09840-d2da-4416-a02d-68113da24d18"},{"id":"c3c46580-5570-4ea7-baa9-69bfc1f9e088","kind":"modelFeature","name":"Date of Change","active":true,"modelReference":"Date of Change","conceptId":"f39b4e2a-e945-4a2e-99a0-561334037a66"},{"id":"e138c9e0-849b-4207-9d5e-3e9925340bb5","kind":"modelFeature","name":"Date Completed","active":true,"modelReference":"Date Completed","conceptId":"3559972a-d7c5-4ccb-b8cb-e4b852da2399"},{"id":"ceb16569-72a4-486a-a7cc-296bad0747c0","kind":"modelFeature","name":"Contributor","active":true,"modelReference":"Contributor","conceptId":"6af8ef33-4bf1-49ca-93d3-7a2358746747"}],"Extractors":{"Adressee":[{"id":"c661eef3-c1cc-4c9f-a4c8-5b617dd46f88","kind":"dictionaryFeature","name":"\"Dear\"","active":true,"nGrams":["Dear"],"caseSensitive":true,"ignoreDigitIdentity":false,"ignoreLetterIdentity":false}],"Discount Percentage":[{"id":"a4f9c304-8867-4b82-abb6-b968e7ebca3b","kind":"dictionaryFeature","name":"\"a\"","active":true,"nGrams":["a"],"caseSensitive":false,"ignoreDigitIdentity":false,"ignoreLetterIdentity":false},{"id":"73f7ba0b-e69e-418e-8483-201bb2fb9c54","kind":"dictionaryFeature","name":"\"%\"","active":true,"nGrams":["%"],"caseSensitive":false,"ignoreDigitIdentity":false,"ignoreLetterIdentity":false},{"id":"3e4f9a86-226d-4f4b-af7d-891dc817ee8d","kind":"proximityFeature","name":"Proximity Between \"a\" and \"%\"","active":true,"patterns":[[{"id":"a4f9c304-8867-4b82-abb6-b968e7ebca3b","kind":"proximityFeatureReference"},{"kind":"proximityTokenRange","minCount":1,"maxCount":6},{"id":"73f7ba0b-e69e-418e-8483-201bb2fb9c54","kind":"proximityFeatureReference"}]]}],"Date of Change":[{"id":"76ba0449-f94c-4b8c-bd9e-abbb89c6ae25","kind":"dictionaryFeature","name":"Date (numeric)","active":true,"nGrams":["1/1/11","1/11/11","11/1/11","11/11/11","1/1/1111","1/11/1111","11/1/1111","11/11/1111","1111/1/1","1111/1/11","1111/11/11","1111/11/11"],"caseSensitive":true,"ignoreDigitIdentity":true,"ignoreLetterIdentity":false}],"Date Completed":[{"id":"3f8b332a-abcd-4475-ad80-fbd827e265d4","kind":"dictionaryFeature","name":"Date (numeric)","active":true,"nGrams":["1/1/11","1/11/11","11/1/11","11/11/11","1/1/1111","1/11/1111","11/1/1111","11/11/1111","1111/1/1","1111/1/11","1111/11/11","1111/11/11"],"caseSensitive":true,"ignoreDigitIdentity":true,"ignoreLetterIdentity":false}],"Contributor":[{"id":"9abdbfc9-6425-4e03-a344-305d3e60ad7f","kind":"dictionaryFeature","name":"text","active":true,"nGrams":["Benefit Change Notice"],"caseSensitive":false,"ignoreDigitIdentity":false,"ignoreLetterIdentity":false}]}} + ID | 3 + LastTrained | 2020-11-03T18:43:53Z + ListID | bc696b17-378c-4347-b509-5d52cc6f3823 + ModelType | 2 + Modified | 2024-06-27T02:45:32Z + ModifiedBy | i:0#.w\|sharepoint\system + ObjectId | 01XHOXSCXFBUHLC2OA7FDJB52PXCWAAE3S + PublicationType | 0 + Schemas | {"Extractors":{"Adressee":{"concepts":{"0a18ef8b-c0cd-435d-8a45-37738fef4f6f":{"name":"Adressee"}},"relationships":[]},"Discount Percentage":{"concepts":{"48c09840-d2da-4416-a02d-68113da24d18":{"name":"Discount Percentage"}},"relationships":[]},"Date of Change":{"concepts":{"f39b4e2a-e945-4a2e-99a0-561334037a66":{"name":"Date of Change"}},"relationships":[]},"Date Completed":{"concepts":{"3559972a-d7c5-4ccb-b8cb-e4b852da2399":{"name":"Date Completed"}},"relationships":[]},"Contributor":{"concepts":{"6af8ef33-4bf1-49ca-93d3-7a2358746747":{"name":"Contributor"}},"relationships":[]}}} + SourceSiteUrl | https://contoso.sharepoint.com/sites/ContentCenter + SourceWebServerRelativeUrl | /sites/ContentCenter + UniqueId | b10e0de5-c069-46f9-90f7-4fb8ac001372 + ``` + + + diff --git a/docs/src/config/sidebars.ts b/docs/src/config/sidebars.ts index 0370e28df09..5264cc265aa 100644 --- a/docs/src/config/sidebars.ts +++ b/docs/src/config/sidebars.ts @@ -3952,6 +3952,15 @@ const sidebars: SidebarsConfig = { id: 'cmd/spp/contentcenter/contentcenter-list' } ] + }, + { + model: [ + { + type: 'doc', + label: 'model get', + id: 'cmd/spp/model/model-get' + } + ] } ] }, diff --git a/src/m365/spp/commands.ts b/src/m365/spp/commands.ts index d3309979bb6..6925b2f010f 100644 --- a/src/m365/spp/commands.ts +++ b/src/m365/spp/commands.ts @@ -1,5 +1,6 @@ const prefix: string = 'spp'; export default { - CONTENTCENTER_LIST: `${prefix} contentcenter list` + CONTENTCENTER_LIST: `${prefix} contentcenter list`, + MODEL_GET: `${prefix} model get` }; \ No newline at end of file diff --git a/src/m365/spp/commands/model/model-get.spec.ts b/src/m365/spp/commands/model/model-get.spec.ts new file mode 100644 index 00000000000..12ab1b1f29a --- /dev/null +++ b/src/m365/spp/commands/model/model-get.spec.ts @@ -0,0 +1,300 @@ +import assert from 'assert'; +import sinon from 'sinon'; +import auth from '../../../../Auth.js'; +import { cli } from '../../../../cli/cli.js'; +import { CommandInfo } from '../../../../cli/CommandInfo.js'; +import { Logger } from '../../../../cli/Logger.js'; +import { CommandError } from '../../../../Command.js'; +import request from '../../../../request.js'; +import { telemetry } from '../../../../telemetry.js'; +import { pid } from '../../../../utils/pid.js'; +import { session } from '../../../../utils/session.js'; +import { sinonUtil } from '../../../../utils/sinonUtil.js'; +import commands from '../../commands.js'; +import command from './model-get.js'; + +describe(commands.MODEL_GET, () => { + let log: string[]; + let logger: Logger; + let loggerLogSpy: sinon.SinonSpy; + let commandInfo: CommandInfo; + const model = { + "AIBuilderHybridModelType": null, + "AzureCognitivePrebuiltModelName": null, + "BaseContentTypeName": null, + "ConfidenceScore": "{\"trainingStatus\":{\"kind\":\"original\",\"ClassifierStatus\":{\"TrainingStatus\":\"success\",\"TimeStamp\":1716547860981},\"ExtractorsStatus\":[{\"TimeStamp\":1716547860173,\"ExtractorName\":\"Name\",\"TrainingStatus\":\"success\"}]},\"modelAccuracy\":{\"Classifier\":1,\"Extractors\":{\"Name\":0.333333343}},\"perSampleAccuracy\":{\"1\":{\"Classifier\":1,\"Extractors\":{\"Name\":1}},\"2\":{\"Classifier\":1,\"Extractors\":{\"Name\":0}},\"3\":{\"Classifier\":1,\"Extractors\":{\"Name\":0}},\"4\":{\"Classifier\":1,\"Extractors\":{\"Name\":0}},\"5\":{\"Classifier\":1,\"Extractors\":{\"Name\":0}},\"6\":{\"Classifier\":1,\"Extractors\":{\"Name\":1}}},\"perSamplePrediction\":{\"1\":{\"Extractors\":{\"Name\":[\"Michał\"]}},\"2\":{\"Extractors\":{\"Name\":[]}},\"3\":{\"Extractors\":{\"Name\":[]}},\"4\":{\"Extractors\":{\"Name\":[]}},\"5\":{\"Extractors\":{\"Name\":[]}},\"6\":{\"Extractors\":{\"Name\":[]}}},\"trainingFailures\":{}}", + "ContentTypeGroup": "Intelligent Document Content Types", + "ContentTypeId": "0x010100A5C3671D1FB1A64D9F280C628D041692", + "ContentTypeName": "TeachingModel", + "Created": "2024-05-23T16:51:29Z", + "CreatedBy": "i:0#.f|membership|user@contoso.onmicrosoft.com", + "DriveId": "b!qTVLltt1P02LUgejOy6O_1amoFeu1EJBlawH83UtYbQs_H3KVKAcQpuQOpNLl646", + "Explanations": "{\"Classifier\":[{\"id\":\"950f39cd-5e72-4442-ae8a-ea4bae32962c\",\"kind\":\"regexFeature\",\"name\":\"Email address\",\"active\":true,\"pattern\":\"[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+.[A-Za-z]{2,6}\"},{\"id\":\"d3f2940d-1df1-4ba8-975a-db3a4d626d5c\",\"kind\":\"dictionaryFeature\",\"name\":\"FirstName\",\"active\":true,\"nGrams\":[\"Michał\"],\"caseSensitive\":false,\"ignoreDigitIdentity\":false,\"ignoreLetterIdentity\":false},{\"id\":\"077966e1-73be-44c9-855f-a4eade6a280b\",\"kind\":\"modelFeature\",\"name\":\"Name\",\"active\":true,\"modelReference\":\"Name\",\"conceptId\":\"309b64e5-acd5-4538-a5b6-c6bfcdc1ffbf\"}],\"Extractors\":{\"Name\":[{\"id\":\"69e412bc-e5bc-4657-b378-34a01966bb92\",\"kind\":\"dictionaryFeature\",\"name\":\"Before label\",\"active\":true,\"nGrams\":[\"Test\",\"'Surname\",\"Test (\"],\"caseSensitive\":false,\"ignoreDigitIdentity\":false,\"ignoreLetterIdentity\":false}]}}", + "ID": 1, + "LastTrained": "2024-05-24T17:51:16Z", + "ListID": "ca7dfc2c-a054-421c-9b90-3a934b97ae3a", + "ModelSettings": "{\"ModelOrigin\":{\"LibraryId\":\"8a6027ab-c584-4394-ba9c-3dc4dd152b65\",\"Published\":false,\"SelecteFileUniqueIds\":[]}}", + "ModelType": 2, + "Modified": "2024-05-24T17:51:02Z", + "ModifiedBy": "i:0#.f|membership|user@contoso.onmicrosoft.com", + "ObjectId": "01HQDCWVGIEBDRN3RVK5A3UJW3M4TCMT45", + "PublicationType": 0, + "Schemas": "{\"Version\":2,\"Extractors\":{\"Name\":{\"concepts\":{\"309b64e5-acd5-4538-a5b6-c6bfcdc1ffbf\":{\"name\":\"Name\"}},\"relationships\":[],\"id\":\"Name\"}}}", + "SourceSiteUrl": "https://contoso.sharepoint.com/sites/SyntexTest", + "SourceUrl": null, + "SourceWebServerRelativeUrl": "/sites/SyntexTest", + "UniqueId": "164720c8-35ee-4157-ba26-db6726264f9d" + }; + + const publications = [ + { + "Created": "2020-11-03T12:52:12Z", + "CreatedBy": "i:0#.f|membership|user@contoso.onmicrosoft.com", + "DriveId": "b!7w273MPU8kiqSKc6SWaUkQ3wyRgeHbxDh-e6ShP9X-e-6B-bO36LRI87VfSrxwy9", + "HasTargetSitePermission": true, + "ID": 1, + "ModelId": 3, + "ModelName": "BenefitsChangeNotice.classifier", + "ModelType": 0, + "ModelUniqueId": "b10e0de5-c069-46f9-90f7-4fb8ac001372", + "ModelVersion": "2.0", + "Modified": "2020-11-03T18:45:18Z", + "ModifiedBy": "i:0#.f|membership|user@contoso.onmicrosoft.com", + "ObjectId": "01XHOXSCVXVZCQAAQWCNGK6NGADKKZUMW7", + "PublicationType": 1, + "TargetLibraryId": "7eb6c306-1680-4ba9-9bbe-6b5b7efb27be", + "TargetLibraryName": "Documents", + "TargetLibraryRemoved": false, + "TargetLibraryServerRelativeUrl": "/sites/SyntexTest/Shared%20Documents", + "TargetLibraryUrl": "https://contoso.sharepoint.com/sites/SyntexTest/Shared%20Documents", + "TargetSiteId": "7e44de0a-30e3-45ab-a601-057298c9068f", + "TargetSiteUrl": "https://contoso.sharepoint.com/sites/SyntexTest", + "TargetTableListId": "00000000-0000-0000-0000-000000000000", + "TargetTableListName": null, + "TargetTableListRemoved": false, + "TargetTableListServerRelativeUrl": null, + "TargetTableListUrl": null, + "TargetWebId": "9166df43-8e45-43b8-94ef-3a22826346de", + "TargetWebName": "SyntexTest", + "TargetWebServerRelativeUrl": "/sites/SyntexTest", + "UniqueId": "0045aeb7-1602-4c13-af34-c01a959a32df", + "ViewOption": "NewViewAsDefault" + } + ]; + + before(() => { + sinon.stub(auth, 'restoreAuth').resolves(); + sinon.stub(telemetry, 'trackEvent').returns(); + sinon.stub(pid, 'getProcessName').returns(''); + sinon.stub(session, 'getId').returns(''); + auth.connection.active = true; + commandInfo = cli.getCommandInfo(command); + }); + + beforeEach(() => { + log = []; + logger = { + log: async (msg: string) => { + log.push(msg); + }, + logRaw: async (msg: string) => { + log.push(msg); + }, + logToStderr: async (msg: string) => { + log.push(msg); + } + }; + loggerLogSpy = sinon.spy(logger, 'log'); + }); + + afterEach(() => { + sinonUtil.restore([ + request.get + ]); + }); + + after(() => { + sinon.restore(); + auth.connection.active = false; + }); + + it('has correct name', () => { + assert.strictEqual(command.name, commands.MODEL_GET); + }); + + it('has a description', () => { + assert.notStrictEqual(command.description, null); + }); + + it('passes validation when required parameters are valid with id', async () => { + const actual = await command.validate({ options: { siteUrl: 'https://contoso.sharepoint.com/sites/sales', id: '9b1b1e42-794b-4c71-93ac-5ed92488b67f' } }, commandInfo); + assert.strictEqual(actual, true); + }); + + it('passes validation when required parameters are valid with title', async () => { + const actual = await command.validate({ options: { siteUrl: 'https://contoso.sharepoint.com/sites/sales', title: 'ModelName' } }, commandInfo); + assert.strictEqual(actual, true); + }); + + it('passes validation when required parameters are valid with id and listPublications', async () => { + const actual = await command.validate({ options: { siteUrl: 'https://contoso.sharepoint.com/sites/sales', id: '9b1b1e42-794b-4c71-93ac-5ed92488b67f', listPublications: true } }, commandInfo); + assert.strictEqual(actual, true); + }); + + it('passes validation when required parameters are valid with title and listPublications', async () => { + const actual = await command.validate({ options: { siteUrl: 'https://contoso.sharepoint.com/sites/sales', title: 'ModelName', listPublications: true } }, commandInfo); + assert.strictEqual(actual, true); + }); + + it('fails validation when siteUrl is not valid', async () => { + const actual = await command.validate({ options: { siteUrl: 'invalidUrl', id: '9b1b1e42-794b-4c71-93ac-5ed92488b67f' } }, commandInfo); + assert.notStrictEqual(actual, true); + }); + + it('fails validation when id is not valid', async () => { + const actual = await command.validate({ options: { siteUrl: 'https://contoso.sharepoint.com/sites/sales', id: 'foo' } }, commandInfo); + assert.notStrictEqual(actual, true); + }); + + it('correctly handles site is not Content Site', async () => { + sinon.stub(request, 'get').callsFake(async (opts) => { + if (opts.url === `https://contoso.sharepoint.com/sites/portal/_api/web?$select=WebTemplateConfiguration`) { + return { + WebTemplateConfiguration: 'SITEPAGEPUBLISHING#0' + }; + } + + throw 'Invalid request'; + }); + + await assert.rejects(command.action(logger, { options: { verbose: true, siteUrl: 'https://contoso.sharepoint.com/sites/portal', id: '9b1b1e42-794b-4c71-93ac-5ed92488b67f' } }), + new CommandError('https://contoso.sharepoint.com/sites/portal is not a content site.')); + }); + + + it('correctly handles an access denied error', async () => { + sinon.stub(request, 'get').callsFake(async (opts) => { + if (opts.url === `https://contoso.sharepoint.com/sites/portal/_api/web?$select=WebTemplateConfiguration`) { + throw { + error: { + "odata.error": { + message: { + lang: "en-US", + value: "Attempted to perform an unauthorized operation." + } + } + } + }; + } + + throw 'Invalid request'; + }); + + await assert.rejects(command.action(logger, { options: { verbose: true, siteUrl: 'https://contoso.sharepoint.com/sites/portal', id: '9b1b1e42-794b-4c71-93ac-5ed92488b67f' } }), + new CommandError('Attempted to perform an unauthorized operation.')); + }); + + + it('retrieves model by id', async () => { + sinon.stub(request, 'get').callsFake(async (opts) => { + if (opts.url === `https://contoso.sharepoint.com/sites/portal/_api/web?$select=WebTemplateConfiguration`) { + return { + WebTemplateConfiguration: 'CONTENTCTR#0' + }; + } + + if (opts.url === `https://contoso.sharepoint.com/sites/portal/_api/machinelearning/models/getbyuniqueid('9b1b1e42-794b-4c71-93ac-5ed92488b67f')`) { + return model; + } + + throw 'Invalid request'; + }); + + await command.action(logger, { options: { siteUrl: 'https://contoso.sharepoint.com/sites/portal', id: '9b1b1e42-794b-4c71-93ac-5ed92488b67f' } }); + assert(loggerLogSpy.calledOnceWithExactly(model)); + }); + + it('retrieves model by id with listPublications', async () => { + sinon.stub(request, 'get').callsFake(async (opts) => { + if (opts.url === `https://contoso.sharepoint.com/sites/portal/_api/web?$select=WebTemplateConfiguration`) { + return { + WebTemplateConfiguration: 'CONTENTCTR#0' + }; + } + + if (opts.url === `https://contoso.sharepoint.com/sites/portal/_api/machinelearning/models/getbyuniqueid('164720c8-35ee-4157-ba26-db6726264f9d')`) { + return model; + } + + if (opts.url === `https://contoso.sharepoint.com/sites/portal/_api/machinelearning/publications/getbymodeluniqueid('164720c8-35ee-4157-ba26-db6726264f9d')`) { + return { value: publications }; + } + + throw 'Invalid request'; + }); + + await command.action(logger, { options: { siteUrl: 'https://contoso.sharepoint.com/sites/portal', id: '164720c8-35ee-4157-ba26-db6726264f9d', listPublications: true } }); + assert(loggerLogSpy.calledOnceWithExactly({ ...model, Publications: publications })); + }); + + it('gets correct model when the site URL has a trailing slash', async () => { + sinon.stub(request, 'get').callsFake(async (opts) => { + if (opts.url === `https://contoso.sharepoint.com/sites/portal/_api/web?$select=WebTemplateConfiguration`) { + return { + WebTemplateConfiguration: 'CONTENTCTR#0' + }; + } + + if (opts.url === `https://contoso.sharepoint.com/sites/portal/_api/machinelearning/models/getbyuniqueid('9b1b1e42-794b-4c71-93ac-5ed92488b67f')`) { + return model; + } + + throw 'Invalid request'; + }); + + await command.action(logger, { options: { siteUrl: 'https://contoso.sharepoint.com/sites/portal/', id: '9b1b1e42-794b-4c71-93ac-5ed92488b67f' } }); + assert(loggerLogSpy.calledOnceWithExactly(model)); + }); + + it('retrieves model by title', async () => { + sinon.stub(request, 'get').callsFake(async (opts) => { + if (opts.url === `https://contoso.sharepoint.com/sites/portal/_api/web?$select=WebTemplateConfiguration`) { + return { + WebTemplateConfiguration: 'CONTENTCTR#0' + }; + } + + if (opts.url === `https://contoso.sharepoint.com/sites/portal/_api/machinelearning/models/getbytitle('ModelName')`) { + return model; + } + + throw 'Invalid request'; + }); + + await command.action(logger, { options: { siteUrl: 'https://contoso.sharepoint.com/sites/portal', title: 'ModelName' } }); + assert(loggerLogSpy.calledOnceWithExactly(model)); + }); + + it('retrieves model by title with listPublications', async () => { + sinon.stub(request, 'get').callsFake(async (opts) => { + if (opts.url === `https://contoso.sharepoint.com/sites/portal/_api/web?$select=WebTemplateConfiguration`) { + return { + WebTemplateConfiguration: 'CONTENTCTR#0' + }; + } + + if (opts.url === `https://contoso.sharepoint.com/sites/portal/_api/machinelearning/models/getbytitle('ModelName')`) { + return model; + } + + if (opts.url === `https://contoso.sharepoint.com/sites/portal/_api/machinelearning/publications/getbymodeluniqueid('164720c8-35ee-4157-ba26-db6726264f9d')`) { + return { value: publications }; + } + + throw 'Invalid request'; + }); + + await command.action(logger, { options: { siteUrl: 'https://contoso.sharepoint.com/sites/portal', title: 'ModelName', listPublications: true } }); + assert(loggerLogSpy.calledOnceWithExactly({ ...model, Publications: publications })); + }); +}); \ No newline at end of file diff --git a/src/m365/spp/commands/model/model-get.ts b/src/m365/spp/commands/model/model-get.ts new file mode 100644 index 00000000000..c9ed79caa0a --- /dev/null +++ b/src/m365/spp/commands/model/model-get.ts @@ -0,0 +1,129 @@ +import { Logger } from '../../../../cli/Logger.js'; +import GlobalOptions from '../../../../GlobalOptions.js'; +import request, { CliRequestOptions } from '../../../../request.js'; +import { formatting } from '../../../../utils/formatting.js'; +import { odata } from '../../../../utils/odata.js'; +import { spp, SppModel } from '../../../../utils/spp.js'; +import { urlUtil } from '../../../../utils/urlUtil.js'; +import { validation } from '../../../../utils/validation.js'; +import SpoCommand from '../../../base/SpoCommand.js'; +import commands from '../../commands.js'; + +interface CommandArgs { + options: Options; +} + +interface Options extends GlobalOptions { + siteUrl: string; + id?: string; + title?: string; + listPublications?: boolean; +} + +class SppModelGetCommand extends SpoCommand { + public get name(): string { + return commands.MODEL_GET; + } + + public get description(): string { + return 'Retrieves information about a document understanding model'; + } + + constructor() { + super(); + + this.#initTelemetry(); + this.#initOptions(); + this.#initValidators(); + this.#initOptionSets(); + this.#initTypes(); + } + + #initTelemetry(): void { + this.telemetry.push((args: CommandArgs) => { + Object.assign(this.telemetryProperties, { + id: typeof args.options.id !== 'undefined', + title: typeof args.options.title !== 'undefined', + listPublications: !!args.options.listPublications + }); + }); + } + + #initOptions(): void { + this.options.unshift( + { + option: '-u, --siteUrl ' + }, + { + option: '-i, --id [id]' + }, + { + option: '-t, --title [title]' + }, + { + option: '--listPublications' + } + ); + } + + #initValidators(): void { + this.validators.push( + async (args: CommandArgs) => { + if (args.options.id && !validation.isValidGuid(args.options.id)) { + return `${args.options.id} is not a valid GUID`; + } + + return validation.isValidSharePointUrl(args.options.siteUrl); + } + ); + } + + #initOptionSets(): void { + this.optionSets.push({ options: ['id', 'title'] }); + } + + #initTypes(): void { + this.types.string.push('siteUrl', 'id', 'title'); + this.types.boolean.push('listPublications'); + } + + public async commandAction(logger: Logger, args: CommandArgs): Promise { + try { + if (this.verbose) { + await logger.log(`Retrieving model information from ${args.options.siteUrl}...`); + } + + const siteUrl = urlUtil.removeTrailingSlashes(args.options.siteUrl); + await spp.assertSiteIsContentCenter(siteUrl); + + const requestOptions: CliRequestOptions = { + url: this.getCorrectRequestUrl(siteUrl, args), + headers: { + accept: 'application/json;odata=nometadata' + }, + responseType: 'json' + }; + + const result = await request.get(requestOptions); + + if (args.options.listPublications) { + result.Publications = await odata.getAllItems(`${siteUrl}/_api/machinelearning/publications/getbymodeluniqueid('${result.UniqueId}')`); + } + + await logger.log(result); + } + catch (err: any) { + this.handleRejectedODataJsonPromise(err); + } + } + + private getCorrectRequestUrl(siteUrl: string, args: CommandArgs): string { + if (args.options.id) { + return `${siteUrl}/_api/machinelearning/models/getbyuniqueid('${args.options.id}')`; + } + + return `${siteUrl}/_api/machinelearning/models/getbytitle('${formatting.encodeQueryParameter(args.options.title!)}')`; + } +} + +export default new SppModelGetCommand(); \ No newline at end of file diff --git a/src/utils/spp.spec.ts b/src/utils/spp.spec.ts new file mode 100644 index 00000000000..44591ca072f --- /dev/null +++ b/src/utils/spp.spec.ts @@ -0,0 +1,48 @@ + +import assert from 'assert'; +import sinon from 'sinon'; +import { spp } from './spp.js'; +import { sinonUtil } from './sinonUtil.js'; +import request from '../request.js'; + +describe('utils/spp', () => { + const siteUrl = 'https://contoso.sharepoint.com'; + afterEach(() => { + sinonUtil.restore([ + request.get + ]); + }); + + after(() => { + sinon.restore(); + }); + + it('calls api correctly and throw an error when site is not a content center using assertSiteIsContentCenter', async () => { + sinon.stub(request, 'get').callsFake(async (opts) => { + if (opts.url === `https://contoso.sharepoint.com/_api/web?$select=WebTemplateConfiguration`) { + return { + WebTemplateConfiguration: 'SITEPAGEPUBLISHING#0' + }; + } + + throw 'Invalid request'; + }); + + await assert.rejects(spp.assertSiteIsContentCenter(siteUrl), Error('https://contoso.sharepoint.com is not a content site.')); + }); + + it('calls api correctly and does not throw an error when site is a content center using assertSiteIsContentCenter', async () => { + const stubGet = sinon.stub(request, 'get').callsFake(async (opts) => { + if (opts.url === `https://contoso.sharepoint.com/_api/web?$select=WebTemplateConfiguration`) { + return { + WebTemplateConfiguration: 'CONTENTCTR#0' + }; + } + + throw 'Invalid request'; + }); + + await spp.assertSiteIsContentCenter(siteUrl); + await assert(stubGet.calledOnce); + }); +}); \ No newline at end of file diff --git a/src/utils/spp.ts b/src/utils/spp.ts new file mode 100644 index 00000000000..43a03bdcc38 --- /dev/null +++ b/src/utils/spp.ts @@ -0,0 +1,28 @@ +import request, { CliRequestOptions } from '../request.js'; + +export interface SppModel { + UniqueId: string; + Publications?: any[]; +} + +export const spp = { + /** + * Asserts whether the specified site is a content center + * @param siteUrl The URL of the site to check + */ + async assertSiteIsContentCenter(siteUrl: string): Promise { + const requestOptions: CliRequestOptions = { + url: `${siteUrl}/_api/web?$select=WebTemplateConfiguration`, + headers: { + accept: 'application/json;odata=nometadata' + }, + responseType: 'json' + }; + + const response = await request.get<{ WebTemplateConfiguration: string }>(requestOptions); + + if (response.WebTemplateConfiguration !== 'CONTENTCTR#0') { + throw Error(`${siteUrl} is not a content site.`); + } + } +}; \ No newline at end of file