5 Replies Latest reply on Jun 6, 2016 11:39 AM by Scott A Johnson

    Ability to copy a page?

    l9rezn

      Is there anyway to copy a Page with tiles to other spaces or groups?

       

      Is there a way to do this via an API?

        • Re: Ability to copy a page?
          Scott A Johnson

          Hey Lea,

           

          While there's not a "copy" functionality in the API, what you can do is create new pages with tile arrangement and configuration through the API using the page service found here: https://developers.jivesoftware.com/api/v3/cloud/rest/PageService.html#createPage(String, String)

           

          Body would look like this:

           

          {
              "displayOrder": 0,
              "layout": "wide_narrow",
              "name": "Scott's Awesome Page",
              "pageType": "place",
              "parent": "https://sandbox.jiveon.com/api/core/v3/places/1234",
              "tiles": [
                  {
                      "column": 2,
                      "config": {},
                      "definition": "https://sandbox.jiveon.com/api/core/v3/tileDefs/1001"
                  },
                  {
                      "column": 1,
                      "config": {
                          "action": {
                              "text": "",
                              "url": ""
                          },
                          "content": [
                              {
                                  "id": 1980,
                                  "text": "Welcome",
                                  "type": "document"
                              }
                          ],
                          "suppressOutcomes": true,
                          "suppressSocial": true,
                          "suppressTitle": true,
                          "title": "WELCOME TO YOUR PAGE"
                      },
                      "definition": "https://sandbox.jiveon.com/api/core/v3/tileDefs/1002"
                  },
                  {
                      "column": 1,
                      "config": {
                          "browseQuery": "filterID=contentstatus[published]&browseSite=place-content&containerType=14&containerID=1234&browseViewID=placeContent",
                          "title": "RECENT CONTENT"
                      },
                      "definition": "https://sandbox.jiveon.com/api/core/v3/tileDefs/1003"
                  },
                  {
                      "column": 1,
                      "config": {
                          "browseQuery": "browseSite=places&browseViewID=places&containerType=14&containerID=1234&filterID=all~objecttype~space",
                          "title": "SOME SUB SPACES"
                      },
                      "definition": "https://sandbox.jiveon.com/api/core/v3/tileDefs/1003"
                  }
              ]
          }
          

           

          This will create a page in space 1234 with a wide/narrow layout, one tile (defined as tiledef 1001) which requires no configuration on the narrow right column and three tiles (of two definitions 1002, 1003) with associated configurations. The first is a Document View tile, second two are super lists I believe.

           

          *note, ids of tiledefs, spaces, etc. are made up, you'll have to find them for your environment

           

          If you want to copy a page, you'd just need to GET the json representation of the page and tiles from the existing page, extract this minimum (I think this is the minimum) set of fields, change the parent container or name and post it back to the /pages endpoint.

           

          Hope that helps,

          Scott

          1 person found this helpful