How to get the creator of an attachment using confluence REST api?

How do I get the creator of an attachment using confluence REST api?

http://confluence/rest/prototype/1/attachment/111111

gets this:

{
  "id": "111111",
  "type": "attachment",
  "ownerId": "xxxxxx",
  "parentTitle": "bla",
  "fileName": "bla.png",
  "contentType": "image/png",
  "fileSize": 162070,
  "niceFileSize": "158 kB",
  "version": 1,
  "niceType": "Image",
  "iconClass": "content-type-attachment-image",
  "title": "bla.png",
  "thumbnailLink": {
    "href": "http://confluence/download/thumbnails/11111/bla.png?api=v2",
    "rel": "thumbnail"
  },
  "thumbnailWidth": 300,
  "thumbnailHeight": 139,
  "wikiLink": "bla",
  "space": {
    "key": "bla",
    "name": "bla",
    "title": "bla",
    "type": "bla",
    "link": [
      {
        "href": "http://confluence/rest/prototype/1/space/bla",
        "rel": "self"
      }
    ]
  },
  "lastModifiedDate": {
    "friendly": "Feb 14, 2012",
    "date": "2012-02-14T04:27:43+1100"
  },
  "createdDate": {
    "friendly": "Feb 14, 2012",
    "date": "2012-02-14T04:27:43+1100"
  },
  "link": [
    {
      "href": "http://confluence/rest/prototype/1/attachment/11111",
      "rel": "self"
    },
    {
      "href": "http://confluence/download/attachments/8389284/bla.png?version=1&modificationDate=1329154063000&api=v2",
      "type": "image/png",
      "rel": "download"
    },
    {
      "href": "http://confluence/pages/viewpageattachments.action?pageId=222222&highlight=bla#bla.png",
      "type": "text/html",
      "rel": "alternate"
    }
  ]
}

Is there a call that exposes the creator? or call that can return the user by the ownerId?

3 answers

1 accepted

0 votes
Answer accepted

You cannot get that info via REST, it is a bug -- https://jira.atlassian.com/browse/CONF-33121

Use another remote API for now.

using this: 'http://confluence.fx.srv.westpac.com.au/rpc/json-rpc/confluenceservice-v2/getUser' from the creator id

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,034 views 2 13
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you