Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Macro for Assets can be read/edited via API, to automate creation of pages.

(blue star) This is not available on Dashboard gadget for Assets.

Available APIs

Method

URI

Query Params

Token Scope

Token Space(s)

Description

Status
colourGreen
titleGET

instance_url/macro

pageId

READ

can be limited using space list or empty to allow all spaces.

Returns an array of Macro for Assets configuration for a specific page using pageId param.
Example;

Status
colourGreen
titleGET
instance_url/macro?pageId=1234

Status
colourPurple
titlePUT

instance_url/macro

pageId

WRITE

can be limited using space list or empty to allow all spaces.

Updates all Macro for Assets configuration specified in the body for a specific page using pageId param.

Use

Status
colourGreen
titleGET
on a page to fetch format of a macro configuration.

Example;

Status
colourPurple
titlePUT
instance_url/macro?pageId=1234
body:

Code Block
languagejs
[
  {
    "id": "rxt-95ae25ba-0759-4b4e-a40f-edbdc7194067",
    "configuration": {
        "columns": [],
        "iql": "objectType=\"Jira Users\"",
        "displayAs": "AS_TABLE",
        "pageSize": 5,
        "schemaId": "4",
        "connectionId": "45157a8a-79ad-46f7-b920-c21211bf79ec",
        "tableOptions": {
            "linksEnabled": true,
            "downloadEnabled": false,
            "printEnabled": false
        }
    }
  } 
]

Status
colourBlue
titlePOST

instance_url/page

spaceKey

WRITE

can be limited using space list or empty to allow all spaces.

Creates one or more new page(s) with Macro for Assets added and pre-configured.

spaceKey determine what space to add the page in.

Body takes an array of pages title and parent with macro configuration.

Example;

Status
colourBlue
titlePost
instance_url/page?spaceKey=ABC
body:

Code Block
languagejs
[
  {
    "title":"Page title",
    "parentPageId":"id of parent page or null on root level",
    "macros":[
      {
            "id": "rxt-95ae25ba-0759-4b4e-a40f-edbdc7194067",
            "configuration": {
                "columns": [],
                "iql": "objectType=\"Jira Users\"",
                "displayAs": "AS_TABLE",
                "pageSize": 5,
                "schemaId": "4",
                "connectionId": "45157a8a-79ad-46f7-b920-c21211bf79ec",
                "tableOptions": {
                    "linksEnabled": true,
                    "downloadEnabled": false,
                    "printEnabled": false
                }
            }
      }
    ]
  }
]

Status
colourBlue
titlePOST

instance_url/page/copy

spaceKey

WRITE

can be limited using space list or empty to allow all spaces.

Copies one or more new page(s) with Macro for Assets added and pre-configured.

spaceKey determine what space to add the page in.

Body takes an array of pages with macro configuration

Example;

Status
colourBlue
titlePost
instance_url/page/copy?spaceKey=ABC
body:

Code Block
languagejs
[
  {
    "title":"Page title",
    "parentPageId":"id of parent page or null on root level",
    "copyFrom":"pageId"
    "macros":[
      {
            "id": "rxt-95ae25ba-0759-4b4e-a40f-edbdc7194067",
            "configuration": {
                "columns": [],
                "iql": "objectType=\"Jira Users\"",
                "displayAs": "AS_TABLE",
                "pageSize": 5,
                "schemaId": "4",
                "connectionId": "45157a8a-79ad-46f7-b920-c21211bf79ec",
                "tableOptions": {
                    "linksEnabled": true,
                    "downloadEnabled": false,
                    "printEnabled": false
                }
            }
      }
    ]
  }
]

Steps to get started

  1. Go to Manage Apps → Macro for Assets

  2. Click the API tab.

...