pnp / cli-microsoft365

Manage Microsoft 365 and SharePoint Framework projects on any platform
https://aka.ms/cli-m365
MIT License
930 stars 326 forks source link

New command: m365 spp model get #6105

Open mkm17 opened 5 months ago

mkm17 commented 5 months ago

Usage

m365 spp model get [options]

Description

Retrieve information about a SharePoint Premium document understanding model

Options

Option Description
-u, --siteUrl <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

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

m365 spp model get --siteUrl "https://contoso.sharepoint.com/sites/ContentCenter" --title "climicrosoft365Model"

Additional Info

Endpoints to be used- https://learn.microsoft.com/en-us/sharepoint/dev/apis/syntex/rest-getbyuniqueid-method https://learn.microsoft.com/en-us/sharepoint/dev/apis/syntex/rest-getbytitle-method

Adam-it commented 5 months ago

I think usually for the get we do not specify the Default properties and just return everything as it returns a single item. LGTM 👍 @pnp/cli-for-microsoft-365-maintainers anyone? anything? anytime? 😉 before we open it up 😊

Adam-it commented 5 months ago

@mkm17 maybe one comment I though of just now. Wont it be more aligned with what we have in CLI to specify the modelUniqueId as id not uniqueId ?

mkm17 commented 5 months ago

@Adam-it I saw that in results of syntex endpoints there are sometimes both properties provided. I didn't want to make a confusion that in one command you get id and uniqueId and in the second one you have to use uniqueId as id. But let me double check it because maybe we should simply return only uniqueId as Id in all cases.

mkm17 commented 4 months ago

@Adam-it ok, in this case and others related to Syntex, I will change to id, but in the description, I will leave information that the unique ID is needed. Would that be ok?

Adam-it commented 4 months ago

yes that works for me

Jwaegebaert commented 4 months ago

Another nice job with speccing this out @mkm17! A bit similar to at spo premium contentcenter list, let's replace all the occurrences of Syntex with SharePoint Premium. For the option description at --siteUrl, here we also need to change content centre to content center. This typo also appears in the examples.

On smaller detail, in your examples, there are two spaces between your command and the first option. get --siteUrl

mkm17 commented 4 months ago

@Jwaegebaert same here, all proposed changes applied :)

Jwaegebaert commented 4 months ago

Nice, let's wait a bit regarding the naming for the command and then we can open it up. Do you want to work on this one, or open it up?

Adam-it commented 4 months ago

@mkm17 awesome work 👏. Lets get this 🚢ed

mkm17 commented 4 months ago

I can take also this one ;)

Adam-it commented 2 months ago

hi @mkm17, This issue will take part in the Hacktoberfest event which will take part during October. You may read more about this event here: https://github.com/pnp/cli-microsoft365/discussions/6383

If you want to participate and make this PR count towards this event please be sure to open the PR in October (no sooner and no later 😉)