Skip to main content

GET /api/person/

Retrieve stored person data including identification details, research results, and generated dossier.

Authentication

No authentication required (for hackathon demo).

Path Parameters

person_id
string
required
Unique person identifier returned from capture/identify endpoints.

Response

Returns a complete person object with all available data.
_id
string
Database record ID (Convex or MongoDB).
person_id
string
Pipeline-generated person identifier.
name
string
Person’s full name.
photoUrl
string
URL of the primary face photo.
confidence
number
Identification confidence score (0.0 to 1.0).
status
string
Processing status:
  • detected - Face detected, identification pending
  • identified - Successfully identified
  • researching - Research agents actively gathering data
  • synthesizing - Generating final dossier
  • enriched - Complete with full dossier
  • failed - Identification or enrichment failed
summary
string
Executive summary of the person (1-2 sentences).
occupation
string
Current job title or role.
organization
string
Current company or organization.
dossier
object
Comprehensive research dossier.
createdAt
integer
Creation timestamp (milliseconds since epoch).
updatedAt
integer
Last update timestamp (milliseconds since epoch).
boardPosition
object
Position on the corkboard UI.

Example Request

curl -X GET https://api.jarvis.local/api/person/person_abc123xyz

Example Response

{
  "_id": "j2k3l4m5n6o7p8q9",
  "person_id": "person_abc123xyz",
  "name": "Jane Doe",
  "photoUrl": "https://example.com/faces/jane.jpg",
  "confidence": 0.94,
  "status": "enriched",
  "summary": "Senior Software Engineer at TechCorp with 8 years of experience in distributed systems and cloud infrastructure.",
  "occupation": "Senior Software Engineer",
  "organization": "TechCorp",
  "dossier": {
    "summary": "Jane Doe is a highly accomplished software engineer specializing in distributed systems, cloud infrastructure, and DevOps practices. She has led multiple high-impact projects and is recognized in the tech community for her contributions to open-source.",
    "title": "Senior Software Engineer",
    "company": "TechCorp",
    "work_history": [
      {
        "role": "Senior Software Engineer",
        "company": "TechCorp",
        "period": "2020-Present"
      },
      {
        "role": "Software Engineer",
        "company": "StartupXYZ",
        "period": "2017-2020"
      },
      {
        "role": "Junior Developer",
        "company": "WebDev Inc",
        "period": "2015-2017"
      }
    ],
    "education": [
      {
        "school": "MIT",
        "degree": "BS Computer Science"
      }
    ],
    "social_profiles": {
      "linkedin": "https://linkedin.com/in/janedoe",
      "twitter": "https://twitter.com/janedoe_dev",
      "github": "https://github.com/janedoe",
      "website": "https://janedoe.dev"
    },
    "notable_activity": [
      "Keynote speaker at CloudConf 2023",
      "Contributor to Kubernetes project (500+ commits)",
      "Author of 'Building Scalable Systems' blog series (100k+ views)",
      "Organizer of Women in Tech meetup (500+ members)"
    ],
    "conversation_hooks": [
      "Ask about her experience scaling TechCorp's infrastructure to 10M+ users",
      "Discuss open-source contributions to Kubernetes",
      "Talk about the future of serverless computing",
      "Inquire about her Women in Tech community work"
    ],
    "risk_flags": []
  },
  "createdAt": 1709654400000,
  "updatedAt": 1709654850000,
  "boardPosition": {
    "x": 320,
    "y": 180
  }
}

Status Codes

  • 200 - Person found and returned
  • 404 - Person not found (invalid person_id)
  • 500 - Server error retrieving person data

Status Lifecycle

Polling for Updates

For synchronous workflows, poll this endpoint until status reaches enriched or failed:
const waitForEnrichment = async (personId, maxWaitMs = 60000) => {
  const startTime = Date.now();
  
  while (Date.now() - startTime < maxWaitMs) {
    const response = await fetch(`https://api.jarvis.local/api/person/${personId}`);
    const person = await response.json();
    
    if (person.status === 'enriched') {
      return person;
    } else if (person.status === 'failed') {
      throw new Error('Enrichment failed');
    }
    
    // Wait 2 seconds before next poll
    await new Promise(resolve => setTimeout(resolve, 2000));
  }
  
  throw new Error('Enrichment timeout');
};

Real-Time Updates

For better UX, use Convex subscriptions instead of polling:
import { useQuery } from 'convex/react';
import { api } from '@/convex/_generated/api';

function PersonView({ personId }: { personId: string }) {
  const person = useQuery(api.persons.getById, { id: personId });
  
  if (!person) return <div>Loading...</div>;
  if (person.status === 'researching') return <div>Researching {person.name}...</div>;
  if (person.status === 'enriched') return <DossierView person={person} />;
  
  return <div>Status: {person.status}</div>;
}

Build docs developers (and LLMs) love