{"openapi":"3.1.0","info":{"title":"Land record extractor (Punjab / Haryana / Uttar Pradesh, farm + S3)","version":"1"},"paths":{"/fard/":{"get":{"summary":"Index","operationId":"index_fard__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/fard":{"get":{"summary":"Index","operationId":"index_fard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/farm/":{"get":{"summary":"Index","operationId":"index_farm__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/farm":{"get":{"summary":"Index","operationId":"index_farm_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Index","operationId":"index__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/fard/select":{"get":{"summary":"Select Page","operationId":"select_page_fard_select_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/farm/select":{"get":{"summary":"Select Page","operationId":"select_page_farm_select_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/select/":{"get":{"summary":"Select Page","operationId":"select_page_select__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/select":{"get":{"summary":"Select Page","operationId":"select_page_select_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/fard/declaration":{"get":{"summary":"Declaration Page","operationId":"declaration_page_fard_declaration_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/farm/declaration":{"get":{"summary":"Declaration Page","operationId":"declaration_page_farm_declaration_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/declaration/":{"get":{"summary":"Declaration Page","operationId":"declaration_page_declaration__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/declaration":{"get":{"summary":"Declaration Page","operationId":"declaration_page_declaration_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/health":{"get":{"summary":"Health","operationId":"health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Api Health Get"}}}}}}},"/core/api/{path}":{"put":{"summary":"Proxy Core","operationId":"proxy_core_core_api__path__put","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Proxy Core","operationId":"proxy_core_core_api__path__put","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"options":{"summary":"Proxy Core","operationId":"proxy_core_core_api__path__put","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Proxy Core","operationId":"proxy_core_core_api__path__put","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/{path}":{"put":{"summary":"Proxy Accounts","operationId":"proxy_accounts_api_v1_auth__path__put","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Proxy Accounts","operationId":"proxy_accounts_api_v1_auth__path__put","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"options":{"summary":"Proxy Accounts","operationId":"proxy_accounts_api_v1_auth__path__put","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Proxy Accounts","operationId":"proxy_accounts_api_v1_auth__path__put","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/countries":{"get":{"summary":"List Countries","operationId":"list_countries_api_countries_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/jobs":{"post":{"summary":"Create Job","operationId":"create_job_api_jobs_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_job_api_jobs_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Job Api Jobs Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}":{"get":{"summary":"Get Job","operationId":"get_job_api_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Job Api Jobs  Job Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/csvs.zip":{"get":{"summary":"Download Csvs","operationId":"download_csvs_api_jobs__job_id__csvs_zip_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/pdfs.zip":{"get":{"summary":"Download Pdfs","operationId":"download_pdfs_api_jobs__job_id__pdfs_zip_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/upload":{"get":{"summary":"Download Upload","operationId":"download_upload_api_jobs__job_id__upload_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/csv":{"get":{"summary":"Job Csv Rows","description":"One run's table as rows (\"view new\"). Haryana and Uttar Pradesh runs only.","operationId":"job_csv_rows_api_jobs__job_id__csv_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Job Csv Rows Api Jobs  Job Id  Csv Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/farms/{farm_id}":{"get":{"summary":"Get Farm","operationId":"get_farm_api_farms__farm_id__get","parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"integer","title":"Farm Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Farm Api Farms  Farm Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/farms/{farm_id}/latest/csv":{"get":{"summary":"Latest Csv Rows","description":"The latest complete run's table as rows (\"view old\").","operationId":"latest_csv_rows_api_farms__farm_id__latest_csv_get","parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"integer","title":"Farm Id"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Latest Csv Rows Api Farms  Farm Id  Latest Csv Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/farms/{farm_id}/latest/upload":{"get":{"summary":"Latest Upload","operationId":"latest_upload_api_farms__farm_id__latest_upload_get","parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"integer","title":"Farm Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/farms/{farm_id}/latest/csvs.zip":{"get":{"summary":"Latest Csvs","operationId":"latest_csvs_api_farms__farm_id__latest_csvs_zip_get","parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"integer","title":"Farm Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/farms/{farm_id}/latest/pdfs.zip":{"get":{"summary":"Latest Pdfs","operationId":"latest_pdfs_api_farms__farm_id__latest_pdfs_zip_get","parameters":[{"name":"farm_id","in":"path","required":true,"schema":{"type":"integer","title":"Farm Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/runs":{"get":{"summary":"List Runs","description":"Past and new runs, newest first. state=Haryana shows Haryana farms only.","operationId":"list_runs_api_runs_get","parameters":[{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Runs Api Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/selection-data":{"get":{"summary":"Selection Data","description":"Rows to pick from (one per owner + khewat), and the saved selection (if any) for this run.","operationId":"selection_data_api_jobs__job_id__selection_data_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Selection Data Api Jobs  Job Id  Selection Data Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/selection":{"post":{"summary":"Save Selection","description":"Save the picked rows as outputs/selection.json (row ids only; later steps read the rows again). Async only to\nread the body; the database / S3 reads and the save run in a thread, so they do not hold up other requests.","operationId":"save_selection_api_jobs__job_id__selection_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Save Selection Api Jobs  Job Id  Selection Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/declaration-data":{"get":{"summary":"Declaration Data","operationId":"declaration_data_api_jobs__job_id__declaration_data_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Declaration Data Api Jobs  Job Id  Declaration Data Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/declaration-details":{"post":{"summary":"Save Declaration Details","description":"Save the farmer details and Land Schedule fields typed on the page (outputs/declaration.json).","operationId":"save_declaration_details_api_jobs__job_id__declaration_details_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Save Declaration Details Api Jobs  Job Id  Declaration Details Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/declaration.pdf":{"get":{"summary":"Declaration Pdf Saved","description":"The filled declaration from the saved selection and saved details.","operationId":"declaration_pdf_saved_api_jobs__job_id__declaration_pdf_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Declaration Pdf Typed","description":"The filled declaration with the details typed on the page now (not saved): preview and download.","operationId":"declaration_pdf_typed_api_jobs__job_id__declaration_pdf_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/declaration/preview":{"post":{"summary":"Declaration Preview","description":"One page of the filled declaration as an image (with more than 10 owners it has several pages).","operationId":"declaration_preview_api_jobs__job_id__declaration_preview_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/land-schedule.pdf":{"get":{"summary":"Land Schedule Pdf Saved","description":"The filled Land Schedule + FPIC from the saved details.","operationId":"land_schedule_pdf_saved_api_jobs__job_id__land_schedule_pdf_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Land Schedule Pdf Typed","description":"The filled Land Schedule + FPIC with the details typed on the page now (body: {farmer, schedule}).","operationId":"land_schedule_pdf_typed_api_jobs__job_id__land_schedule_pdf_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/land-schedule/preview":{"post":{"summary":"Land Schedule Preview","description":"One page of the Land Schedule as an image (one page at a time keeps each refresh small on mobile data).","operationId":"land_schedule_preview_api_jobs__job_id__land_schedule_preview_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_create_job_api_jobs_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"farm_id":{"type":"string","title":"Farm Id"},"farmer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Farmer Id"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"force":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Force"},"engine":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engine"}},"type":"object","required":["file","farm_id"],"title":"Body_create_job_api_jobs_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}