Confluence · Arazzo Workflow

Confluence Create a Page in a Space and Read It Back

Version 1.0.0

Resolve a space by its key, create a page inside it, and read the stored page back.

1 workflow 1 source API 1 provider
View Spec View on GitHub CollaborationContent ManagementDocumentationKnowledge BaseWikiArazzoWorkflows

Provider

confluence

Workflows

create-page-read-back
Create a Confluence page in a space identified by key and confirm it stored.
Looks up the space id for the supplied space key, creates a page with the supplied title and storage-format body, and reads the created page back to confirm it persisted and to capture its version.
3 steps inputs: body, parentId, spaceKey, status, title outputs: pageId, spaceId, versionNumber, webui
1
resolveSpace
getSpaces
Resolve the supplied space key to the numeric space id that the v2 API requires on write, and confirm exactly one space matched.
2
createPage
createPage
Create the page in the resolved space using the storage representation. The parentId is optional; without it the page is created at the space root.
3
readBackPage
getPageById
Read the created page back in storage format to confirm it persisted and to capture the authoritative version number for later optimistic updates.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Confluence Create a Page in a Space and Read It Back
  summary: Resolve a space by its key, create a page inside it, and read the stored page back.
  description: >-
    The first flow any Confluence integration needs. Confluence v2 addresses
    spaces by numeric id rather than by the human-facing space key, so the
    workflow resolves the key to an id before writing, creates the page in that
    space, and then reads the page back to capture the id, version number, and
    web UI link the caller needs for every subsequent call. Every step spells
    out its request inline so the flow can be read and executed without opening
    the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: confluenceCloudV2
  url: ../openapi/confluence-cloud-v2.yml
  type: openapi
workflows:
- workflowId: create-page-read-back
  summary: Create a Confluence page in a space identified by key and confirm it stored.
  description: >-
    Looks up the space id for the supplied space key, creates a page with the
    supplied title and storage-format body, and reads the created page back to
    confirm it persisted and to capture its version.
  inputs:
    type: object
    required:
    - spaceKey
    - title
    - body
    properties:
      spaceKey:
        type: string
        description: The human-facing space key (e.g. "ENG") to create the page in.
      title:
        type: string
        description: The title of the new page.
      body:
        type: string
        description: The page body in Confluence storage format (XHTML).
      parentId:
        type: string
        description: Optional id of the parent page; omit to create at the space root.
      status:
        type: string
        description: The status to create the page in, either draft or current.
  steps:
  - stepId: resolveSpace
    description: >-
      Resolve the supplied space key to the numeric space id that the v2 API
      requires on write, and confirm exactly one space matched.
    operationId: getSpaces
    parameters:
    - name: keys
      in: query
      value: $inputs.spaceKey
    - name: status
      in: query
      value: current
    - name: limit
      in: query
      value: 1
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.results.length > 0
      type: jsonpath
    outputs:
      spaceId: $response.body#/results/0/id
      spaceName: $response.body#/results/0/name
      homepageId: $response.body#/results/0/homepageId
  - stepId: createPage
    description: >-
      Create the page in the resolved space using the storage representation.
      The parentId is optional; without it the page is created at the space root.
    operationId: createPage
    requestBody:
      contentType: application/json
      payload:
        spaceId: $steps.resolveSpace.outputs.spaceId
        status: $inputs.status
        title: $inputs.title
        parentId: $inputs.parentId
        body:
          representation: storage
          value: $inputs.body
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      pageId: $response.body#/id
      pageStatus: $response.body#/status
      versionNumber: $response.body#/version/number
      webui: $response.body#/_links/webui
  - stepId: readBackPage
    description: >-
      Read the created page back in storage format to confirm it persisted and
      to capture the authoritative version number for later optimistic updates.
    operationId: getPageById
    parameters:
    - name: id
      in: path
      value: $steps.createPage.outputs.pageId
    - name: body-format
      in: query
      value: storage
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      pageId: $response.body#/id
      title: $response.body#/title
      spaceId: $response.body#/spaceId
      versionNumber: $response.body#/version/number
      authorId: $response.body#/authorId
      createdAt: $response.body#/createdAt
  outputs:
    spaceId: $steps.resolveSpace.outputs.spaceId
    pageId: $steps.readBackPage.outputs.pageId
    versionNumber: $steps.readBackPage.outputs.versionNumber
    webui: $steps.createPage.outputs.webui