Skip to end of metadata
Go to start of metadata

Comment API

The Comment API allows you to add, modify and remove comments in your system. The following methods are available:

 

Get all

Returns all comments from the passed ID.

Method

Method Name

Returns

getall

Record set

Input Parameter

Parameter

Description

Type

Required

Sample Input

api_key

A valid API key

String

yes

54592180-7060-4D4B-BC74-2566F4B2F943

idValid file or collection IDStringyes7859437598-2345-2345
typethe "file" typeStringyescol = collection
img = images
vid = videos
aud = audios
doc = documents

Output Value

Name

Description

Sample Output

com_id

ID of the comment

1

com_text

comment

This is a comment

com_date

Date when the comment has been added

2012-11-10 17:00:00

user_login_nameLogin name of userMartin
user_first_nameFirst name of userMartin
user_last_nameLast name of userMaster

REST: Sample Request

Sample Output

Output format

Remember you can adjust the output dynamically. The API returns JSON by default. For record sets it defaults to a ROW based set, if you need COLUMNS simply append "&__BDQUERYFORMAT=column" to your call. In case, you need JSONP you want to append "&__BDRETURNFORMAT=jsonp&callback=?". In order to retrieve XML (WDDX) you simply need to append "&__BDRETURNFORMAT=wddx".

Get one

Method

Method Name

Returns

get

Record set

Input Parameter

Parameter

Description

Type

Required

Sample Input

api_key

A valid API key

String

yes

54592180-7060-4D4B-BC74-2566F4B2F943

idValid file or collection IDStringyes7859437598-2345-2345

Output Value

Name

Description

Sample Output

com_id

ID of the comment

1

com_text

comment

This is a comment

com_date

Date when the comment has been added

2012-11-10 17:00:00

user_login_nameLogin name of userMartin
user_first_nameFirst name of userMartin
user_last_nameLast name of userMaster

REST: Sample Request

Sample Output

Output format

Remember you can adjust the output dynamically. The API returns JSON by default. For record sets it defaults to a ROW based set, if you need COLUMNS simply append "&__BDQUERYFORMAT=column" to your call. In case, you need JSONP you want to append "&__BDRETURNFORMAT=jsonp&callback=?". In order to retrieve XML (WDDX) you simply need to append "&__BDRETURNFORMAT=wddx".

Add or update

Method

Method Name

Returns

set

String

Input Parameter

Parameter

Description

Type

Required

Sample Input

api_key

A valid API key

String

yes

54592180-7060-4D4B-BC74-2566F4B2F943

idID of the comment (Provide the ID only if you want to update. DON'T pass any value and the comment will be added!)Stringno1110008
id_relatedID of the collection of file this comment relates toStringyes54592180
commentCommentStringyespictures
typethe "file" typeStringyescol = collection
img = images
vid = videos
aud = audios
doc = documents

Output Value

Name

Description

Sample Output

responsecode

A response number

0 = success

message

Status of operation

Comment added/updated successfully

id

Either the new comment id or the existing ID (on update)

1110008

REST: Sample Request

Sample Output

Remove

Method

Method Name

Returns

remove

String

Input Parameter

Parameter

Description

Type

Required

Sample Input

api_key

A valid API key

String

yes

54592180-7060-4D4B-BC74-2566F4B2F943

idID of the commentStringyes108

Output Value

Name

Description

Sample Output

responsecode

A response number

0 = success

message

Status of operation

Comment removed

REST: Sample Request

Sample Output

  • No labels