{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/security-scorecard/main/json-schema/security-scorecard-get-action-plan-by-id-schema-response-schema.json",
  "title": "getActionPlanByIdSchemaResponse",
  "x-generated": "2026-10-14",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/security-scorecard-securityscorecard-api-openapi.yml#/components/schemas/getActionPlanByIdSchemaResponse",
  "type": "object",
  "properties": {
    "id": {
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
      "description": "action plan identifier",
      "type": "string"
    },
    "remediation_version": {
      "type": "string"
    },
    "roles": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "name": {
      "type": "string",
      "description": "action plan name"
    },
    "description": {
      "type": "string",
      "description": "description"
    },
    "due_date": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}:\\d{2}\\.{0,1}[0-9]*Z$"
        },
        {
          "type": "string",
          "maxLength": 0
        }
      ],
      "description": "due date"
    },
    "scorecard": {
      "description": "scorecard identifier",
      "type": "string",
      "anyOf": [
        {
          "type": "string",
          "description": "primary domain of the company"
        },
        {
          "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
          "description": "Identifier",
          "type": "string"
        }
      ]
    },
    "guests": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "list of emails of guest users"
    },
    "editors": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "list of emails of editors"
    },
    "created_by": {
      "type": "string",
      "description": "user who created the object"
    },
    "created_at": {
      "format": "date-time",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}:\\d{2}\\.{0,1}[0-9]*Z$",
      "description": "created date"
    },
    "updated_by": {
      "type": "string",
      "description": "user who updated the object"
    },
    "updated_at": {
      "format": "date-time",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}:\\d{2}\\.{0,1}[0-9]*Z$",
      "description": "created date"
    },
    "type": {
      "type": "string",
      "description": "action plan type",
      "enum": [
        "overall_score_improvement",
        "remediation",
        "issue_resolution",
        "factor_score_improvement"
      ]
    },
    "status": {
      "type": "string",
      "description": "action plan status",
      "enum": [
        "active",
        "completed"
      ]
    },
    "organization_domain": {
      "type": "string",
      "description": "primary domain of the company"
    },
    "archived_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}:\\d{2}\\.{0,1}[0-9]*Z$"
        },
        {
          "type": "string",
          "maxLength": 0
        }
      ],
      "description": "archived date"
    },
    "synchronized_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}:\\d{2}\\.{0,1}[0-9]*Z$"
        },
        {
          "type": "string",
          "maxLength": 0
        }
      ],
      "description": "synchronized date"
    },
    "is_custom_scorecard": {
      "type": "boolean",
      "description": "true if this action plan is based on a custom scorecard, false otherwise"
    },
    "company_name": {
      "type": "string"
    },
    "company_score": {
      "type": "integer",
      "description": "security score from 0 to 100"
    },
    "factor_scores": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "factor": {
            "type": "string",
            "description": "factor name/id"
          },
          "score": {
            "type": "integer",
            "description": "security score from 0 to 100"
          }
        },
        "additionalProperties": false
      }
    },
    "target": {
      "type": "object",
      "properties": {
        "factor_score_targets": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "factor": {
                "type": "string",
                "description": "factor name/id"
              },
              "score": {
                "type": "integer",
                "description": "security score from 0 to 100"
              }
            },
            "additionalProperties": false
          }
        },
        "overall_score": {
          "type": "number",
          "description": "overall score of the action plan if applies"
        }
      }
    },
    "criteria": {
      "type": "object",
      "properties": {
        "factors": {
          "type": "array",
          "items": {
            "type": "string",
            "description": "factor name/id"
          },
          "description": "factors associated to the action plan if applies"
        },
        "issues": {
          "type": "array",
          "items": {
            "description": "issue type (permanent key)",
            "type": "string"
          },
          "description": "issues associated to the action plan if applies"
        }
      }
    },
    "is_managed": {
      "type": "boolean"
    },
    "is_published": {
      "type": "boolean"
    },
    "managed_scorecard": {
      "type": "string"
    },
    "total_issues": {
      "type": "number",
      "description": "number of issues associated to the action plan"
    },
    "closed_issues": {
      "type": "number",
      "description": "number of closed issues associated to the action plan"
    },
    "progress": {
      "type": "number",
      "description": "percentage of progress"
    },
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "description": "issue type (permanent key)",
            "type": "string"
          },
          "impact": {
            "type": "number",
            "description": "impact in the score"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "closed"
            ]
          }
        }
      }
    }
  }
}