cli-microsoft365 icon indicating copy to clipboard operation
cli-microsoft365 copied to clipboard

New command: m365 pp website get

Open appieschot opened this issue 1 year ago • 9 comments

Usage

m365 pp website get

Description

Gets information about the specified Power Pages websites.

Options

Option Description
--url [url] The URL of the website to retrieve. Specify either url, name or id.
-n --name [name] The name of the website to retrieve. Specify either url, name or id.
-i, --id [id] The WebSiteId (GUID) of the website to retrieve. Specify either url, name or id.
-e, --environmentName <environmentName> The name of the environment for which to retrieve Power Pages website from.
--asAdmin Run the command as admin and retrieve the Power Pages Website from environments you do not have explicitly assigned permissions to.

Examples

Retrieve Demo Power Pages website by name in the given environment.

m365 pp website get --name Demo --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 

Retrieve Power Pages website using an id in the given environment as an Administrator.

m365 pp website get --id d87a7535-dd31-4437-bfe1-95340acd55c5 --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --asAdmin

Default properties

N/a

Checkout the model for details: https://learn.microsoft.com/en-us/rest/api/power-platform/powerpages/websites/get-websites#websitedto

And checkout #6256 as that uses the same properties

Additional Info

You can have a look at the logic behind: https://learn.microsoft.com/en-us/power-platform/developer/cli/reference/pages#pac-pages-list

appieschot avatar Aug 21 '24 06:08 appieschot

Thanks @appieschot for writing out these specs. I've got a few remarks before we can continue:

  • We don't need to specify any default properties for a get command.
  • For url, name and id. The description specifies both which refers to two items but we've three options here.
  • For the description of the second example, let's leave out the GUID from there. It doesn't have that much meaning.
  • The description of asAdmin, is that correct? I don't think this has anything to do with AI builder models.

Jwaegebaert avatar Aug 22 '24 13:08 Jwaegebaert

Fixed point 1, 3 and 4. Not sure what you mean with the 2nd point .. You have to specify one of the three options, not two .. Or atleast that was what I was trying to convey.

appieschot avatar Aug 22 '24 14:08 appieschot

In point 2, I'm referring to the definition of both. Your sentence mentions three options and ends with but not both. Both typically refers to two items, but we have three here. I suggest we just remove but not both from the sentence. That would make it similar to how we do it with targeting lists, e.g., https://pnp.github.io/cli-microsoft365/cmd/spo/listitem/listitem-add.

Also, when we specify the options in our description, we can leave out the [ ] chars.

Jwaegebaert avatar Aug 23 '24 06:08 Jwaegebaert

Done

appieschot avatar Aug 23 '24 06:08 appieschot

May I work on this!

ktskumar avatar Sep 23 '24 11:09 ktskumar

May I work on this!

all yours 👍

Adam-it avatar Sep 23 '24 11:09 Adam-it

Hey @ktskumar, thank you for all the hard work you’ve put in, it’s really appreciated! We’ve noticed that you have several issues assigned that haven't yet been created with a PR. To ensure everyone has a chance to get involved, especially with Hacktoberfest, I’ll be unassigning you from some of these issues.

We recommend focusing on 1 to 2 issues at a time. Once you’ve submitted a PR for an issue, you can easily claim another open one. This approach helps you manage the workload more effectively and ensures you can give each task the attention it needs.

Thanks again for your continued contributions!

Jwaegebaert avatar Sep 26 '24 11:09 Jwaegebaert

let me work on this..

ktskumar avatar Oct 01 '24 07:10 ktskumar

Hi @ktskumar, as @Jwaegebaert mentioned, we recommend that people focus on 1-2 issues at a time. Since you have 2 issues assigned to you without a PR, we recommend finishing these before claiming other issues. This will give other contributors the chance to work on this repo as well.

milanholemans avatar Oct 01 '24 09:10 milanholemans

Hi team! I'd love to help out with this issue. Is it okay if I take it up?

nicodecleyre avatar Oct 27 '24 09:10 nicodecleyre

Definitely!

milanholemans avatar Oct 27 '24 19:10 milanholemans

As per my understanding, this api.powerplatform.com is treated as you were an admin and there isn't a distinct between 'normal' and 'asAdmin'. Couldn't really find an answer in the documentation.

@appieschot, you have more insights in this matter?

nicodecleyre avatar Oct 27 '24 22:10 nicodecleyre

You might be right; I have not investigated this in too much detail. If that is the case perhaps, we can best skip the --asAdmin property!

And sorry for the delay! 🙇‍♂️

appieschot avatar Nov 11 '24 14:11 appieschot