Connect Blueprints Dynamic Plaintext Variables

XMLWordPrintable

      Make Connect Blueprints dynamic such that data can be remotely fetched and populated at the time of page creation.

      Descriptor

      {
        template: {
          "url": "/mytemplate.xml,  // this is the existing blueprint url in the descriptor
        }
        
        "blueprintContext": { // url to POST to to obtain the variables for substitution in the blueprint
          "url": "/context"
        }, 
        // These are existing fields that will not be modified
        "createResult": "edit",
        "key": "remote-blueprint",
        "name": {
          "value": "Simple Remote Blueprint"
        }
      }
      

      Data POSTED to the ContextData url

      {
         parentPageId : "123456",
         spaceKey  : "DEMO",
         blueprintKey: "the-blueprint-key", 
         userKey : "12a3e457f6723b414c12e", 
         userLocale : "en_US"
      }
      

      Shape of the data required to be returned from the contextData url

      Similar to Dynamic Content Macro parameters: https://developer.atlassian.com/static/connect/docs/latest/modules/confluence/dynamic-content-macro.html

      // Array<BlueprintContextValue>
      [ 
        {
          "identifier": "ContentPageTitle", // Reserved variable for blueprints would also be here
          "value": "Page Title Name"
        },
        { "identifier": "param1",
          "value": ""bar"" // representation is implicitly 'plain'
        },
        { 
          "identifier": "param2",
          "value": "baz",
          "representation": "storage" | "wiki" | "plain"
        }
      ]
      

      see https://pug.jira-dev.com/wiki/display/CP/Spec%3A+Dynamic+Blueprints

              Assignee:
              Chii (Inactive)
              Reporter:
              Chii (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: