{"openapi":"3.1.0","info":{"title":"Upstream","version":"0.1.0"},"paths":{"/api/config":{"get":{"summary":"Config","operationId":"config_api_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/google":{"post":{"summary":"Google Login","operationId":"google_login_api_auth_google_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleLogin"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/persons":{"post":{"summary":"Add Person","operationId":"add_person_api_persons_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/parentage":{"post":{"summary":"Add Parentage","operationId":"add_parentage_api_parentage_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParentageIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/parentage/remove":{"post":{"summary":"Remove Parentage","operationId":"remove_parentage_api_parentage_remove_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParentageIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners":{"post":{"summary":"Add Partners","operationId":"add_partners_api_partners_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partners/remove":{"post":{"summary":"Remove Partners","operationId":"remove_partners_api_partners_remove_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trees":{"get":{"summary":"List Trees","description":"The user's trees, primary first.","operationId":"list_trees_api_trees_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tree":{"get":{"summary":"Tree","operationId":"tree_api_tree_get","parameters":[{"name":"tree_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tree Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/me":{"post":{"summary":"Set Me","operationId":"set_me_api_me_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/persons/{person_id}":{"get":{"summary":"Get Person","operationId":"get_person_api_persons__person_id__get","parameters":[{"name":"person_id","in":"path","required":true,"schema":{"type":"integer","title":"Person Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update Person","operationId":"update_person_api_persons__person_id__put","parameters":[{"name":"person_id","in":"path","required":true,"schema":{"type":"integer","title":"Person Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/persons/{person_id}/sources":{"post":{"summary":"Add Source","operationId":"add_source_api_persons__person_id__sources_post","parameters":[{"name":"person_id","in":"path","required":true,"schema":{"type":"integer","title":"Person Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/hints":{"get":{"summary":"List Hints","operationId":"list_hints_api_hints_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/hints/{hint_id}/accept":{"post":{"summary":"Accept Hint","operationId":"accept_hint_api_hints__hint_id__accept_post","parameters":[{"name":"hint_id","in":"path","required":true,"schema":{"type":"integer","title":"Hint Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/hints/{hint_id}/dismiss":{"post":{"summary":"Dismiss Hint","operationId":"dismiss_hint_api_hints__hint_id__dismiss_post","parameters":[{"name":"hint_id","in":"path","required":true,"schema":{"type":"integer","title":"Hint Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sources/{source_id}":{"put":{"summary":"Update Source","operationId":"update_source_api_sources__source_id__put","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Source","operationId":"delete_source_api_sources__source_id__delete","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/persons/{person_id}/media":{"post":{"summary":"Upload Media","operationId":"upload_media_api_persons__person_id__media_post","parameters":[{"name":"person_id","in":"path","required":true,"schema":{"type":"integer","title":"Person Id"}},{"name":"x-filename","in":"header","required":false,"schema":{"type":"string","default":"file","title":"X-Filename"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/media/{media_id}":{"get":{"summary":"Get Media","operationId":"get_media_api_media__media_id__get","parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"integer","title":"Media Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Media","operationId":"delete_media_api_media__media_id__delete","parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"integer","title":"Media Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/persons/{person_id}/photo":{"post":{"summary":"Set Photo","operationId":"set_photo_api_persons__person_id__photo_post","parameters":[{"name":"person_id","in":"path","required":true,"schema":{"type":"integer","title":"Person Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhotoIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/export.zip":{"get":{"summary":"Export Zip","description":"Everything in the signed-in user's tree as one zip: readable CSV, full JSON, and every picture/file.","operationId":"export_zip_api_export_zip_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/import/zip":{"post":{"summary":"Restore Zip","description":"Body is a backup zip made by \"Export backup\". dry_run=true only checks it and reports what is inside.\nOtherwise the signed-in user's whole tree is REPLACED by the backup (a safety copy of the database is made first).","operationId":"restore_zip_api_import_zip_post","parameters":[{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Dry Run"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ai/status":{"get":{"summary":"Ai Status","operationId":"ai_status_api_ai_status_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/persons/{person_id}/lookup":{"post":{"summary":"Lookup Records","operationId":"lookup_records_api_persons__person_id__lookup_post","parameters":[{"name":"person_id","in":"path","required":true,"schema":{"type":"integer","title":"Person Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Index","operationId":"index__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AcceptIn":{"properties":{"person_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Person Id"}},"type":"object","title":"AcceptIn"},"GoogleLogin":{"properties":{"credential":{"type":"string","title":"Credential"}},"type":"object","required":["credential"],"title":"GoogleLogin"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"MeIn":{"properties":{"person_id":{"type":"integer","title":"Person Id"}},"type":"object","required":["person_id"],"title":"MeIn"},"ParentageIn":{"properties":{"parent_id":{"type":"integer","title":"Parent Id"},"child_id":{"type":"integer","title":"Child Id"}},"type":"object","required":["parent_id","child_id"],"title":"ParentageIn"},"PartnerIn":{"properties":{"a_id":{"type":"integer","title":"A Id"},"b_id":{"type":"integer","title":"B Id"},"marriage_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Marriage Year"}},"type":"object","required":["a_id","b_id"],"title":"PartnerIn"},"PersonIn":{"properties":{"first_name":{"type":"string","title":"First Name"},"middle_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Middle Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"birth_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Birth Year"},"death_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Death Year"},"notes":{"type":"string","title":"Notes","default":""},"sex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex"},"connect_to":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Connect To"},"relation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relation"}},"type":"object","required":["first_name"],"title":"PersonIn"},"PersonUpdate":{"properties":{"first_name":{"type":"string","title":"First Name"},"middle_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Middle Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"birth_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Birth Year"},"death_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Death Year"},"birth_place":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Birth Place"},"death_place":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Death Place"},"sex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex"},"notes":{"type":"string","title":"Notes","default":""}},"type":"object","required":["first_name"],"title":"PersonUpdate"},"PhotoIn":{"properties":{"media_id":{"type":"integer","title":"Media Id"}},"type":"object","required":["media_id"],"title":"PhotoIn"},"SourceIn":{"properties":{"title":{"type":"string","title":"Title"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["title"],"title":"SourceIn"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}