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

Get macro body by hash

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

The hash is generated by connect during render time of the local macro holder and is usually only relevant during the scope of one request. For optimisation purposes, this hash will usually live for multiple requests.

Collecting a macro by its hash should now be considered deprecated and will be replaced, transparently with macroIds. This resource is currently only called from connect addons which will eventually all use the getContentById resource.

To make the migration as seamless as possible, this resource will match macros against a generated hash or a stored macroId. This will allow add ons to work during the migration period.

GET/rest/api/content/{id}/history/{version}/macro/hash/{hash}deprecated
Path parameters
idstringrequired

the id of the content.

versionstringrequired

the version of the content which the hash belongs.

hashstringrequired

the macroId to find the correct macro.

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 hash or id.

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/hash/string' \
  -H 'Accept: application/json'
Response
{
  "name": "panel",
  "body": "This is the body of the panel macro.",
  "parameters": {}
}

Was this page helpful?