Scaffolding REST API

Overview

Introduced in Scaffolding version 8.10.0, the Scaffolding REST API uses JSON and provides access to the schema of a page's form that can be used to write content into that form.

For code examples, visit our Scaffolding REST API Code Examples page.

Authentication

The Scaffolding REST API uses the same authentication as the Confluence API authentication. For more information, consult the Atlassian Developers documentation.

GET Method

Retrieve the Scaffolding structure

Using the GET method, the Scaffolding REST API is able to return the structure of a Scaffolding page when requested with the Confluence page ID endpoint parameter.

{CONFLUENCE-BASE-URL}/rest/scaffolding/1.0/api/form/meta/{pageid}

A successful basic request will return the following.

Response
[ { "macro": "text-data", "macroId": "ca6bab92-2039-4847-b85b-8c0a2ca7820c", "minLength": null, "name": "name", "pattern": null, "language": null, "content": null, "required": null, "maxLength": null } ]

Retrieve Scaffolding Data

The following endpoint retrieves scaffolding data from a page using a pageid parameter.

{CONFLUENCE-BASE-URL}/rest/scaffolding/1.0/api/form/{pageid}

A successful request will return a response similar to the following.

Response

Endpoint Parameters

key

required

value

key

required

value

pageid

yes

The page ID of a Confluence page. Consult the Confluence documentation for more information.

PUT Method

Using the PUT method, the Scaffolding REST API is able to import Scaffolding data.

View the Parameters section below to see what macros are supported.

This method only works if there are existing Scaffolding macros with matching names on the page.

If the value parameter is not provided or is null, the API will assume the field value to be empty.

Endpoint Parameters

key

required

value

key

required

value

pageid

yes

The page ID of a Confluence page. Consult the Confluence documentation for more information.

JSON example for text-data, number-data, date-data, list-data, attachment-data
JSON example for table-data and repeating-data
JSON example for group-data

Parameters

Macro (required)

Name (required)

Value (required)

Macro (required)

Name (required)

Value (required)

Text Data

user-defined

  • string

Date Data

user-defined

  • string with date format "yyyy-MM-dd HH:mm:ss"

Number Data

user-defined

  • number

List Data

user-defined

  • array of strings (see Options Parameter table below)

Table Data

user-defined

  • an object containing a row number mapped to an array of parameters

Repeating Data

user-defined

  • an object containing a row number mapped to an array of parameters

Excerpt Data

user-defined

  • string

Group Data

user-defined

  • array of parameters

Options Parameters

Option

Value (required)

Option

Value (required)

List Option

  • User-defined value

Content Options

  • pageid

User Options

  • user key / username

Label Options

  • label name

Attachment Options

  • attachment name

Code Examples

Support Terms & Conditions

We provide support for the API itself (bug fixes and improvements) but do not provide support for implementation of the API and/or customization on your instance.

Questions? Feedback?