Skip to main content

Record Comment

While data is stored inside records, communication in Tape usually happens inside comments on those records. Comments can be created, retrieved, updated and deleted via the API.

Create a record comment

POSThttps://api.tapeapp.com/v1/comment/record/{record_id}

To create a new record comment for the record with the specified record_id, issue a POST request to this endpoint. The POST body has to contain the value property with the text of the comment. It may further specify file_ids, an array of temporary file IDs analog to the attachment field type. More details on file uploads can be found here.

Apart from plain text, the comment value property supports limited formatting and extra options:

  • Forcing newlines using \n
  • Adding a user mention using the proper syntax, e.g. for this user with ID 123 and name "Dan Jacob": @[Dan Jacob](user:123)

The following query paramters are available:

Query paramTypeDescription
silentbooleanDo not generate notifications for this operation (default: false)
hookbooleanExecute webhooks for this operation (default: true)

The following example creates a plain text comment on the record with ID 1:

➡️    Request
curl -X POST https://api.tapeapp.com/v1/comment/record/1  \
-u user_key_replace_with_your_api_key: \
-H "Content-Type: application/json" \
--data '{
"value": "This is a comment on record with ID 1."
}'
⬅️    Response
{
"comment_id": 1000,
"value": "This is a comment on record with ID 1.",
"created_on": "2022-03-01 12:00:00",
"ref": { "type": "record", "id": 1 },
"created_by": {
"user_id": 600,
"mail": ["[email protected]"],
"image": null,
"name": "Dan Jacob",
"org_id": 1,
"type": "user"
}
}

Retrieve a comment

GEThttps://api.tapeapp.com/v1/comment/{comment_id}

Retrieve the comment with the specified comment_id:

➡️    Request
curl https://api.tapeapp.com/v1/comment/1000 \
-u user_key_replace_with_your_api_key:
⬅️    Response
{
"comment_id": 1000,
"value": "This is a comment on record with ID 1.",
"created_on": "2022-03-01 12:00:00",
"ref": { "type": "record", "id": 1 },
"created_by": {
"user_id": 600,
"mail": ["[email protected]"],
"image": null,
"name": "Dan Jacob",
"org_id": 1,
"type": "user"
}
}

Delete a comment

DELETEhttps://api.tapeapp.com/v1/comment/{comment_id}

Delete the comment with the specified comment_id. The following query paramters are available:

Query paramTypeDescription
silentbooleanDo not generate notifications for this operation (default: false)
hookbooleanExecute webhooks for this operation (default: true)
➡️    Request
curl -X DELETE https://api.tapeapp.com/v1/comment/1  \
-u user_key_replace_with_your_api_key:
⬅️    Response
{}

Retrieve comments for a record

GEThttps://api.tapeapp.com/v1/comment/record/{record_id}

Retrieve comments for the record with the specified record_id. Note that results are paginated.

➡️    Request
curl https://api.tapeapp.com/v1/record/app/1?limit=2 \
-u user_key_replace_with_your_api_key:
⬅️    Response
{
"total": 2,
"cursor": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJibGFiRGVmSWQiOjgsInZhbHVlcyI6WzE1OV0sImV4cCI6MTY1MDYxODc3OH0.iY5TnLSBDGCnFXbStcrLPTmP6MATnS_JKywbvC4tx3g",
"comments": [
{
"comment_id": 1000,
"value": "This is a comment on record with ID 1.",
"created_on": "2022-03-01 12:00:00",
"ref": { "type": "record", "id": 1 },
"created_by": {
"user_id": 600,
"mail": ["[email protected]"],
"image": null,
"name": "Dan Jacob",
"org_id": 1,
"type": "user"
}
},
{
"comment_id": 1001,
"value": "This is another comment on record with ID 1.",
"created_on": "2022-03-01 13:00:00",
"ref": { "type": "record", "id": 1 },
"created_by": {
"user_id": 600,
"mail": ["[email protected]"],
"image": null,
"name": "Dan Jacob",
"org_id": 1,
"type": "user"
}
}
]
}

Query Parameters

ParameterType TypeMinMax
limitintegerNumber of comments to return. Defaults to 100.0100
cursorstringCursor for pagination--