GetDiscussion
Collects the discussions for the assets.
Defined in: getDiscussion.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
GetDiscussion(ids, resolver, order, limit, verbose, FILTERS, fields)
Given a resolver URL or an array of Id's, this endpoint returns asset data for each asset as well as its discussion.
|
Class Detail
GetDiscussion(ids, resolver, order, limit, verbose, FILTERS, fields)
Given a resolver URL or an array of Id's, this endpoint returns asset data for each asset as well as its discussion.
- Parameters:
- ids Optional
- The asset id's.
- resolver Optional
- A resolver url.
- order Optional, Default: "ASC"
- display the discussion ascending "asc" or descending "DESC" order. "ASC" is chronological order.
- limit Optional, Default: no limit
- the number of discussions to show for each asset.
- verbose Optional, Default: false
- Setting this to true will collect a variety of default values for each asset.
- FILTERS Optional
- Filtering can be applied to the "id", "name", "path", "height", "width", "bytes", "lastModified", "mimeType", and "resolver" properties if verbose=true.
- fields Optional
- An array of field id's to collect the values for each asset
- Returns:
- [{assetInfo}, ... ]
/wf/restapi/v2/getDiscussion
Properties:
ids=[201624287,201624288]
Response:
[
{
"discussion": [
{
"date": "Thu, 12 Oct 2017 15:59:07 -0500",
"endTime": "-1.0",
"globalAdminEdited": "false",
"startTime": "-1.0",
"text": "Message in the discussion",
"dateEdited": "Thu, 12 Oct 2017 15:59:07 -0500",
"page": "1",
"user": "root",
"uid": "A69D9135-4076-03F7-4D48-56AED2C3110F"
},
{
"date": "Thu, 12 Oct 2017 15:59:20 -0500",
"endTime": "-1.0",
"globalAdminEdited": "false",
"startTime": "-1.0",
"text": "Second message",
"dateEdited": "Thu, 12 Oct 2017 15:59:20 -0500",
"page": "1",
"user": "root",
"uid": "19CFCB3A-DA75-9955-A3DC-738A686CB"
}
],
"id": 201624287
},
{
"discussion": [
{
"date": "Thu, 12 Oct 2017 15:59:42 -0500",
"endTime": "-1.0",
"globalAdminEdited": "false",
"startTime": "-1.0",
"text": "New Discussion",
"dateEdited": "Thu, 12 Oct 2017 15:59:42 -0500",
"page": "1",
"user": "root",
"uid": "9F1DBF1C-992B-B2B3-A0DA-F1EE2C8AE9EA"
}
],
"id": 201624288
}
]
/wf/restapi/v2/getDiscussion
Properties:
ids=[201624287]
verbose=true
Response:
[
{
"discussion": [
{
"date": "Thu, 12 Oct 2017 15:59:07 -0500",
"endTime": "-1.0",
"globalAdminEdited": "false",
"startTime": "-1.0",
"text": "Message in the discussion",
"dateEdited": "Thu, 12 Oct 2017 15:59:07 -0500",
"page": "1",
"user": "root",
"uid": "A69D9135-4076-03F7-4D48-56AED2C3110F"
},
{
"date": "Thu, 12 Oct 2017 15:59:20 -0500",
"endTime": "-1.0",
"globalAdminEdited": "false",
"startTime": "-1.0",
"text": "Second message",
"dateEdited": "Thu, 12 Oct 2017 15:59:20 -0500",
"page": "1",
"user": "root",
"uid": "19CFCB3A-DA75-9955-A3DC-738A686CB"
}
],
"id": 201624287,
"name": "opo0006_orig.tif",
"path": "hubble/opo0006_orig.tif",
"height": 1480,
"width": 2292,
"bytes": 10180918,
"lastModified": 1506954271000,
"mimeType": "image/tiff",
"previews": {
"thumbnail": "../servlet/jb.view?table=thumbnails&col=thumbnails&id=pe_323031363234323837",
"viewex": "../servlet/jb.view?table=viewex&col=viewex&id=pe_323031363234323837",
"downloadUrl": "../servlet/dload?id=pe_323031363234323837"
}
}
]
/wf/restapi/v2/getDiscussion
Properties:
ids=[201624287]
order=ASC
limit=1
Response:
[
{
"discussion": [
{
"date": "Thu, 12 Oct 2017 15:59:07 -0500",
"endTime": "-1.0",
"globalAdminEdited": "false",
"startTime": "-1.0",
"text": "Message in the discussion",
"dateEdited": "Thu, 12 Oct 2017 15:59:07 -0500",
"page": "1",
"user": "root",
"uid": "A69D9135-4076-03F7-4D48-56AED2C3110F"
}
],
"id": 201624287
}
]
/wf/restapi/v2/getDiscussion
Properties:
ids=[201624287,201624288]
order=DESC
limit=1
Response:
[
{
"discussion": [
{
"date": "Thu, 12 Oct 2017 15:59:20 -0500",
"endTime": "-1.0",
"globalAdminEdited": "false",
"startTime": "-1.0",
"text": "Second message",
"dateEdited": "Thu, 12 Oct 2017 15:59:20 -0500",
"page": "1",
"user": "root",
"uid": "19CFCB3A-DA75-9955-A3DC-738A686CB"
}
],
"id": 201624287
}
]