Skip to main content
Skip table of contents

Publish API

What you will learn here

On this page you will find our publishing API. The API allows administrators to programmatically interact with our app. This documentation covers the necessary steps for authentication, making requests and receiving responses.


Endpoints

Below is a list of available endpoints, their methods, and brief descriptions.

1. Get group usage

Return a list of group’s usage

  • URL: /rest/gm/conf/1.0/groups/usage

  • Method: GET

  • Headers:

    JSON
    {
      "Content-Type": "application/json",
      "Authorization": "Bearer YOUR_ACCESS_TOKEN"
    }

  • Query Parameters:

Parameter

Type

Required

Description

Default Value

groupName

string

Yes

Name of group

““

  • Request Body: Empty

  • Response

    • Success (200):

      JSON
      {
          "groupName": "confluence-administrators",
          "usages": [
              {
                  "usageType": "SPACE_PERMISSION",
                  "data": [
                      {
                          "id": 458761,
                          "space": {
                              "id": 131073,
                              "key": "ds",
                              "name": "Demonstration Space",
                              "url": "http://localhost:1990/confluence/display/ds"
                          },
                          "type": [
                              "VIEWSPACE",
                              "REMOVEOWNCONTENT",
                              "COMMENT",
                              "EDITSPACE",
                              "SETSPACEPERMISSIONS",
                              "REMOVEPAGE",
                              "REMOVECOMMENT",
                              "REMOVEBLOG",
                              "CREATEATTACHMENT",
                              "REMOVEATTACHMENT",
                              "EDITBLOG",
                              "EXPORTSPACE",
                              "REMOVEMAIL",
                              "SETPAGEPERMISSIONS"
                          ],
                          "url": "http://localhost:1990/confluence/spaces/spacepermissions.action?key=ds"
                      },
                      {
                          "id": 458853,
                          "space": {
                              "id": 131074,
                              "key": "DS1",
                              "name": "Demo Space",
                              "url": "http://localhost:1990/confluence/display/DS1"
                          },
                          "type": [
                              "VIEWSPACE",
                              "REMOVEOWNCONTENT",
                              "COMMENT",
                              "EDITSPACE",
                              "SETSPACEPERMISSIONS",
                              "REMOVEPAGE",
                              "REMOVECOMMENT",
                              "REMOVEBLOG",
                              "CREATEATTACHMENT",
                              "REMOVEATTACHMENT",
                              "EDITBLOG",
                              "EXPORTSPACE",
                              "REMOVEMAIL",
                              "SETPAGEPERMISSIONS"
                          ],
                          "url": "http://localhost:1990/confluence/spaces/spacepermissions.action?key=DS1"
                      },
                      {
                          "id": 458920,
                          "space": {
                              "id": 131075,
                              "key": "OM",
                              "name": "ONLY ME",
                              "url": "http://localhost:1990/confluence/display/OM"
                          },
                          "type": [
                              "VIEWSPACE"
                          ],
                          "url": "http://localhost:1990/confluence/spaces/spacepermissions.action?key=OM"
                      }
                  ]
              },
              {
                  "usageType": "CONFLUENCE_GLOBAL_PERMISSION",
                  "data": [
                      {
                          "url": "http://localhost:1990/confluence/admin/permissions/globalpermissions.action",
                          "permissions": [
                              {
                                  "type": "Use Confluence"
                              },
                              {
                                  "type": "Confluence Administrator"
                              },
                              {
                                  "type": "System Administrator"
                              },
                              {
                                  "type": "Personal Space"
                              },
                              {
                                  "type": "Create Space(s)"
                              }
                          ]
                      }
                  ]
              },
              {
                  "usageType": "PAGE_RESTRICTION",
                  "data": []
              },
              {
                  "usageType": "THIRD_PARTY",
                  "data": [
                      {
                          "name": "Visibility for Confluence",
                          "key": "VFC"
                      }
                  ]
              }
          ]
      }

2. Get group’s 3rd party usage

Return a list of group’s usage from the app

Currently, we support for app Visibility for Confluence

  • URL: /rest/gm/conf/1.0/groups/third-party/usage

  • Method: GET

  • Headers:

    JSON
    {
      "Content-Type": "application/json",
      "Authorization": "Bearer YOUR_ACCESS_TOKEN"
    }

  • Query Parameters:

Parameter

Type

Required

Description

Default Value

groupName

string

Yes

Name of group

thirdParty

string

Yes

  • VFC : Support for app Visibility for Confluence

  • Request Body: Empty

  • Response

    • Success (200):

      JSON
      {
          "groupName": "confluence-administrators",
          "usages": [
              {
                  "usageType": "VFC_HIDE_IF_MACRO",
                  "data": []
              },
              {
                  "usageType": "VFC_SHOW_IF_MACRO",
                  "data": []
              }
          ]
      }

3. Copy group’s usage

Copy usage from a group to another group

  • URL: /rest/gm/conf/1.0/groups/usage

  • Method: POST

  • Headers:

    JSON
    {
      "Content-Type": "application/json",
      "Authorization": "Bearer YOUR_ACCESS_TOKEN"
    }

  • Query Parameters: Emty

  • Request Body

    CODE
    {
      "copiedComponents": [components],
      "targetGroup": "[targetGroup]",
      "sourceGroup": "[sourceGroup]"
    }


    Example:

    CODE
    {
      "copiedComponents": [
        "SPACE_PERMISSION"
      ],
      "targetGroup": "group_1",
      "sourceGroup": "group_2"
    }

COMPONENT KEY

SPACE_PERMISSION

CONFLUENCE_GLOBAL_PERMISSION

PAGE_RESTRICTION

  • Response

    • Success (200):

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.