Cli-microsoft365: New command: Create a single part app page

Created on 13 Mar 2019  路  12Comments  路  Source: pnp/cli-microsoft365

Creates a single-part app page

spo apppage add -u|--webUrl <webUrl> -t|--title <title> -d|--webPartData <webPartData> --addToQuickLaunch

  • webUrl: The URL of the site where the page should be created
  • title: The title of the page to create
  • webPartData: JSON string of the web part to put on the page
  • addToQuickLaunch: Set, to add the page to the quick launch

Request:

POST {{siteUrl}}/_api/sitepages/Pages/CreateFullPageApp
Accept: application/json;odata=nometadata
Content-Type: application/json;odata=nometadata

{
    "webPartDataAsJson": "{\"id\":\"e6599e48-c875-4c0e-8b1f-abe2f54c1132\",\"instanceId\":\"9c6edb6e-199a-4a30-a3b6-73466a68187b\",\"title\":\"Full App Page testing wp\",\"description\":\"HelloWorld description\",\"dataVersion\":\"1.0\",\"properties\":{\"description\":\"HelloWorld\"}}",
    "title": "My-app",
    "addToQuickLaunch": true
}

Source: https://spblog.net/post/2019/03/05/what-s-new-and-what-s-changed-in-sharepoint-online-rest-api-in-january-february-2019

good first issue new feature work in progress

All 12 comments

Hey Waldek, I would like to pick it.

All yours! 馃挭

Are you still working on it @siata13?

Setting as free to pick up due to lack of response

Hey @waldekmastykarz assign this to me please if not already taken. Thanks

All yours @rabwill! Thank you!

Hey @waldekmastykarz there is a strange issue after pulling down the latest beta code base to add a command to it, I clone the branch , fetch upstream to keep upto-date , I ran npm run build and npm link but it keeps complaining Invalid Command.
Not sure what is different or if I am missing a step. It builds fine and even the test is 100% for this command. I can see the files generated in the dist folder.
I am away from home so I have my work laptop (windows10) instead of the mac , this is the only diff I can think off.

Recently, we've updated the project dependencies. Could that be the culprit?

Could you please try:

  • npm run clean
  • remove node_modules
  • npm i
  • npm run build
  • npm link

Please let me know if this helps. If it doesn't, we'll keep looking further until we find what's not working.

Recently, we've updated the project dependencies. Could that be the culprit?

Could you please try:

  • npm run clean
  • remove node_modules
  • npm i
  • npm run build
  • npm link

Please let me know if this helps. If it doesn't, we'll keep looking further until we find what's not working.

Hey there,

Tried it , even clone a fresh repos

here is how things look
image

image

Here are my new files

image

Package.json
image

Do you see anything out of the ordinary ?
Thanks for looking into this

Screenshots look all fine. Do you have your changes in a branch somewhere where I could have a look at them?

Screenshots look all fine. Do you have your changes in a branch somewhere where I could have a look at them?
I have pushed the branch to my remote just now.
https://github.com/rabwill/office365-cli/tree/issue-apppage-874/src/o365/spo/commands/apppage
Thank you.

Hey @waldekmastykarz, you can leave this for now, i will be able to pick it up today in my mac.

Was this page helpful?
0 / 5 - 0 ratings