REST API: Attachments

Methods


TypeVer.Command parameterParameters
Getters
POST3.0sp6+ uploadAttachment treeType=<treeType>
nodeType=<nodeType>
nodeId=<id>
attachmentName=<name>
Content of the attachment must be passed in the request's body
as multi-part.
GET3.0sp4+ downloadAttachment treeType=<treeType>
nodeType=<nodeType>
attachmentId=<id>
Content of the attachment is passed in the response body
(with a mime-type set to application/octet-stream) and filename as a response's parameter
GET3.0sp7+ downloadAttachmentRevision treeType=<treeType>
nodeType=<nodeType>
attachmentId=<id>
revision=<revision>
Content of the attachment is passed in the response body
(with a mime-type set to application/octet-stream) and filename as a response's parameter
GET3.0sp7+ getAttachmentRevisions nodeType=<nodeType>
attachmentId=<id>
Example of success:
{
  "objects": {
    "object": [
      {
        "size": 10767,
        "lastAuthor": "Eric",
        "id": 5,
        "dateSubmitted": "2016-09-15 16:30:35",
        "revision": 3
      },
      {
        "size": 10759,
        "lastAuthor": "Eric",
        "id": 4,
        "dateSubmitted": "2016-09-15 16:30:12",
        "revision": 2
      },
      {
        "size": 10749,
        "lastAuthor": "Eric2",
        "id": 3,
        "dateSubmitted": "2015-02-20 02:49:39",
        "revision": 1
      }
    ]
  }
}

POST3.0sp7+ deleteAttachments treeType=<treeType>
nodeType=<nodeType>
nodeId=<id>
attachmentIds=<id, id, ...>
attachmentNames=<name, name, ...>
Example of success:
{
  "result": "success",
  "message": "result: 1"
}

Loading...