Skip to content

API v2 create an object's comment #908

@c8y3

Description

@c8y3

Implement endpoint POST /api/v2/{object}/{object_identifier}/comments to create a comment, where object is any of alerts, assets, events, tasks, notes, evidences or iocs:

  • return 201 in case of success
  • should allow to set a field ('comment_text')
  • check returned object is uniform with other endpoints
  • if a required field is missing, return 400
  • if a field value has the wrong type, return 400
  • return 403 if the user is denied permission to create comment (no access to case or alert)
  • if the underlying object is not found, return 404
  • create method in the business layer
  • deprecate POST /{object}/{object_identifier}/comments/add
  • openapi: document endpoint
  • openapi: deprecate POST /{object}/{object_identifier}/comments/add

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions