Auto Light Dark
Auto Light Dark

Page Approval on Data Center

Get page approval details

Path

/rest/approvalmacro/1.0/approval

Method

POST

Request body

JSON
{
  "type": "page",
  "pageId": 786462, // The Confluence Page ID
  "version": 1 // The Confluence Page Version
}

Response body

JSON
{
  "type": "page",
  "status": "pending",
  "spaceId": 10747905,
  "creatorUsername": "ff80808160e8c8810160e8d6a1210000",
  "pageId": 786462,
  "title": "Test",
  "requestNotifications": true,
  "statusNotifications": true,
  "expireOnEdit": false,
  "quorumSize": 0,
  "postCommentsEnabled": false,
  "members": [
    {
      "approvalId": 14,
      "userKey": "ff80808160e8c8810160e8d6a1210000",
      "status": "approved",
      "date": 1550055298599,
      "avatarUrl": "/confluence/download/attachments/65573/user-avatar",
      "displayName": "John",
      "username": "john"
    }
  ],
  "version": 1,
  "superseded": false,
  "created": 1791892985403,
  "updated": 1791892985403
}

Possible errors

  • 404

    • No Page exists as provided

    • No Page Version exists as provided

    • No Approvals for Confluence Record exists as provided

  • 401

    • Anonymous User

    • No Permissions on the Space (Space Permissions)

    • No Permissions on the Page (Page Restrictions)

  • 400

    • Invalid JSON

See response body (JSON) for detailed error information.

Create or update a page approval

Path

/rest/approvalmacro/1.0/approval/page

Method

PUT

Request body

JSON
{
  "title": "Test page",
  "pageId": "12386308",
  "requestNotificationsEnabled": true,
  "statusNotificationsEnabled": true,
  "expireOnEdit": true,
  "expiryDate": "", // YYYY-MM-DD or empty string if no expiry
  "quorumSize": 0, // 0 if not setting a quorum
  "members": ["ff8080819ac4480f019ac448ea4a0000"]
}

Response

  • 200 OK

Response body

JSON
{
  "type": "page",
  "status": "pending",
  "spaceId": 10747905,
  "creatorUsername": "ff8080819ac4480f019ac448ea4a0000",
  "pageId": 12386308,
  "title": "Test page",
  "requestNotifications": true,
  "statusNotifications": true,
  "expireOnEdit": true,
  "quorumSize": 0,
  "postCommentsEnabled": false,
  "members": [
    {
      "approvalId": 2,
      "userKey": "ff8080819ac4480f019ac448ea4a0000",
      "status": "pending",
      "date": 1791903182580,
      "avatarUrl": "/confluence/images/icons/profilepics/default.svg",
      "displayName": "admin",
      "username": "admin"
    }
  ],
  "version": 1,
  "superseded": false,
  "created": 1791903182579,
  "updated": 1791903210640
}

Possible errors

  • 404

    • No Page exists as provided

    • No Page Version exists as provided

    • No Approvals for Confluence Record exists as provided

  • 401

    • Anonymous User

    • No Permissions on the Space (Space Permissions)

    • No Permissions on the Page (Page Restrictions)

  • 400

    • Invalid Request - e.g. trying to change an old page version

    • Invalid JSON

See response body (JSON) for detailed error information.

Approve or reject a page approval

Path

/rest/approvalmacro/1.0/approval/action

Method

POST

Request body

JSON
{
  "type": "page",
  "action": "rejected", // "rejected" or "approved"
  "pageId": 786462, // The Confluence Page ID
  "version": 1 // The Confluence Page Version
}

Response

  • 200 OK

Possible errors

  • 404

    • No Page exists as provided

    • No Page Version exists as provided

    • No Approvals for Confluence Record exists as provided

  • 401

    • Anonymous User

    • No Permissions on the Space (Space Permissions)

    • No Permissions on the Page (Page Restrictions)

  • 400

    • Invalid Request - e.g. trying to change an old page version

    • Invalid JSON

See response body (JSON) for detailed error information.