{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pipeshub/json-schema/pipeshub-lookup-record-response-schema-schema.json",
  "title": "LookupRecordResponseSchema",
  "description": "Response returned by GET /connectors/record/lookup.\n\nField names are snake_case, matching the knowledge graph's internal\nview models. A miss is a 200 with an empty `matches` and the input\nechoed in `not_found_identifiers` — see the endpoint description.\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pipeshub-connector-api-openapi.yml#/components/schemas/LookupRecordResponseSchema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "matches",
    "ambiguous",
    "not_found_identifiers",
    "text"
  ],
  "properties": {
    "matches": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/KnowledgeGraphLookupMatchSchema"
      }
    },
    "ambiguous": {
      "type": "boolean",
      "description": "True when one identifier resolved to more than one accessible record. Present the choice rather than taking the first, or retry with `connectorName`."
    },
    "not_found_identifiers": {
      "type": "array",
      "description": "Identifiers that resolved to nothing the caller can access.",
      "items": {
        "type": "string"
      }
    },
    "searched_connectors": {
      "type": "object",
      "description": "Per-identifier list of the connector types that were searched, so a miss can be retried against a different `connectorName`. Keys are the identifiers exactly as supplied.",
      "additionalProperties": {
        "type": "array",
        "items": {
          "type": "string"
        }
      }
    },
    "text": {
      "type": "string",
      "description": "Flat-text rendering of the matches — each match's metadata block followed by a `Next:` line naming a follow-up call — and a line per miss naming the connectors that were searched. Capped at 25,000 bytes."
    }
  },
  "$defs": {
    "KnowledgeGraphLookupMatchSchema": {
      "type": "object",
      "additionalProperties": false,
      "description": "A single record resolved from an identifier.",
      "required": [
        "id",
        "name",
        "record_type",
        "connector_name",
        "web_url",
        "indexing_status",
        "identifier_used"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The Record ID. Pass it to GET /connectors/record/{recordId}/content to read the record, or as `nodeId` to GET /connectors/navigate to list what is under it."
        },
        "name": {
          "type": "string"
        },
        "record_type": {
          "type": [
            "string",
            "null"
          ]
        },
        "connector_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "web_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "indexing_status": {
          "type": [
            "string",
            "null"
          ]
        },
        "identifier_used": {
          "type": "string",
          "description": "Which of the supplied identifiers produced this match."
        },
        "external_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "e.g. `PA-1787`, a Confluence page id, a Drive file id."
        },
        "context_block": {
          "type": [
            "string",
            "null"
          ],
          "description": "Type-specific metadata for the record — for a ticket, status, assignee, priority and dates."
        }
      }
    }
  }
}