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: pp website webfile list #6415

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
173 changes: 173 additions & 0 deletions docs/docs/cmd/pp/website/website-webfile-list.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
import Global from '/docs/cmd/_global.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# pp website webfile list

Lists all webfiles for the specified Power Pages website.

## Usage

```sh
m365 pp website webfile list [options]
```

## Options

```md definition-list
`-e, --environmentName <environmentName>`
: The name of the environment where the Power Pages websites are located.

`--websiteId [websiteId]`
:ID of the Power Pages website. Specify either `websiteId` or `websiteName` but not both.

`--websiteName [websiteName]`
:The unique name (not the display name) of the Power Pages website. Specify either `websiteId` or `websiteName` but not both.

`--asAdmin`
: Run the command as admin and retrive Power Pages websites for environments you do not have explicitly assigned permissions to.
```

<Global />

## Examples

List all webfiles for the site Contoso

```sh
m365 pp website webfile list --websiteName Contoso --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5"
```

List all webfiles for the site id as admin

```sh
m365 pp website webfile list --websiteId 2ca3eaa5-140f-4175-8261-3272edf9f339 --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --asAdmin
```

## Response

<Tabs>
<TabItem value="JSON">

```json
[
{
"mspp_webfileid": "a1700435-b21a-48f0-83f4-f34411a26cbf",
"mspp_name": "Site-mockup-1.png",
"mspp_contentdisposition@OData.Community.Display.V1.FormattedValue": "inline",
"mspp_contentdisposition": 756150000,
"[email protected]": "No",
"mspp_excludefromsearch": false,
"[email protected]": "No",
"mspp_hiddenfromsitemap": false,
"_mspp_parentpageid_value@Microsoft.Dynamics.CRM.associatednavigationproperty": "mspp_parentpageid",
"_mspp_parentpageid_value@Microsoft.Dynamics.CRM.lookuplogicalname": "mspp_webpage",
"_mspp_parentpageid_value@OData.Community.Display.V1.FormattedValue": "Home",
"_mspp_parentpageid_value": "a3efb062-0691-4d3e-a9e6-43bfd2daeed6",
"mspp_partialurl": "Site-mockup-1.png",
"_mspp_publishingstateid_value@Microsoft.Dynamics.CRM.associatednavigationproperty": "mspp_publishingstateid",
"_mspp_publishingstateid_value@Microsoft.Dynamics.CRM.lookuplogicalname": "mspp_publishingstate",
"_mspp_publishingstateid_value@OData.Community.Display.V1.FormattedValue": "Published",
"_mspp_publishingstateid_value": "0d0fa682-7ed7-419b-bc7a-25e8bc64b6e2",
"_mspp_websiteid_value@Microsoft.Dynamics.CRM.associatednavigationproperty": "mspp_websiteid",
"[email protected]": "mspp_website",
"[email protected]": "Contoso",
"_mspp_websiteid_value": "2ca3eaa5-140f-4175-8261-3272edf9f339",
"[email protected]": "systemuser",
"[email protected]": "Shanthakumar",
"_mspp_createdby_value": "66ece047-0e90-ee11-8179-000d3a37640e",
"[email protected]": "systemuser",
"[email protected]": "Shanthakumar",
"_mspp_modifiedby_value": "66ece047-0e90-ee11-8179-000d3a37640e",
"[email protected]": "8/27/2024 2:37 PM",
"mspp_modifiedon": "2024-08-27T09:07:22Z",
"[email protected]": "8/27/2024 2:37 PM",
"mspp_createdon": "2024-08-27T09:07:16Z",
"statecode": 0,
"[email protected]": "Active",
"statuscode": 1,
"mspp_title": null,
"mspp_displaydate": null,
"mspp_displayorder": null,
"mspp_summary": null,
"mspp_cloudblobaddress": null,
"mspp_modifiedbyusername": null,
"mspp_alloworigin": null,
"mspp_expirationdate": null,
"mspp_createdbyipaddress": null,
"mspp_createdbyusername": null,
"mspp_modifiedbyipaddress": null,
"mspp_releasedate": null,
"_mspp_masterwebfileid_value": null
}
]
```

</TabItem>
<TabItem value="Text">

```text
mspp_name mspp_webfileid mspp_summary _mspp_publishingstateid_value@OData.Community.Display.V1.FormattedValue
-------------------- ------------------------------------ ------------ -----------------------------------------------------------------------
Circle-3.png b20482f2-6e3b-4626-8b94-15b6e2131fe9 circle image Published
Video 1.mp4 2e341807-e70a-487c-87ac-1affdbe51fe3 sample video Published
```

</TabItem>
<TabItem value="CSV">

```csv
mspp_name,mspp_webfileid,mspp_summary,_mspp_publishingstateid_value@OData.Community.Display.V1.FormattedValue
Circle-3.png,b20482f2-6e3b-4626-8b94-15b6e2131fe9,circle image,Published
```

</TabItem>
<TabItem value="Markdown">

```md
# pp website webfile list --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --websiteId 2ca3eaa5-140f-4175-8261-3272edf9f339

Date: 9/1/2023

## Tasks List

Property | Value
---------|-------
mspp\_webfileid | a1700435-b21a-48f0-83f4-f34411a26cbf
mspp\_name | Site-mockup-1.png
mspp\[email protected] | inline
mspp\_contentdisposition | 756150000
mspp\[email protected] | No
mspp\_excludefromsearch | false
mspp\[email protected] | No
mspp\_hiddenfromsitemap | false
\_mspp\_parentpageid\[email protected] | mspp\_parentpageid
\_mspp\_parentpageid\[email protected] | mspp\_webpage
\_mspp\_parentpageid\[email protected] | Home
\_mspp\_parentpageid\_value | a3efb062-0691-4d3e-a9e6-43bfd2daeed6
mspp\_partialurl | Site-mockup-1.png
\_mspp\_publishingstateid\[email protected] | mspp\_publishingstateid
\_mspp\_publishingstateid\[email protected] | mspp\_publishingstate
\_mspp\_publishingstateid\[email protected] | Published
\_mspp\_publishingstateid\_value | 0d0fa682-7ed7-419b-bc7a-25e8bc64b6e2
\_mspp\_websiteid\[email protected] | mspp\_websiteid
\_mspp\_websiteid\[email protected] | mspp\_website
\_mspp\_websiteid\[email protected] | Contoso
\_mspp\_websiteid\_value | 2ca3eaa5-140f-4175-8261-3272edf9f339
\_mspp\_createdby\[email protected] | systemuser
\_mspp\_createdby\[email protected] | Shanthakumar
\_mspp\_createdby\_value | 66ece047-0e90-ee11-8179-000d3a37640e
\_mspp\_modifiedby\[email protected] | systemuser
\_mspp\_modifiedby\[email protected] | Shanthakumar
\_mspp\_modifiedby\_value | 66ece047-0e90-ee11-8179-000d3a37640e
mspp\[email protected] | 8/27/2024 2:37 PM
mspp\_modifiedon | 2024-08-27T09:07:22Z
mspp\[email protected] | 8/27/2024 2:37 PM
mspp\_createdon | 2024-08-27T09:07:16Z
statecode | 0
[email protected] | Active
statuscode | 1
```

</TabItem>
</Tabs>
9 changes: 9 additions & 0 deletions docs/src/config/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1799,6 +1799,15 @@ const sidebars: SidebarsConfig = {
id: 'cmd/pp/tenant/tenant-settings-set'
}
]
},
{
website: [
{
type: 'doc',
label: 'website webfile list',
id: 'cmd/pp/website/website-webfile-list'
},
]
}
]
},
Expand Down
3 changes: 2 additions & 1 deletion src/m365/pp/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ export default {
SOLUTION_PUBLISHER_LIST: `${prefix} solution publisher list`,
SOLUTION_PUBLISHER_REMOVE: `${prefix} solution publisher remove`,
TENANT_SETTINGS_LIST: `${prefix} tenant settings list`,
TENANT_SETTINGS_SET: `${prefix} tenant settings set`
TENANT_SETTINGS_SET: `${prefix} tenant settings set`,
WEBSITE_WEBFILE_LIST: `${prefix} website webfile list`
};
8 changes: 8 additions & 0 deletions src/m365/pp/commands/Website.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import GlobalOptions from "../../../GlobalOptions";
export interface PpWebSiteOptions extends GlobalOptions {
environmentName: string;
id?: string;
name?: string;
url?: string;
asAdmin?: boolean;
}
Loading
Loading