Open appieschot opened 3 months ago
Added an additional default property; the ID of the item helps with later commands (i.e. get
commands)
May I take this up?
Sure, all yours!
Api returns the default properties in below names,
Below is the returned response for single object,
{
"mspp_name": "filename.css",
"_mspp_websiteid_value@Microsoft.Dynamics.CRM.associatednavigationproperty": "mspp_websiteid",
"_mspp_websiteid_value@Microsoft.Dynamics.CRM.lookuplogicalname": "mspp_website",
"_mspp_websiteid_value@OData.Community.Display.V1.FormattedValue": "Website - spddevdocs",
"_mspp_websiteid_value": "6c0730c5-3c40-4e49-81da-6fbcd018942d",
"_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": "cfca0f6b-ea6f-4f5d-a2b6-de411d67c970",
"mspp_partialurl": "filename.css",
"mspp_displaydate": null,
"_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": "705b586a-ec8b-49a2-805d-ce2ebb91b0ff",
"mspp_releasedate": null,
"mspp_expirationdate": null,
"mspp_cloudblobaddress": null,
"mspp_contentdisposition@OData.Community.Display.V1.FormattedValue": "inline",
"mspp_contentdisposition": 756150000,
"mspp_title": null,
"mspp_summary": null,
"mspp_alloworigin": null,
"mspp_hiddenfromsitemap@OData.Community.Display.V1.FormattedValue": "No",
"mspp_hiddenfromsitemap": false,
"mspp_displayorder@OData.Community.Display.V1.FormattedValue": "2",
"mspp_displayorder": 2,
"_mspp_masterwebfileid_value": null,
"mspp_excludefromsearch@OData.Community.Display.V1.FormattedValue": "Yes",
"mspp_excludefromsearch": true,
"statecode": 0,
"mspp_webfileid": "9f39994e-2170-4064-9ae5-fe1676855d79",
"_mspp_createdby_value@Microsoft.Dynamics.CRM.lookuplogicalname": "systemuser",
"_mspp_createdby_value@OData.Community.Display.V1.FormattedValue": "Shantha Kumar Thambidurai",
"_mspp_createdby_value": "5364ffa6-d185-eeff-8179-6045bd002666",
"_mspp_modifiedby_value@Microsoft.Dynamics.CRM.lookuplogicalname": "systemuser",
"_mspp_modifiedby_value@OData.Community.Display.V1.FormattedValue": "Shantha Kumar Thambidurai",
"_mspp_modifiedby_value": "5364ffa6-d185-eeff-8179-6045bd002666",
"mspp_modifiedon@OData.Community.Display.V1.FormattedValue": "5/16/2024 11:36 AM",
"mspp_modifiedon": "2024-05-16T06:06:38Z",
"mspp_createdon@OData.Community.Display.V1.FormattedValue": "5/16/2024 11:36 AM",
"mspp_createdon": "2024-05-16T06:06:34Z",
"statuscode@OData.Community.Display.V1.FormattedValue": "Active",
"statuscode": 1
}
Do I need to rename / modify the property names after retrieving the result. Please suggest
Hi @ktskumar, generally speaking, we never modify the output of the API, so no, just return the result.
Usage
m365 pp website webfile list
Description
List all webfiles for the specified Power Pages website
Options
--websiteId [websiteId]
websiteId
orwebName
but not both.--websiteName [websiteName]
websiteId
orwebName
but not both.-e, --environmentName <environmentName>
--asAdmin
Examples
List all webfiles for the site Contoso
List all webfiles for the site by id
Default properties
Additional Info
More details here: https://learn.microsoft.com/en-us/power-apps/developer/data-platform/reference/entities/mspp_webfile
See our
m365 pp card list
command on how to implement the as admin, and how to retrieve all items from a given endpoint: https://github.com/pnp/cli-microsoft365/blob/main/src/m365/pp/commands/card/card-list.tsIn this case the API call would be
${dynamicsApiUrl}/api/data/v9.2/mspp_webfiles