Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"
]
}
}
Comment on lines +275 to +281
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially had this on one line, since it felt more readable but it looks like we're always breaking it up into multiple lines. Happy with either way.

]
}
}
},
}
}
```

Expand Down
Loading