---
updatedAt: 2026-08-29T02:45:18.000Z
agentTools:
  siteIndex: https://developer.jamf.com/llms.txt
  projectIndex: https://developer.jamf.com/platform-api/llms.txt
---

# Returns list of rules for specific baseline

Returns list of rules for specific baseline and their sources

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Jamf Compliance Benchmarks API - Beta",
    "version": "latest",
    "description": "Jamf Compliance Benchmarks API allows you to manage, enforce, and validate compliance on Apple devices",
    "termsOfService": "https://www.jamf.com/developer-resources/api-license-agreement/",
    "contact": {
      "name": "Jamf Developer",
      "url": "https://developer.jamf.com"
    }
  },
  "servers": [
    {
      "url": "https://{region}.api.jamfcloud.com/compliance-benchmarks",
      "description": "Jamf Beta API Gateway - prod",
      "variables": {
        "region": {
          "default": "us",
          "enum": [
            "us",
            "eu",
            "apac"
          ],
          "description": "Geographic deployment region"
        }
      }
    }
  ],
  "security": [
    {
      "oauth2": []
    }
  ],
  "paths": {
    "/v1/rules": {
      "get": {
        "tags": [
          "rules"
        ],
        "summary": "Returns list of rules for specific baseline",
        "description": "Returns list of rules for specific baseline and their sources",
        "operationId": "getRules",
        "parameters": [
          {
            "$ref": "#/components/parameters/X-Environment-Id"
          },
          {
            "name": "baseline-id",
            "in": "query",
            "description": "Given baseline ID",
            "required": true,
            "schema": {
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourcedRules"
                }
              }
            }
          },
          "400": {
            "description": "Missing or empty baseline ID"
          }
        },
        "x-required-privileges": [
          "compliance-benchmarks:read"
        ],
        "security": [
          {
            "oauth2": [
              "compliance-benchmarks:read"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "OdvRecommendation": {
        "type": "object",
        "properties": {
          "value": {
            "minLength": 1,
            "type": "string",
            "example": "365"
          },
          "hint": {
            "minLength": 1,
            "type": "string",
            "example": "Number of days."
          }
        },
        "description": "Recommended value and hint for an organization-defined value (ODV) field",
        "nullable": true
      },
      "OrganizationDefinedValue": {
        "required": [
          "hint",
          "placeholder",
          "type",
          "validation",
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "minLength": 1,
            "type": "string",
            "example": "365"
          },
          "hint": {
            "type": "string",
            "example": "Number of days."
          },
          "placeholder": {
            "type": "string",
            "example": "365"
          },
          "type": {
            "type": "string",
            "example": "INTEGER",
            "enum": [
              "INTEGER",
              "STRING",
              "ENUM",
              "REGEX",
              "BOOLEAN"
            ]
          },
          "validation": {
            "$ref": "#/components/schemas/ValidationConstraints"
          }
        },
        "description": "An organization-defined value (ODV) that customizes a parameterized compliance rule",
        "nullable": true
      },
      "OsInfo": {
        "required": [
          "managementType",
          "osType",
          "osVersion"
        ],
        "type": "object",
        "properties": {
          "osType": {
            "type": "string",
            "example": "MAC_OS",
            "enum": [
              "MAC_OS",
              "IOS",
              "VISION_OS"
            ]
          },
          "osVersion": {
            "type": "integer",
            "format": "int32",
            "example": 26
          },
          "managementType": {
            "type": "string",
            "example": "MANAGED",
            "enum": [
              "MANAGED",
              "BYOD"
            ]
          }
        },
        "description": "Operating system type, version, and management type, uniquely identifying a supported OS target"
      },
      "OsSpecificRuleInfo": {
        "required": [
          "description",
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "Configure Install.log Retention to $ODV"
          },
          "description": {
            "type": "string",
            "example": "The install.log _MUST_ be configured to require records be kept for a organizational defined value before deletion, unless the system uses a central audit record storage facility. \n"
          },
          "odv": {
            "$ref": "#/components/schemas/OdvRecommendation"
          }
        },
        "description": "OS-specific overrides for a compliance rule's title, description, and ODV recommendation",
        "example": {
          "MAC_OS_26": {
            "title": "Configure Install.log Retention to $ODV",
            "description": "The install.log _MUST_ be configured to require records be kept for a organizational defined value before deletion, unless the system uses a central audit record storage facility."
          }
        }
      },
      "OsVersion": {
        "minLength": 1,
        "required": [
          "osType",
          "osVersion"
        ],
        "type": "object",
        "properties": {
          "osType": {
            "type": "string",
            "description": "Operating system type",
            "example": "MAC_OS",
            "enum": [
              "MAC_OS",
              "IOS",
              "VISION_OS"
            ]
          },
          "osVersion": {
            "type": "integer",
            "description": "Operating system version number",
            "format": "int32",
            "example": 26
          }
        },
        "description": "The selected OS versions for this benchmark, default is all available baseline OS versions"
      },
      "RuleInfo": {
        "required": [
          "description",
          "enabled",
          "id",
          "osSpecificDefaults",
          "sectionName",
          "supportedOs",
          "title"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "os_install_log_retention_configure"
          },
          "sectionName": {
            "type": "string",
            "example": "OS"
          },
          "enabled": {
            "type": "boolean",
            "default": true
          },
          "title": {
            "type": "string",
            "example": "Configure Install.log Retention to $ODV"
          },
          "references": {
            "type": "array",
            "nullable": true,
            "example": [
              "3.3"
            ],
            "items": {
              "type": "string",
              "nullable": true,
              "example": "[\"3.3\"]"
            }
          },
          "description": {
            "type": "string",
            "example": "The install.log _MUST_ be configured to require records be kept for a organizational defined value before deletion, unless the system uses a central audit record storage facility.\\n"
          },
          "odv": {
            "$ref": "#/components/schemas/OrganizationDefinedValue"
          },
          "supportedOs": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OsInfo"
            }
          },
          "osSpecificDefaults": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/OsSpecificRuleInfo"
            },
            "example": {
              "MAC_OS_26": {
                "title": "Configure Install.log Retention to $ODV",
                "description": "The install.log _MUST_ be configured to require records be kept for a organizational defined value before deletion, unless the system uses a central audit record storage facility."
              }
            }
          },
          "ruleRelation": {
            "$ref": "#/components/schemas/RuleRelation"
          },
          "reportable": {
            "type": "boolean",
            "example": true
          },
          "smartCard": {
            "type": "boolean",
            "example": false
          }
        },
        "description": "A compliance rule definition including its title, description, enabled state, supported OS targets, and optional ODV configuration"
      },
      "RuleRelation": {
        "required": [
          "defaultDisabled"
        ],
        "type": "object",
        "properties": {
          "dependsOn": {
            "type": "array",
            "example": [
              "pwpolicy_account_lockout_enforce"
            ],
            "items": {
              "type": "string",
              "example": "[\"pwpolicy_account_lockout_enforce\"]"
            }
          },
          "conflictsWith": {
            "type": "array",
            "example": [
              "system_settings_location_services_disable"
            ],
            "items": {
              "type": "string",
              "example": "[\"system_settings_location_services_disable\"]"
            }
          },
          "defaultDisabled": {
            "type": "boolean",
            "example": false
          }
        },
        "description": "Dependency and conflict relationships between compliance rules",
        "nullable": true
      },
      "Source": {
        "required": [
          "branch",
          "revision"
        ],
        "type": "object",
        "properties": {
          "branch": {
            "minLength": 1,
            "type": "string",
            "example": "tahoe"
          },
          "revision": {
            "minLength": 1,
            "type": "string",
            "example": "5aa6d8c43c39e9f2afa993272662d6bf09e2d6b7"
          }
        },
        "description": "A Git source reference identifying a branch and revision of the compliance rules repository",
        "deprecated": true
      },
      "SourcedRules": {
        "required": [
          "availableOsVersions",
          "rules",
          "sources"
        ],
        "type": "object",
        "properties": {
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Source"
            }
          },
          "availableOsVersions": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OsVersion"
            }
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RuleInfo"
            }
          }
        },
        "description": "A set of compliance rules sourced from one or more Git branches, with the available OS versions"
      },
      "ValidationConstraints": {
        "type": "object",
        "properties": {
          "min": {
            "minimum": 0,
            "type": "integer",
            "format": "int32",
            "example": 1
          },
          "max": {
            "minimum": 0,
            "type": "integer",
            "format": "int32",
            "example": 100
          },
          "enumValues": {
            "type": "array",
            "example": [
              "authenticate-session-owner",
              "authenticate-session-owner-or-admin",
              "use-login-window-ui"
            ],
            "items": {
              "type": "string",
              "example": "[\"authenticate-session-owner\",\"authenticate-session-owner-or-admin\",\"use-login-window-ui\"]"
            }
          },
          "regex": {
            "type": "string",
            "example": "^\\d+[shdyBKMG](\\s(AND|OR)\\s\\d+[shdyBKMG])?$"
          }
        },
        "description": "Validation constraints for an organization-defined value (ODV), specifying allowed range, enum values, or regex pattern"
      }
    },
    "parameters": {
      "X-Environment-Id": {
        "name": "X-Environment-Id",
        "in": "header",
        "required": true,
        "description": "The environment UUID identifier.",
        "schema": {
          "type": "string",
          "format": "uuid",
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "example": "e77c1408-10c8-4007-b177-abc9157fbcaa"
        }
      }
    },
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "Obtain an access token by calling the API Gateway's token endpoint using the OAuth2 client-credentials flow.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://{region}.api.jamfcloud.com/auth/token",
            "scopes": {
              "compliance-benchmarks:create": "",
              "compliance-benchmarks:delete": "",
              "compliance-benchmarks:read": ""
            }
          }
        }
      }
    }
  },
  "x-scope-types": [
    "environment"
  ]
}
```