Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New command: spo page default get #6493

Open
milanholemans opened this issue Nov 16, 2024 · 5 comments · May be fixed by #6509
Open

New command: spo page default get #6493

milanholemans opened this issue Nov 16, 2024 · 5 comments · May be fixed by #6509

Comments

@milanholemans
Copy link
Contributor

milanholemans commented Nov 16, 2024

Usage

m365 spo page default get [options]

Description

Gets the home page for a specific site

Options

Option Description
-u, --webUrl <webUrl> URL of the site where the page is located.

Examples

Get the home page of a specific site

m365 spo page default get --webUrl https://contoso.sharepoint.com/sites/Marketing

Default properties

No response

Additional Info

To get to know which page is the current home page, execute this request:

GET https://contoso.sharepoint.com/sites/Playground/_api/Web/RootFolder?$select=WelcomePage

Thereafter, you should retrieve the site page with a GetFileByServerRelativePath request.

@milanholemans milanholemans added new feature needs peer review Needs second pair of eyes to review the spec or PR good first issue labels Nov 16, 2024
@Jwaegebaert Jwaegebaert added help wanted and removed needs peer review Needs second pair of eyes to review the spec or PR labels Nov 19, 2024
@Saurabh7019
Copy link
Contributor

Assign this to me please.

...with a GetFileByServerRelativePath request.

assuming this command will return detailed information about the home page and not just the relative URL.

@milanholemans
Copy link
Contributor Author

Assign this to me please.

...with a GetFileByServerRelativePath request.

assuming this command will return detailed information about the home page and not just the relative URL.

Yes, the response should look the same as spo page get.

Saurabh7019 added a commit to Saurabh7019/cli-microsoft365 that referenced this issue Nov 29, 2024
@Saurabh7019 Saurabh7019 linked a pull request Nov 29, 2024 that will close this issue
@milanholemans
Copy link
Contributor Author

Instead of creating a new command, I'm wondering if we should just enhance spo page get to align it more with other commands where we return default values.
Examples:

What is your stance on this @pnp/cli-for-microsoft-365-maintainers?

@waldekmastykarz
Copy link
Member

Have we considered the alternative of spo page get --default? Also, since pages are web-scopes artifacts, shouldn't we need web URL rather than site URL?

@milanholemans
Copy link
Contributor Author

Have we considered the alternative of spo page get --default? Also, since pages are web-scopes artifacts, shouldn't we need web URL rather than site URL?

Fair point about the webUrl. About the --default, it's something I could support, but currently for other commands we are providing nothing to retrieve the default value. Shouldn't we be more consistent here? It's something we can always change in a major release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants