{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "schema_version": {
      "type": "number",
      "const": 1,
      "description": "schema version recorded for this result."
    },
    "workspace_id": {
      "type": "string",
      "description": "Workspace that owns this record."
    },
    "project_id": {
      "type": "string",
      "description": "Project that owns this record."
    },
    "run_id": {
      "type": "string",
      "description": "run id recorded for this result."
    },
    "candidate_id": {
      "type": "string",
      "description": "candidate id recorded for this result."
    },
    "watch_id": {
      "type": "string",
      "description": "watch id recorded for this result."
    },
    "job_id": {
      "type": "string",
      "description": "job id 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."
    },
    "created_at": {
      "type": "string",
      "description": "UTC timestamp when the record was created."
    },
    "candidate": {
      "type": "object",
      "properties": {
        "v": {
          "type": "number",
          "const": 1,
          "description": "v recorded for this result."
        },
        "id": {
          "type": "string",
          "pattern": "^dc_[a-f0-9]{64}$",
          "description": "Resource identifier returned by the operation."
        },
        "workspace_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[a-zA-Z0-9_-]+$",
          "description": "Workspace that owns this record."
        },
        "project_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[a-zA-Z0-9_-]+$",
          "description": "Project that owns this record."
        },
        "discovery_run_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[a-zA-Z0-9_-]+$",
          "description": "discovery run id recorded for this result."
        },
        "source_url": {
          "type": "string",
          "maxLength": 4096,
          "description": "Publisher page URL recorded in this evidence."
        },
        "target_url": {
          "type": "string",
          "maxLength": 4096,
          "description": "Destination URL recorded in this evidence."
        },
        "provider": {
          "type": "string",
          "enum": [
            "linktrail_corpus",
            "dataforseo",
            "imported"
          ],
          "description": "provider recorded for this result."
        },
        "data_mode": {
          "type": "string",
          "enum": [
            "synthetic",
            "owned_corpus",
            "provider_index",
            "imported"
          ],
          "description": "data mode recorded for this result."
        },
        "provider_retrieved_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$",
          "description": "Timestamp when the upstream evidence was retrieved."
        },
        "provider_first_seen": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$",
              "description": "provider first seen recorded for this result."
            },
            {
              "type": "null"
            }
          ],
          "description": "provider first seen recorded for this result."
        },
        "provider_prev_seen": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$",
              "description": "provider prev seen recorded for this result."
            },
            {
              "type": "null"
            }
          ],
          "description": "provider prev seen recorded for this result."
        },
        "provider_last_seen": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$",
              "description": "provider last seen recorded for this result."
            },
            {
              "type": "null"
            }
          ],
          "description": "provider last seen recorded for this result."
        },
        "provider_status": {
          "type": "object",
          "properties": {
            "is_lost": {
              "anyOf": [
                {
                  "type": "boolean",
                  "description": "is lost recorded for this result."
                },
                {
                  "type": "null"
                }
              ],
              "description": "is lost recorded for this result."
            },
            "is_broken": {
              "anyOf": [
                {
                  "type": "boolean",
                  "description": "is broken recorded for this result."
                },
                {
                  "type": "null"
                }
              ],
              "description": "is broken recorded for this result."
            },
            "is_new": {
              "anyOf": [
                {
                  "type": "boolean",
                  "description": "is new recorded for this result."
                },
                {
                  "type": "null"
                }
              ],
              "description": "is new recorded for this result."
            }
          },
          "required": [
            "is_lost",
            "is_broken",
            "is_new"
          ],
          "additionalProperties": false,
          "description": "provider status recorded for this result."
        },
        "anchor": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 4096,
              "description": "anchor recorded for this result."
            },
            {
              "type": "null"
            }
          ],
          "description": "anchor recorded for this result."
        },
        "rel": {
          "anyOf": [
            {
              "maxItems": 32,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "description": "rel recorded for this result."
              },
              "description": "rel recorded for this result."
            },
            {
              "type": "null"
            }
          ],
          "description": "rel recorded for this result."
        },
        "dofollow": {
          "anyOf": [
            {
              "type": "boolean",
              "description": "dofollow recorded for this result."
            },
            {
              "type": "null"
            }
          ],
          "description": "dofollow recorded for this result."
        },
        "link_type": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 64,
              "description": "link type recorded for this result."
            },
            {
              "type": "null"
            }
          ],
          "description": "link type recorded for this result."
        },
        "source_http_status": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 100,
              "maximum": 599,
              "description": "source http status recorded for this result."
            },
            {
              "type": "null"
            }
          ],
          "description": "source http status recorded for this result."
        },
        "target_http_status": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 100,
              "maximum": 599,
              "description": "target http status recorded for this result."
            },
            {
              "type": "null"
            }
          ],
          "description": "target http status recorded for this result."
        },
        "links_count": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991,
              "description": "links count recorded for this result."
            },
            {
              "type": "null"
            }
          ],
          "description": "links count recorded for this result."
        },
        "provider_metrics": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "dataforseo": {
                  "type": "object",
                  "properties": {
                    "rank": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000,
                          "description": "rank recorded for this result."
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "rank recorded for this result."
                    },
                    "page_from_rank": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000,
                          "description": "page from rank recorded for this result."
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "page from rank recorded for this result."
                    },
                    "domain_from_rank": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000,
                          "description": "domain from rank recorded for this result."
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "domain from rank recorded for this result."
                    },
                    "backlink_spam_score": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100,
                          "description": "backlink spam score recorded for this result."
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "backlink spam score recorded for this result."
                    },
                    "rank_scale": {
                      "type": "string",
                      "const": "one_thousand",
                      "description": "rank scale recorded for this result."
                    }
                  },
                  "required": [
                    "rank",
                    "page_from_rank",
                    "domain_from_rank",
                    "backlink_spam_score",
                    "rank_scale"
                  ],
                  "additionalProperties": false,
                  "description": "dataforseo recorded for this result."
                }
              },
              "required": [
                "dataforseo"
              ],
              "additionalProperties": false,
              "description": "provider metrics recorded for this result."
            },
            {
              "type": "object",
              "properties": {
                "imported": {
                  "type": "object",
                  "properties": {
                    "supplier": {
                      "type": "string",
                      "enum": [
                        "ahrefs",
                        "google_search_console",
                        "semrush",
                        "majestic",
                        "moz",
                        "dataforseo",
                        "linkody",
                        "csv"
                      ],
                      "description": "supplier recorded for this result."
                    },
                    "supplier_row_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 256,
                          "description": "supplier row id recorded for this result."
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "supplier row id recorded for this result."
                    },
                    "supplier_generated_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$",
                          "description": "supplier generated at recorded for this result."
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "supplier generated at recorded for this result."
                    },
                    "supplier_metrics": {
                      "anyOf": [
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "number",
                                "description": "supplier metrics recorded for this result."
                              },
                              {
                                "type": "string",
                                "maxLength": 256,
                                "description": "supplier metrics recorded for this result."
                              },
                              {
                                "type": "null",
                                "description": "supplier metrics recorded for this result."
                              }
                            ],
                            "description": "supplier metrics recorded for this result."
                          },
                          "description": "supplier metrics recorded for this result."
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "supplier metrics recorded for this result."
                    }
                  },
                  "required": [
                    "supplier",
                    "supplier_row_id",
                    "supplier_generated_at",
                    "supplier_metrics"
                  ],
                  "additionalProperties": false,
                  "description": "imported recorded for this result."
                }
              },
              "required": [
                "imported"
              ],
              "additionalProperties": false,
              "description": "provider metrics recorded for this result."
            },
            {
              "type": "object",
              "properties": {
                "linktrail_corpus": {
                  "type": "object",
                  "properties": {
                    "source_outlink_count": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991,
                          "description": "source outlink count recorded for this result."
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "source outlink count recorded for this result."
                    },
                    "source_external_outlink_count": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991,
                          "description": "source external outlink count recorded for this result."
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "source external outlink count recorded for this result."
                    },
                    "fetch_kind": {
                      "type": "string",
                      "enum": [
                        "direct",
                        "rendered",
                        "proxied"
                      ],
                      "description": "fetch kind recorded for this result."
                    },
                    "extraction_complete": {
                      "type": "boolean",
                      "description": "extraction complete recorded for this result."
                    }
                  },
                  "required": [
                    "source_outlink_count",
                    "source_external_outlink_count",
                    "fetch_kind",
                    "extraction_complete"
                  ],
                  "additionalProperties": false,
                  "description": "linktrail corpus recorded for this result."
                }
              },
              "required": [
                "linktrail_corpus"
              ],
              "additionalProperties": false,
              "description": "provider metrics recorded for this result."
            }
          ],
          "description": "provider metrics recorded for this result."
        },
        "verification_status": {
          "type": "string",
          "enum": [
            "not_checked",
            "present",
            "absent",
            "unknown",
            "source_unavailable"
          ],
          "description": "Linktrail check state, independent of supplier flags. not_checked means no Linktrail check is recorded."
        },
        "verified_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$",
              "description": "Timestamp of the Linktrail check; null until checked."
            },
            {
              "type": "null"
            }
          ],
          "description": "Timestamp of the Linktrail check; null until checked."
        },
        "observation_id": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[a-zA-Z0-9_-]+$",
              "description": "observation id recorded for this result."
            },
            {
              "type": "null"
            }
          ],
          "description": "observation id recorded for this result."
        }
      },
      "required": [
        "v",
        "id",
        "workspace_id",
        "project_id",
        "discovery_run_id",
        "source_url",
        "target_url",
        "provider",
        "data_mode",
        "provider_retrieved_at",
        "provider_first_seen",
        "provider_prev_seen",
        "provider_last_seen",
        "provider_status",
        "anchor",
        "rel",
        "dofollow",
        "link_type",
        "source_http_status",
        "target_http_status",
        "links_count",
        "provider_metrics",
        "verification_status",
        "verified_at",
        "observation_id"
      ],
      "additionalProperties": {},
      "description": "candidate recorded for this result."
    },
    "job": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Resource identifier returned by the operation."
        },
        "state": {
          "type": "string",
          "description": "Saved lifecycle or evidence state, as enumerated for this record."
        },
        "execution_mode": {
          "type": "string",
          "description": "execution mode recorded for this result."
        },
        "error_code": {
          "anyOf": [
            {
              "type": "string",
              "description": "error code recorded for this result."
            },
            {
              "type": "null"
            }
          ],
          "description": "error code recorded for this result."
        },
        "created_at": {
          "type": "string",
          "description": "UTC timestamp when the record was created."
        },
        "completed_at": {
          "anyOf": [
            {
              "type": "string",
              "description": "completed at recorded for this result."
            },
            {
              "type": "null"
            }
          ],
          "description": "completed at recorded for this result."
        },
        "usage": {
          "type": "object",
          "properties": {
            "unit": {
              "type": "string",
              "const": "source_check",
              "description": "unit recorded for this result."
            },
            "units": {
              "description": "units recorded for this result.",
              "type": "number"
            },
            "state": {
              "description": "Saved lifecycle or evidence state, as enumerated for this record.",
              "type": "string"
            },
            "period": {
              "description": "period recorded for this result.",
              "type": "string"
            }
          },
          "required": [
            "unit"
          ],
          "additionalProperties": {},
          "description": "usage recorded for this result."
        }
      },
      "required": [
        "id",
        "state",
        "execution_mode",
        "error_code",
        "created_at",
        "completed_at",
        "usage"
      ],
      "additionalProperties": {},
      "description": "job recorded for this result."
    },
    "observation": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "Resource identifier returned by the operation."
            },
            "state": {
              "type": "string",
              "description": "Saved lifecycle or evidence state, as enumerated for this record."
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Recorded explanation; null when no explanation applies."
                },
                {
                  "type": "null"
                }
              ],
              "description": "Recorded explanation; null when no explanation applies."
            },
            "checked_at": {
              "type": "string",
              "description": "UTC timestamp of the saved check."
            }
          },
          "required": [
            "id",
            "state",
            "reason",
            "checked_at"
          ],
          "additionalProperties": {},
          "description": "observation recorded for this result."
        },
        {
          "type": "null"
        }
      ],
      "description": "observation recorded for this result."
    },
    "watch": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Resource identifier returned by the operation."
        },
        "status": {
          "type": "string",
          "description": "Resource lifecycle status."
        },
        "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."
        }
      },
      "required": [
        "id",
        "status",
        "local_reference"
      ],
      "additionalProperties": {},
      "description": "watch recorded for this result."
    },
    "recurring_monitoring_created": {
      "type": "boolean",
      "const": false,
      "description": "Whether this operation enrolled recurring monitoring."
    },
    "replayed": {
      "description": "True when the response reuses an earlier request with the same idempotency value.",
      "type": "boolean"
    }
  },
  "required": [
    "schema_version",
    "workspace_id",
    "project_id",
    "run_id",
    "candidate_id",
    "watch_id",
    "job_id",
    "local_reference",
    "created_at",
    "candidate",
    "job",
    "observation",
    "watch",
    "recurring_monitoring_created"
  ],
  "additionalProperties": {}
}
