diff --git a/content/terraform-docs-common/docs/cloud-docs/api-docs/change-requests.mdx b/content/terraform-docs-common/docs/cloud-docs/api-docs/change-requests.mdx index c69d6ae738..6d780fff4d 100644 --- a/content/terraform-docs-common/docs/cloud-docs/api-docs/change-requests.mdx +++ b/content/terraform-docs-common/docs/cloud-docs/api-docs/change-requests.mdx @@ -250,12 +250,12 @@ You must specify the following fields in your payload when creating a new change | Key path | Type | Required | Description | |------------|------|---------|-------------| -| `data.action_type` | string | Required | The action to take. To create a change request, specify `"change_request"`. | -| `data.action_inputs` | object | Required | Arguments for the bulk action. | -| `data.action_inputs.subject` | string | Required | The change request's subject line. -| `data.action_inputs.message` | string | Required | The change request's message, which HCP Terraform treats as markdown. | -| `data.target_ids` | array | Optional | The IDs of the workspace you want to associate with this change request. You do not need to specify this field if you provide `data.query`. | -| `data.query` | object | Optional | An [explorer query](/terraform/cloud-docs/api-docs/explorer#execute-a-query) with workspace data. You do not need to specify this field if you provide `data.target_ids`. | +| `data.attributes.action_type` | string | Required | The action to take. To create a change request, specify `"change_request"`. | +| `data.attributes.action_inputs` | object | Required | Arguments for the bulk action. | +| `data.attributes.action_inputs.subject` | string | Required | The change request's subject line. +| `data.attributes.action_inputs.message` | string | Required | The change request's message, which HCP Terraform treats as markdown. | +| `data.attributes.target_ids` | array | Optional | The IDs of the workspace you want to associate with this change request. You do not need to specify this field if you provide `data.attribute.query`. | +| `data.attributes.query` | object | Optional | An [explorer query](/terraform/cloud-docs/api-docs/explorer#execute-a-query) with workspace data. You do not need to specify this field if you provide `data.attribute.target_ids`. | ### Sample Payload @@ -269,15 +269,20 @@ You must specify the following fields in your payload when creating a new change "subject": "[Action Required] Github Actions Pinning (SEC-090)", "message": "Some long description here", }, - "query": { - "type": "workspaces", - "filter": [ - "field": "workspace_name", - "operator": "contains", - "value": ["dev"] - ] + "query": { + "type": "workspaces", + "filter": [ + { + "workspace_name": { + "contains": [ + "dev" + ] + } + } + ] + } } - }, + } } ```