{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/harness/main/json-schema/harness-create-playbook-response-schema.json",
  "title": "CreatePlaybookResponse",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/harness-ansible-api-openapi.yml#/components/schemas/CreatePlaybookResponse",
  "type": "object",
  "properties": {
    "account": {
      "type": "string",
      "description": "Account is the internal customer account ID.",
      "minLength": 1,
      "maxLength": 128
    },
    "ansible_galaxy": {
      "type": "boolean",
      "description": "Install Ansible Galaxy dependencies",
      "default": false
    },
    "ansible_galaxy_requirements_file": {
      "type": "string",
      "description": "Path to Ansible Galaxy requirements file"
    },
    "created": {
      "type": "integer",
      "description": "Timestamp when the resource was created.",
      "format": "int64"
    },
    "description": {
      "type": "string",
      "description": "Description documents the playbook purpose and usage",
      "maxLength": 1024
    },
    "env_vars": {
      "type": "string",
      "description": "The environment vars in the playbook"
    },
    "identifier": {
      "type": "string",
      "description": "The unique identifier for this playbook"
    },
    "name": {
      "type": "string",
      "description": "Name is the human readable name",
      "minLength": 1,
      "maxLength": 1024
    },
    "org": {
      "type": "string",
      "description": "Org is the organisation identifier.",
      "minLength": 1,
      "maxLength": 128
    },
    "policy_evaluation": {
      "$ref": "#/$defs/AnsibleEvaluation"
    },
    "project": {
      "type": "string",
      "description": "Project is the project identifier.",
      "minLength": 1,
      "maxLength": 128
    },
    "repository": {
      "type": "string",
      "description": "Repository is the name of the repository to use."
    },
    "repository_branch": {
      "type": "string",
      "description": "Repository Branch in which the playbook should be accessed."
    },
    "repository_commit": {
      "type": "string",
      "description": "Repository Commit/Tag in which the playbook should be accessed."
    },
    "repository_connector": {
      "type": "string",
      "description": "Repository Connector is the reference to the connector to use for this playbook."
    },
    "repository_path": {
      "type": "string",
      "description": "Repository Path is the path in which the playbook resides.",
      "default": ""
    },
    "tags": {
      "type": "string",
      "description": "Tags associated with the playbook"
    },
    "updated": {
      "type": "integer",
      "description": "Timestamp when the resource was last updated.",
      "format": "int64"
    },
    "vars": {
      "type": "string",
      "description": "The vars in the playbook"
    }
  },
  "required": [
    "created",
    "updated",
    "account",
    "org",
    "project",
    "identifier",
    "name",
    "repository_path"
  ],
  "$defs": {
    "AnsibleEvaluatedPolicy": {
      "type": "object",
      "properties": {
        "deny_messages": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The values of any `deny` rego rules as returned by the rego engine"
        },
        "output": {
          "description": "The output returned by the rego engine when this policy was evaluated"
        },
        "policy": {
          "$ref": "#/$defs/IaCMPolicy"
        },
        "rego_error": {
          "type": "string",
          "description": "Any errors returned by the rego engine when this policy was evaluated"
        },
        "status": {
          "type": "string",
          "description": "The overall status for this individual policy indicating whether it passed",
          "enum": [
            "error",
            "warning",
            "pass"
          ]
        }
      },
      "required": [
        "status",
        "policy",
        "output",
        "deny_messages",
        "rego_error"
      ]
    },
    "AnsibleEvaluation": {
      "type": "object",
      "properties": {
        "account_id": {
          "type": "string",
          "description": "The Harness account in which the evaluation was performed"
        },
        "action": {
          "type": "string",
          "description": "The action that triggered evaluation"
        },
        "created": {
          "type": "integer",
          "description": "The time at which the evaluation was performed in Unix time milliseconds",
          "format": "int64"
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AnsibleEvaluationDetail"
          },
          "description": "The detailed results of te evaluation"
        },
        "entity": {
          "type": "string",
          "description": "An arbitrary user-supplied string that globally identifies the entity under evaluation"
        },
        "entity_metadata": {
          "type": "string",
          "description": "Additional arbitrary user-supplied metadata about the entity under evaluation"
        },
        "id": {
          "type": "integer",
          "description": "The ID of this evaluation",
          "format": "int64"
        },
        "input": {
          "description": "The input provided at evaluation time"
        },
        "org_id": {
          "type": "string",
          "description": "The Harness organisation in which the evaluation was performed"
        },
        "project_id": {
          "type": "string",
          "description": "The Harness project in which the evaluation was performed"
        },
        "status": {
          "type": "string",
          "description": "The overall status of the evaluation indicating whether it passed",
          "enum": [
            "error",
            "warning",
            "pass"
          ]
        },
        "type": {
          "type": "string",
          "description": "The types of the entity under evaluation"
        }
      },
      "description": "The result of a single evaluation",
      "required": [
        "id",
        "status",
        "entity",
        "entity_metadata",
        "type",
        "action",
        "account_id",
        "org_id",
        "project_id",
        "created",
        "input",
        "details"
      ]
    },
    "AnsibleEvaluationDetail": {
      "type": "object",
      "properties": {
        "account_id": {
          "type": "string",
          "description": "Harness account ID associated with this policy set",
          "default": ""
        },
        "action": {
          "type": "string",
          "description": "Action that triggers the policy set",
          "minLength": 1
        },
        "created": {
          "type": "integer",
          "description": "Time the policy set was created",
          "format": "int64"
        },
        "description": {
          "type": "string",
          "description": "Description of the policy set"
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AnsibleEvaluatedPolicy"
          }
        },
        "enabled": {
          "type": "boolean",
          "description": "Only enabled policy sets are evaluated when evaluating by type/action"
        },
        "identifier": {
          "type": "string",
          "description": "Identifier of the policy set",
          "minLength": 1
        },
        "name": {
          "type": "string",
          "description": "Name of the policy set",
          "minLength": 1
        },
        "org_id": {
          "type": "string",
          "description": "Harness organization ID associated with this policy set",
          "default": ""
        },
        "project_id": {
          "type": "string",
          "description": "Harness project ID associated with this policy set",
          "default": ""
        },
        "status": {
          "type": "string",
          "description": "The overall status for this policy set indicating whether it passed",
          "enum": [
            "error",
            "warning",
            "pass"
          ]
        },
        "type": {
          "type": "string",
          "description": "Type of input suitable for the policy set",
          "minLength": 1
        },
        "updated": {
          "type": "integer",
          "description": "Time the policy set was last updated",
          "format": "int64"
        }
      },
      "required": [
        "status",
        "details",
        "identifier",
        "name",
        "action",
        "type",
        "enabled",
        "created",
        "updated",
        "account_id",
        "org_id",
        "project_id",
        "entity_selector"
      ]
    },
    "IaCMPolicy": {
      "type": "object",
      "properties": {
        "account_id": {
          "type": "string",
          "description": "Harness account ID associated with this policy",
          "default": ""
        },
        "created": {
          "type": "integer",
          "description": "Time the policy was created",
          "format": "int64"
        },
        "identifier": {
          "type": "string",
          "description": "identifier of the policy",
          "minLength": 1
        },
        "name": {
          "type": "string",
          "description": "Name of the policy",
          "minLength": 1
        },
        "org_id": {
          "type": "string",
          "description": "Harness organization ID associated with this policy",
          "default": ""
        },
        "project_id": {
          "type": "string",
          "description": "Harness project ID associated with this policy",
          "default": ""
        },
        "rego": {
          "type": "string",
          "description": "Rego that defines the policy",
          "minLength": 1
        },
        "updated": {
          "type": "integer",
          "description": "Time the policy was last updated",
          "format": "int64"
        }
      },
      "required": [
        "identifier",
        "name",
        "rego",
        "created",
        "updated",
        "account_id",
        "org_id",
        "project_id"
      ]
    }
  }
}