Comments

About Comments

Allows you to add comments to “any” documents in Kazoo.

Schema

Schema for comments

KeyDescriptionTypeDefaultRequiredSupport Level
commentsThe history of comments made on a objectarray([#/definitions/comment](#comment))false

comment

Schema for a single comment

KeyDescriptionTypeDefaultRequiredSupport Level
account_idAccount ID of the commenter.string()false
action_requiredSpecified if an action is required by the user.boolean()falsefalse
authorFull name of the authorstring()true
contentContent of the commentstring()true
is_privateSpecified if this comment is privateboolean()falsefalse
timestampinteger()true
user_idUser ID of the commenterstring()false

Fetch

DELETE /v2/accounts/{ACCOUNT_ID}/comments

curl -v -X DELETE \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/comments
{
    "data": [
    ],
    "status": "success"
}

Fetch a Comment

GET /v2/accounts/{ACCOUNT_ID}/comments

curl -v -X GET \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/comments
{
  "data": "{COMMENT}",
  "status": "success"
}

Add a Comment

PUT /v2/accounts/{ACCOUNT_ID}/comments

curl -v -X PUT \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    -d '{"data": {"comments": [{COMMENT_3}]}}' \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/comments
{
    "data": {
        "comments": [
            "{COMMENT_1}",
            "{COMMENT_2}",
            "{COMMENT_3}"
        ]
    },
    "status": "success"
}

Delete a Comment

DELETE /v2/accounts/{ACCOUNT_ID}/comments/{COMMENT_ID}

curl -v -X DELETE \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/comments/{COMMENT_ID}
{
    "data": {
        "comments": [
            "{COMMENT_1}",
            "{COMMENT_2}"
        ]
    },
    "status": "success"
}

Fetch a Comment

GET /v2/accounts/{ACCOUNT_ID}/comments/{COMMENT_ID}

curl -v -X GET \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/comments/{COMMENT_ID}
{
    "data": {
        "comments": [
            "{COMMENT_1}",
            "{COMMENT_2}"
        ]
    },
    "status": "success"
}

Update a Comment

POST /v2/accounts/{ACCOUNT_ID}/comments/{COMMENT_ID}

curl -v -X POST \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    -d '{"data": "{COMMENT}"}' \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/comments/{COMMENT_ID}
{
    "data": "{COMMENT}",
    "status": "success"
}

On this page