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

Laert Pires March 20, 2014

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
Sergey Svishchev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 24, 2014

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

Use another remote API for now.

0 votes
Laert Pires May 14, 2014
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
TAGS
AUG Leaders

Atlassian Community Events