• Document Up to Date

Get Attachments

Returns all the attachments for a given comment.

Resource Information

This service uses the tomcat application on port 8080 by default. To see a list of default ports click here

The context for this API is /crafter-social, please prefix the API URLs with this context.

HTTP Verb
GET
URL
/api/3/comments/:id/attachments
Response Formats
JSON

Parameters

Name
Type
Required
Description
context
String
The ID of the Social Context
id
String
The ID of the comment

Example

Request

GET .../api/3/comments/59678d3f300426156e21df50?context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9

Response

Status 200 OK

 1[
 2  {
 3    "md5": "1300018473cc0038187aaa0e2604fa27",
 4    "fileId": "5967ac48300426156e21df51",
 5    "contentType": "image/png",
 6    "fileSize": "1.5 KB",
 7    "storeName": "/f5b143c2-f1c0-4a10-b56e-f485f00d3fe9/59678d3f300426156e21df50/image1.png",
 8    "fileName": "image1.png",
 9    "savedDate": "2017-07-13T11:22Z",
10    "fileSizeBytes": 1497,
11    "attributes": {
12      "owner": "59678d3f300426156e21df50"
13    }
14  }
15]

Responses

Status
Location
Response Body
200

See example above.
400

















{ "message" : "UGC with given Id does not
exist" }
{ "message" : "Given Attachment id is not
valid" }
401

{ "message" : "User must be logged in" }
403







{ "message" : "Current subject does not have
permission to execute global action ..." }
404







{ "message" : "Unable to find ugc with
id ..." }
500

{ "message" : "Internal server error" }