OOTB policy filter options API reference
Out-of-the-box (OOTB) policies are pre-built policy definitions sourced from curated compliance framework libraries. This endpoint returns the set of distinct values currently present in the catalog that can be used as filter parameters when calling the List OOTB Policies endpoint.
Note: HCP Terraform Free edition includes one policy set of up to five policies. In HCP Terraform Standard and Premium editions, you can connect a policy set to a version control repository or create policy set versions with the API. Refer to HCP Terraform pricing for details.
Get OOTB policy filter options
GET /ootb-policies/filter-options
Returns the set of values available for filtering the OOTB policy catalog: providers, governed resource types, libraries (compliance frameworks), and services. Each library slug is a valid value for the collection endpoint's filter[library] parameter. Optionally scoped to a single policy kind via filter[kind].
| Status | Response | Reason |
|---|---|---|
| 200 | JSON API document (type: "ootb-policy-filter-options") | Request was successful |
| 400 | JSON API error object | Invalid query parameters |
Query Parameters
These are standard URL query parameters. Remember to percent-encode [ as %5B and ] as %5D if your tooling doesn't automatically encode URLs.
| Parameter | Description |
|---|---|
organization_name | Required. The name of the organization. |
filter[kind] | Optional. Restrict the returned libraries to the specified policy kind. This does not filter the providers, services, or governed resource types. |
Sample Request
curl \
--header "Authorization: Bearer $TOKEN" \
"https://app.terraform.io/api/v2/ootb-policies/filter-options?organization_name=my-organization"
Sample Request filtered by kind
curl \
--header "Authorization: Bearer $TOKEN" \
"https://app.terraform.io/api/v2/ootb-policies/filter-options?organization_name=my-organization&filter%5Bkind%5D=sentinel"
Sample Response
{
"data": {
"type": "ootb-policy-filter-options",
"attributes": {
"providers": [
"aws",
"azure",
"gcp"
],
"governed-resources": [
"aws_s3_bucket",
"aws_iam_role",
"azurerm_storage_account"
],
"libraries": [
{
"name": "NIST 800-53 for AWS",
"slug": "nist-800-53-aws"
},
{
"name": "CIS AWS Foundations Benchmark",
"slug": "cis-aws"
}
],
"services": [
"s3",
"iam",
"compute"
]
}
}
}
Attributes
The response contains a single ootb-policy-filter-options resource with the following attributes:
| Attribute | Type | Description |
|---|---|---|
providers | array[string] | Distinct cloud provider names available in the catalog: aws, azure, and gcp. Use these values with the filter[provider] parameter on the list endpoint. |
governed-resources | array[string] | Distinct Terraform resource types governed by catalog policies (e.g. aws_s3_bucket). Use these values with the filter[governed-resources] parameter on the list endpoint. |
libraries | array[object] | Policy libraries (compliance frameworks) that currently serve at least one catalog policy, returned as name/slug pairs. Each slug is a valid value for filter[library]. |
libraries[].name | string | Human-readable name of the compliance framework library. |
libraries[].slug | string | URL-friendly identifier for the library. Use as the value of filter[library] on the list endpoint. |
services | array[string] | Distinct cloud service names available in the catalog (e.g. s3, iam, compute). Use these values with the filter[service] parameter on the list endpoint. |