Get comments for an entity
GET
/v1/comments
const url = 'https://api.varman.io/v1/comments?entityId=tsk_abc123def456&entityType=task';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.varman.io/v1/comments?entityId=tsk_abc123def456&entityType=task' \ --header 'X-API-Key: <X-API-Key>'Get comments for an entity in Varman. Create and manage collaboration comments on compliance entities such as tasks, policies, risks, vendors, and findings.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”entityId
required
string
Example
tsk_abc123def456ID of the entity to get comments for
entityType
required
string
Type of entity
Responses
Section titled “Responses”Comments retrieved successfully
Media typeapplication/json
Array<object>
object
id
required
Unique identifier for the comment
string
content
required
Comment content
string
author
required
Comment author information
object
id
required
User ID
string
name
required
User name
string
email
required
User email
string
image
required
User profile image URL
object
deactivated
required
Whether the user is deactivated
boolean
attachments
required
Attachment metadata (URLs generated on-demand)
Array<object>
object
id
required
Unique identifier for the attachment
string
name
required
Original filename
string
type
required
File type/MIME type
string
createdAt
required
Upload timestamp
string format: date-time
createdAt
required
Comment creation timestamp
string format: date-time
Example
[ { "id": "cmt_abc123def456", "content": "This task needs to be completed by end of week", "author": { "id": "usr_abc123def456", "name": "John Doe", "email": "john.doe@company.com", "image": "https://example.com/avatar.jpg", "deactivated": false }, "attachments": [ { "id": "att_abc123def456", "name": "document.pdf", "type": "application/pdf", "createdAt": "2024-01-15T10:30:00Z" } ], "createdAt": "2024-01-15T10:30:00Z" }]