{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Resource identifier returned by the operation."
    },
    "workspace_id": {
      "type": "string",
      "description": "Workspace that owns this record."
    },
    "project_id": {
      "type": "string",
      "description": "Project that owns this record."
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "paused"
      ],
      "description": "Resource lifecycle status."
    },
    "cadence_seconds": {
      "type": "number",
      "description": "cadence seconds recorded for this result."
    },
    "state": {
      "type": "string",
      "description": "Saved lifecycle or evidence state, as enumerated for this record."
    },
    "observation_state": {
      "type": "object",
      "properties": {
        "state": {
          "description": "Saved lifecycle or evidence state, as enumerated for this record.",
          "type": "string"
        },
        "uncertain": {
          "description": "uncertain recorded for this result.",
          "type": "boolean"
        },
        "checked_at": {
          "description": "UTC timestamp of the saved check.",
          "type": "string"
        },
        "lastChangedAt": {
          "description": "last Changed At recorded for this result.",
          "anyOf": [
            {
              "type": "string",
              "description": "last Changed At recorded for this result."
            },
            {
              "type": "null"
            }
          ]
        },
        "firstAbsentAt": {
          "description": "first Absent At recorded for this result.",
          "anyOf": [
            {
              "type": "string",
              "description": "first Absent At recorded for this result."
            },
            {
              "type": "null"
            }
          ]
        },
        "consecutiveAbsent": {
          "description": "consecutive Absent recorded for this result.",
          "type": "number"
        },
        "nextCheckAt": {
          "description": "next Check At recorded for this result.",
          "anyOf": [
            {
              "type": "string",
              "description": "next Check At recorded for this result."
            },
            {
              "type": "null"
            }
          ]
        },
        "reason": {
          "description": "Recorded explanation; null when no explanation applies.",
          "anyOf": [
            {
              "type": "string",
              "description": "Recorded explanation; null when no explanation applies."
            },
            {
              "type": "null"
            }
          ]
        },
        "latestAttempt": {
          "description": "latest Attempt recorded for this result.",
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "state": {
                  "description": "Saved lifecycle or evidence state, as enumerated for this record.",
                  "type": "string"
                },
                "reason": {
                  "description": "Recorded explanation; null when no explanation applies.",
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Recorded explanation; null when no explanation applies."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "checkedAt": {
                  "description": "checked At recorded for this result.",
                  "type": "string"
                },
                "httpStatus": {
                  "description": "http Status recorded for this result.",
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "http Status recorded for this result."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "occurrenceCount": {
                  "description": "occurrence Count recorded for this result.",
                  "type": "number"
                },
                "occurrences": {
                  "description": "occurrences recorded for this result.",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "href": {
                        "description": "href recorded for this result.",
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "href recorded for this result."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "targetUrl": {
                        "description": "target Url recorded for this result.",
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "target Url recorded for this result."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "anchor": {
                        "description": "anchor recorded for this result.",
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "anchor recorded for this result."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "rel": {
                        "description": "rel recorded for this result.",
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "rel recorded for this result."
                        }
                      },
                      "context": {
                        "description": "context recorded for this result.",
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "context recorded for this result."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "locator": {
                        "description": "locator recorded for this result.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "line": {
                                "description": "line recorded for this result.",
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "description": "line recorded for this result."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "column": {
                                "description": "column recorded for this result.",
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "description": "column recorded for this result."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "offset": {
                                "description": "offset recorded for this result.",
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "description": "offset recorded for this result."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": {},
                            "description": "locator recorded for this result."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "additionalProperties": {},
                    "description": "occurrences recorded for this result."
                  }
                },
                "checkerVersion": {
                  "description": "checker Version recorded for this result.",
                  "type": "string"
                }
              },
              "additionalProperties": {},
              "description": "latest Attempt recorded for this result."
            },
            {
              "type": "null"
            }
          ]
        },
        "lastSuccessfulObservation": {
          "description": "last Successful Observation recorded for this result.",
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "state": {
                  "description": "Saved lifecycle or evidence state, as enumerated for this record.",
                  "type": "string"
                },
                "reason": {
                  "description": "Recorded explanation; null when no explanation applies.",
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Recorded explanation; null when no explanation applies."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "checkedAt": {
                  "description": "checked At recorded for this result.",
                  "type": "string"
                },
                "httpStatus": {
                  "description": "http Status recorded for this result.",
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "http Status recorded for this result."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "occurrenceCount": {
                  "description": "occurrence Count recorded for this result.",
                  "type": "number"
                },
                "occurrences": {
                  "description": "occurrences recorded for this result.",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "href": {
                        "description": "href recorded for this result.",
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "href recorded for this result."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "targetUrl": {
                        "description": "target Url recorded for this result.",
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "target Url recorded for this result."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "anchor": {
                        "description": "anchor recorded for this result.",
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "anchor recorded for this result."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "rel": {
                        "description": "rel recorded for this result.",
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "rel recorded for this result."
                        }
                      },
                      "context": {
                        "description": "context recorded for this result.",
                        "anyOf": [
                          {
                            "type": "string",
                            "description": "context recorded for this result."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "locator": {
                        "description": "locator recorded for this result.",
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "line": {
                                "description": "line recorded for this result.",
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "description": "line recorded for this result."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "column": {
                                "description": "column recorded for this result.",
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "description": "column recorded for this result."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "offset": {
                                "description": "offset recorded for this result.",
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "description": "offset recorded for this result."
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "additionalProperties": {},
                            "description": "locator recorded for this result."
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "additionalProperties": {},
                    "description": "occurrences recorded for this result."
                  }
                },
                "checkerVersion": {
                  "description": "checker Version recorded for this result.",
                  "type": "string"
                }
              },
              "additionalProperties": {},
              "description": "last Successful Observation recorded for this result."
            },
            {
              "type": "null"
            }
          ]
        },
        "lastSuccessfulObservationSameAsLatestAttempt": {
          "description": "last Successful Observation Same As Latest Attempt recorded for this result.",
          "type": "boolean"
        },
        "confirmedState": {
          "description": "confirmed State recorded for this result.",
          "anyOf": [
            {
              "type": "string",
              "description": "confirmed State recorded for this result."
            },
            {
              "type": "null"
            }
          ]
        },
        "lastSuccessfulAt": {
          "description": "last Successful At recorded for this result.",
          "anyOf": [
            {
              "type": "string",
              "description": "last Successful At recorded for this result."
            },
            {
              "type": "null"
            }
          ]
        },
        "lastHealthyAt": {
          "description": "last Healthy At recorded for this result.",
          "anyOf": [
            {
              "type": "string",
              "description": "last Healthy At recorded for this result."
            },
            {
              "type": "null"
            }
          ]
        },
        "firstUnavailableAt": {
          "description": "first Unavailable At recorded for this result.",
          "anyOf": [
            {
              "type": "string",
              "description": "first Unavailable At recorded for this result."
            },
            {
              "type": "null"
            }
          ]
        },
        "unavailableCount": {
          "description": "unavailable Count recorded for this result.",
          "type": "number"
        },
        "wasEverHealthy": {
          "description": "was Ever Healthy recorded for this result.",
          "type": "boolean"
        },
        "retryNotBefore": {
          "description": "retry Not Before recorded for this result.",
          "anyOf": [
            {
              "type": "string",
              "description": "retry Not Before recorded for this result."
            },
            {
              "type": "null"
            }
          ]
        },
        "ignored": {
          "description": "ignored recorded for this result.",
          "type": "boolean"
        }
      },
      "additionalProperties": {},
      "description": "Saved observation state. Before the first check, this object can be empty."
    },
    "created_at": {
      "type": "string",
      "description": "UTC timestamp when the record was created."
    },
    "updated_at": {
      "type": "string",
      "description": "UTC timestamp of the last record update."
    },
    "last_attempt_at": {
      "anyOf": [
        {
          "type": "string",
          "description": "last attempt at recorded for this result."
        },
        {
          "type": "null"
        }
      ],
      "description": "last attempt at recorded for this result."
    },
    "last_success_at": {
      "anyOf": [
        {
          "type": "string",
          "description": "last success at recorded for this result."
        },
        {
          "type": "null"
        }
      ],
      "description": "last success at recorded for this result."
    },
    "last_observation_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "last observation id recorded for this result."
        },
        {
          "type": "null"
        }
      ],
      "description": "last observation id recorded for this result."
    },
    "next_check_at": {
      "anyOf": [
        {
          "type": "string",
          "description": "next check at recorded for this result."
        },
        {
          "type": "null"
        }
      ],
      "description": "next check at recorded for this result."
    },
    "overdue_reason": {
      "anyOf": [
        {
          "type": "string",
          "description": "overdue reason recorded for this result."
        },
        {
          "type": "null"
        }
      ],
      "description": "overdue reason recorded for this result."
    },
    "source_url": {
      "type": "string",
      "description": "Publisher page URL recorded in this evidence."
    },
    "target_url": {
      "type": "string",
      "description": "Destination URL recorded in this evidence."
    },
    "target_scope": {
      "type": "string",
      "description": "target scope recorded for this result."
    },
    "expected_anchor": {
      "anyOf": [
        {
          "type": "string",
          "description": "expected anchor recorded for this result."
        },
        {
          "type": "null"
        }
      ],
      "description": "expected anchor recorded for this result."
    },
    "expected_rel": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "string",
            "description": "expected rel recorded for this result."
          },
          "description": "expected rel recorded for this result."
        },
        {
          "type": "null"
        }
      ],
      "description": "expected rel recorded for this result."
    },
    "local_reference": {
      "anyOf": [
        {
          "type": "string",
          "description": "Customer reference for joining this record to a local ledger entry."
        },
        {
          "type": "null"
        }
      ],
      "description": "Customer reference for joining this record to a local ledger entry."
    },
    "last_successful_observation_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "last successful observation id recorded for this result."
        },
        {
          "type": "null"
        }
      ],
      "description": "last successful observation id recorded for this result."
    },
    "history_compacted_before": {
      "description": "history compacted before recorded for this result.",
      "anyOf": [
        {
          "type": "string",
          "description": "history compacted before recorded for this result."
        },
        {
          "type": "null"
        }
      ]
    },
    "created": {
      "description": "True when this request created the record; false when an existing record was reused.",
      "type": "boolean"
    },
    "detail": {
      "description": "detail recorded for this result.",
      "type": "string"
    }
  },
  "required": [
    "id",
    "workspace_id",
    "project_id",
    "status",
    "cadence_seconds",
    "state",
    "observation_state",
    "created_at",
    "updated_at",
    "last_attempt_at",
    "last_success_at",
    "last_observation_id",
    "next_check_at",
    "overdue_reason",
    "source_url",
    "target_url",
    "target_scope",
    "expected_anchor",
    "expected_rel",
    "local_reference",
    "last_successful_observation_id"
  ],
  "additionalProperties": {}
}
