# Method: projects.locations.orders.comments.recordAction

- [HTTP request](https://docs.cloud.google.com/distributed-cloud/connected/1.9.0/docs/reference/hardware/rest/v1alpha/projects.locations.orders.comments/recordAction#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/distributed-cloud/connected/1.9.0/docs/reference/hardware/rest/v1alpha/projects.locations.orders.comments/recordAction#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/distributed-cloud/connected/1.9.0/docs/reference/hardware/rest/v1alpha/projects.locations.orders.comments/recordAction#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/distributed-cloud/connected/1.9.0/docs/reference/hardware/rest/v1alpha/projects.locations.orders.comments/recordAction#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/distributed-cloud/connected/1.9.0/docs/reference/hardware/rest/v1alpha/projects.locations.orders.comments/recordAction#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/distributed-cloud/connected/1.9.0/docs/reference/hardware/rest/v1alpha/projects.locations.orders.comments/recordAction#body.aspect)
- [ActionType](https://docs.cloud.google.com/distributed-cloud/connected/1.9.0/docs/reference/hardware/rest/v1alpha/projects.locations.orders.comments/recordAction#ActionType)
- [Try it!](https://docs.cloud.google.com/distributed-cloud/connected/1.9.0/docs/reference/hardware/rest/v1alpha/projects.locations.orders.comments/recordAction#try-it)

Record Action on a Comment. If the Action specified in the request is READ, the viewed time in the comment is set to the time the request was received. If the comment is already marked as read, subsequent calls will be ignored. If the Action is UNREAD, the viewed time is cleared from the comment.

### HTTP request

`POST https://gdchardwaremanagement.googleapis.com/v1alpha/{name=projects/*/locations/*/orders/*/comments/*}:recordAction`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The name of the comment. Format: `projects/{project}/locations/{location}/orders/{order}/comments/{comment}` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "actionType": enum (`https://docs.cloud.google.com/distributed-cloud/edge/1.9.0/docs/reference/hardware/rest/v1alpha/projects.locations.orders.comments/recordAction#ActionType`) } ``` |

| Fields ||
|---|---|
| `actionType` | ``enum (`https://docs.cloud.google.com/distributed-cloud/edge/1.9.0/docs/reference/hardware/rest/v1alpha/projects.locations.orders.comments/recordAction#ActionType`)`` Required. The action type of the recorded action. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/distributed-cloud/edge/1.9.0/docs/reference/hardware/rest/v1alpha/projects.locations.orders.comments#Comment`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

## ActionType

Valid action types of Comment.

| Enums ||
|---|---|
| `ACTION_TYPE_UNSPECIFIED` | Action is unspecified. |
| `READ` | Mark comment as read. |
| `UNREAD` | Mark comment as unread. |