Skip to content
atlassian-dc-mcp
Esc
↑↓navigate↵open⌘Jpreview

Get macro body by macro ID

Returns the body of a macro (in storage format) with the given id. This resource is primarily used by connect applications that require the body of macro to perform their work.

When content is created, if no macroId is specified, then Confluence will generate a random id. The id is persisted as the content is saved and only modified by Confluence if there are conflicting IDs.

To preserve backwards compatibility this resource will also match on the hash of the macro body, even if a macroId is found. This check will become redundant as pages get macroId’s generated for them and transparently propagate out to all instances.

GET/rest/api/content/{id}/history/{version}/macro/id/{macroId}
Path parameters
macroIdstringrequired

the macroId to find the correct macro.

idstringrequired

the id of the content.

versionstringrequired

the version of the content which the hash belongs.

Responses
200

Returns a json representation of a macro.

namestring
bodystring
parametersobject
404

Returned if there is no content with the given id, or if the calling user does not have permission to view the content, or there is no macro matching the given id or hash.

statusCodeinteger<int32>
dataValidationResult
Show properties
authorizedboolean
validboolean
errorsobject
successfulboolean
allowedInReadOnlyModeboolean
messagestring
reasonstring
Try it
Server
Parameters
Request
curl -X GET 'http://example.com:7990/confluence/rest/api/content/string/history/string/macro/id/string' \
  -H 'Accept: application/json'
Response
{
  "name": "panel",
  "body": "This is the body of the panel macro.",
  "parameters": {}
}

Was this page helpful?