Skip to content
Suomi

Edit a comment

PATCH
/v1/projects/{projectId}/findings/{guid}/comments/{commentGuid}
Code sample: Shell / cURL
curl --request PATCH \
--url https://api.whatsbuilt.fi/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/findings/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/comments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "comment": "example", "viewpoint_guid": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

Changes the text or the viewpoint it points at. Editing the text of a verdict comment makes it a plain comment.

projectId
required
string format: uuid
guid
required
string format: uuid

The finding’s guid

commentGuid
required
string format: uuid
Media typeapplication/json
object
comment
string
>= 1 characters <= 20000 characters
viewpoint_guid
string | null format: uuid

Example generated

{
"comment": "example",
"viewpoint_guid": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

The comment

Media typeapplication/json

A live comment.

object
guid
required

The comment.

string format: uuid
project_id
required

The project.

string format: uuid
topic_guid
required

Its topic.

string format: uuid
comment
required

Its text.

string | null
viewpoint_guid
required

The viewpoint it is on.

string | null format: uuid
author
required

Its author’s e-mail.

string
author_name
required

The author’s name, read when answering.

string | null
date
required

When it was written.

string
modified_author
required

Who changed it last.

string | null
modified_date
required

When it was changed last.

string
kind
required

verdict for the comment an inspection verdict writes, check_results for the summary a grouped step writes, checks_recorded for the checks an agent records; null otherwise. New kinds may come.

string | null
created_via
required

How it was written.

string | null
via_client_id
required

The client that wrote it.

string | null
entered_later
required

True when recorded after the fact.

boolean
recorded_at
required

When it was recorded.

string | null
changed_at
required

The row’s change time.

string
deleted
required
boolean

Example

{
"deleted": false
}

Invalid body, parameters or Idempotency-Key

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

Missing, malformed, expired or revoked token

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

INSUFFICIENT_SCOPE; INSUFFICIENT_PROJECT_ROLE when the project role the scopes give does not cover the write, or the project is not the integration’s; PUBLIC_API_DISABLED when the project’s owning organisation has turned the API off

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

No such project, finding, comment, viewpoint, draft or element

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

IDEMPOTENCY_KEY_REUSED: the key was used with another body

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}

RATE_LIMITED; wait for Retry-After seconds

Media typeapplication/json

The error body of every /v1 answer of 400 or more.

object
error
required

A sentence for people; it may change

string
code
required

Part of the contract

string
details

What the code names, where it names something

request_id
required

The X-Request-Id of the call

string

Example generated

{
"error": "example",
"code": "example",
"details": "example",
"request_id": "example"
}