Skip to content

Commit

Permalink
New Command pp website webfile get
Browse files Browse the repository at this point in the history
  • Loading branch information
ktskumar committed Oct 12, 2024
1 parent 7be7794 commit 2d3ba99
Show file tree
Hide file tree
Showing 6 changed files with 705 additions and 1 deletion.
188 changes: 188 additions & 0 deletions docs/docs/cmd/pp/website/website-webfile-get.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
import Global from "/docs/cmd/_global.mdx";
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

# pp website webfile get

Gets information about the specified web file

## Usage

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

## Options

```md definition-list
`-e, --environmentName <environmentName>`
: The name of the environment.

`-i, --id [id]`
: The id of the web file to retrieve details for.

`--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 for environments you do not have explicitly assigned permissions to.
```

<Global />

## Examples

Retrieve web file for the site Contoso in a specific environment.

```sh
m365 pp website webfile get --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --websiteName "CLI 365 Website" --id 3a081d91-5ea8-40a7-8ac9-abbaa3fcb893
```

Get a specific website webfile in a specific environment based on name as admin.

```sh
m365 pp website webfile get --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --websiteName "CLI 365 Website" --id 3a081d91-5ea8-40a7-8ac9-abbaa3fcb893 --asAdmin
```

Get a specific website webfile in a specific environment based on id.

```sh
m365 pp website webfile get --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --websiteId 3bbc8102-8ee7-4dac-afbb-807cc5b6f9c2 --id 3a081d91-5ea8-40a7-8ac9-abbaa3fcb893
```

Get a specific website webfile in a specific environment based on id as admin.

```sh
m365 pp website webfile get --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --websiteId 3bbc8102-8ee7-4dac-afbb-807cc5b6f9c2 --id 3a081d91-5ea8-40a7-8ac9-abbaa3fcb893 --asAdmin
```

## Response

<Tabs>
<TabItem value="JSON">

```json
{
"mspp_webfileid": "3a081d91-5ea8-40a7-8ac9-abbaa3fcb893",
"mspp_name": "theme.css",
"mspp_contentdisposition@OData.Community.Display.V1.FormattedValue": "inline",
"mspp_contentdisposition": 756150000,
"[email protected]": "9",
"mspp_displayorder": 9,
"[email protected]": "Yes",
"mspp_excludefromsearch": true,
"[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": "a3d84663-6409-4cce-a269-604a78287ecb",
"mspp_partialurl": "theme.css",
"_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": "ffefd269-446e-46aa-9379-92d1b2d323b8",
"_mspp_websiteid_value@Microsoft.Dynamics.CRM.associatednavigationproperty": "mspp_websiteid",
"[email protected]": "mspp_website",
"[email protected]": "CLI 365 Website",
"_mspp_websiteid_value": "5a9c900e-8d0e-422d-970f-cd3cf28252ed",
"[email protected]": "systemuser",
"[email protected]": "Shantha Kumar Thambidurai",
"_mspp_createdby_value": "5364ffa6-d185-ee11-8179-6045bd0027e0",
"[email protected]": "systemuser",
"[email protected]": "Shantha Kumar Thambidurai",
"_mspp_modifiedby_value": "5364ffa6-d185-ee11-8179-6045bd0027e0",
"[email protected]": "4/12/2024 11:16 AM",
"mspp_modifiedon": "2024-04-12T05:46:36Z",
"[email protected]": "4/12/2024 11:16 AM",
"mspp_createdon": "2024-04-12T05:46:19Z",
"statecode: 0,
"[email protected]": "Active",
"statuscode: 1,
"mspp_title: null,
"mspp_displaydate: 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_publishingstateid_value@OData.Community.Display.V1.FormattedValue: Published
mspp_name : theme.css
mspp_summary : null
mspp_webfileid : 3a081d91-5ea8-40a7-8ac9-abbaa3fcb893
```

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

```csv
mspp_webfileid,mspp_name,mspp_contentdisposition@OData.Community.Display.V1.FormattedValue,mspp_contentdisposition,[email protected],mspp_displayorder,[email protected],mspp_excludefromsearch,[email protected],mspp_hiddenfromsitemap,_mspp_parentpageid_value@Microsoft.Dynamics.CRM.associatednavigationproperty,_mspp_parentpageid_value@Microsoft.Dynamics.CRM.lookuplogicalname,_mspp_parentpageid_value@OData.Community.Display.V1.FormattedValue,_mspp_parentpageid_value,mspp_partialurl,_mspp_publishingstateid_value@Microsoft.Dynamics.CRM.associatednavigationproperty,_mspp_publishingstateid_value@Microsoft.Dynamics.CRM.lookuplogicalname,_mspp_publishingstateid_value@OData.Community.Display.V1.FormattedValue,_mspp_publishingstateid_value,_mspp_websiteid_value@Microsoft.Dynamics.CRM.associatednavigationproperty,[email protected],[email protected],_mspp_websiteid_value,[email protected],[email protected],_mspp_createdby_value,[email protected],[email protected],_mspp_modifiedby_value,[email protected],mspp_modifiedon,[email protected],mspp_createdon,statecode,[email protected],statuscode,mspp_title,mspp_displaydate,mspp_summary,mspp_cloudblobaddress,mspp_modifiedbyusername,mspp_alloworigin,mspp_expirationdate,mspp_createdbyipaddress,mspp_createdbyusername,mspp_modifiedbyipaddress,mspp_releasedate,_mspp_masterwebfileid_value
3a081d91-5ea8-40a7-8ac9-abbaa3fcb893,theme.css,inline,756150000,9,9,Yes,1,No,0,mspp_parentpageid,mspp_webpage,Home,a3d84663-6409-4cce-a269-604a78287ecb,theme.css,mspp_publishingstateid,mspp_publishingstate,Published,ffefd269-446e-46aa-9379-92d1b2d323b8,mspp_websiteid,mspp_website,CLI 365 Website,5a9c900e-8d0e-422d-970f-cd3cf28252ed,systemuser,Shantha Kumar Thambidurai,5364ffa6-d185-ee11-8179-6045bd0027e0,systemuser,Shantha Kumar Thambidurai,5364ffa6-d185-ee11-8179-6045bd0027e0,4/12/2024 11:16 AM,2024-04-12T05:46:36Z,4/12/2024 11:16 AM,2024-04-12T05:46:19Z,0,Active,1,,,,,,,,,,,,
```

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

```md
# pp website webfile get --environmentName "Default-d87a7535-dd31-4437-bfe1-95340acd55c5" --websiteId 3bbc8102-8ee7-4dac-afbb-807cc5b6f9c2 --id "3a081d91-5ea8-40a7-8ac9-abbaa3fcb893" --output md


| Property | Value |
| ------------------------------------------------------------------------------------ | ------------------------------------ |
| mspp\_webfileid | 3a081d91-5ea8-40a7-8ac9-abbaa3fcb893 |
| mspp\_name | theme.css |
| mspp\[email protected] | inline |
| mspp\_contentdisposition | 756150000 |
| mspp\[email protected] | 9 |
| mspp\_displayorder | 9 |
| mspp\[email protected] | Yes |
| mspp\_excludefromsearch | true |
| 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 | a3d84663-6409-4cce-a269-604a78287ecb |
| mspp\_partialurl | theme.css |
| \_mspp\_publishingstateid\[email protected] | mspp\_publishingstateid |
| \_mspp\_publishingstateid\[email protected] | mspp\_publishingstate |
| \_mspp\_publishingstateid\[email protected] | Published |
| \_mspp\_publishingstateid\_value | ffefd269-446e-46aa-9379-92d1b2d323b8 |
| \_mspp\_websiteid\[email protected] | mspp\_websiteid |
| \_mspp\_websiteid\[email protected] | mspp\_website |
| \_mspp\_websiteid\[email protected] | CLI 365 Website |
| \_mspp\_websiteid\_value | 3bbc8102-8ee7-4dac-afbb-807cc5b6f9c2 |
| \_mspp\_createdby\[email protected] | systemuser |
| \_mspp\_createdby\[email protected] | Shantha Kumar Thambidurai |
| \_mspp\_createdby\_value | 5364ffa6-d185-ee11-8179-6045bd0027e0 |
| \_mspp\_modifiedby\[email protected] | systemuser |
| \_mspp\_modifiedby\[email protected] | Shantha Kumar Thambidurai |
| \_mspp\_modifiedby\_value | 5364ffa6-d185-ee11-8179-6045bd0027e0 |
| mspp\[email protected] | 4/12/2024 11:16 AM |
| mspp\_modifiedon | 2024-04-12T05:46:36Z |
| mspp\[email protected] | 4/12/2024 11:16 AM |
| mspp\_createdon | 2024-04-12T05:46:19Z |
| 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 get',
id: 'cmd/pp/website/website-webfile-get'
},
]
}
]
},
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_GET: `${prefix} website webfile get`
};
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

0 comments on commit 2d3ba99

Please sign in to comment.