{"openapi":"3.1.0","info":{"title":"필다음 공개 API","version":"1.1.0","description":"협력사용 API. 허용된 회사(경영체)의 데이터를 받고(GET), 협력사가 수집한 데이터를 축평원 연계 형식으로 보냅니다(POST /ekape/records). 메뉴얼: /developers"},"servers":[{"url":"https://www.fildaum.kr/api/public/v1"}],"security":[{"bearer":[]},{"apiKey":[]}],"paths":{"/status":{"get":{"summary":"키 · 한도 · 서버 상태","description":"","parameters":[],"responses":{"200":{"$ref":"#/components/responses/Ok"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"}}}},"/farms":{"get":{"summary":"허용된 경영체 › 농장 › 축사 › 방","description":"범위: space:read. ","parameters":[],"responses":{"200":{"$ref":"#/components/responses/Ok"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"}}}},"/devices":{"get":{"summary":"허용된 장비 목록","description":"범위: sensor:read 또는 fan:read. 상태: ok(2분 이내) · late(10분 이내) · off","parameters":[],"responses":{"200":{"$ref":"#/components/responses/Ok"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"}}}},"/devices/{mac}/latest":{"get":{"summary":"가스 장비 최신값","description":"범위: sensor:read. ","parameters":[{"name":"mac","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{12}$"},"description":"장비 MAC (소문자 12자리)"}],"responses":{"200":{"$ref":"#/components/responses/Ok"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"}}}},"/devices/{mac}/readings":{"get":{"summary":"가스 장비 이력","description":"범위: sensor:read. ","parameters":[{"name":"mac","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{12}$"},"description":"장비 MAC (소문자 12자리)"},{"name":"from","in":"query","schema":{"type":"string"},"description":"ISO 8601 (시간대 없으면 한국 시간) 또는 YYYY-MM-DD. 기본: to 24시간 전"},{"name":"to","in":"query","schema":{"type":"string"},"description":"ISO 8601 또는 YYYY-MM-DD(그날 끝까지). 기본: 지금"},{"name":"interval","in":"query","schema":{"type":"string","enum":["raw","1m","10m","1h","1d"],"default":"1h"},"description":"raw 는 최대 7일, 집계는 최대 366일"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000,"default":500}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"다음 쪽: 앞 응답의 meta.next 를 그대로"}],"responses":{"200":{"$ref":"#/components/responses/Ok"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"}}}},"/fans/{mac}":{"get":{"summary":"팬 게이트웨이 국번별 최신 상태","description":"범위: fan:read. ","parameters":[{"name":"mac","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{12}$"},"description":"장비 MAC (소문자 12자리)"}],"responses":{"200":{"$ref":"#/components/responses/Ok"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"}}}},"/fans/{mac}/{slave}/readings":{"get":{"summary":"팬 컨트롤러 이력","description":"범위: fan:read. ","parameters":[{"name":"mac","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{12}$"},"description":"장비 MAC (소문자 12자리)"},{"name":"slave","in":"path","required":true,"schema":{"type":"integer","minimum":1,"maximum":247}},{"name":"from","in":"query","schema":{"type":"string"},"description":"ISO 8601 (시간대 없으면 한국 시간) 또는 YYYY-MM-DD. 기본: to 24시간 전"},{"name":"to","in":"query","schema":{"type":"string"},"description":"ISO 8601 또는 YYYY-MM-DD(그날 끝까지). 기본: 지금"},{"name":"interval","in":"query","schema":{"type":"string","enum":["raw","1m","10m","1h","1d"],"default":"1h"},"description":"raw 는 최대 7일, 집계는 최대 366일"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000,"default":500}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"다음 쪽: 앞 응답의 meta.next 를 그대로"}],"responses":{"200":{"$ref":"#/components/responses/Ok"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"}}}},"/ekape/records":{"get":{"summary":"보낸 레코드 상태 (queued · sent · failed)","description":"범위: data:write. ","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["queued","sent","failed"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000,"default":100}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/Ok"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"수집 데이터 보내기 (축평원 연계 인터페이스 V3.8, 26개 항목)","description":"범위: data:write. 한 번에 200건 · 256KB. lsindRegistNo 는 허용된 농장의 축산업고유번호(체험용 키는 TEST1). makrId 는 필다음 축평원 아이디로 바뀌어 저장되고, 축평원 전송은 필다음 가 따로 진행합니다.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EkapeBatch"}}}},"responses":{"200":{"$ref":"#/components/responses/Ok"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"}}}}},"components":{"schemas":{"EkapeBatch":{"type":"object","required":["records"],"properties":{"records":{"type":"array","maxItems":200,"items":{"type":"object","additionalProperties":false,"required":["lsindRegistNo","itemCode","makrId","eqpmnCode","eqpmnNo","stallTyCode","stallNo","mesureDt"],"properties":{"lsindRegistNo":{"type":"string","maxLength":10},"itemCode":{"type":"string","maxLength":3},"makrId":{"type":"string","maxLength":20},"eqpmnCode":{"type":"string","maxLength":10},"eqpmnEsntlSn":{"type":"string","maxLength":100},"eqpmnNo":{"type":"string","maxLength":20},"stallTyCode":{"type":"string","maxLength":10},"stallNo":{"type":"string","maxLength":20},"roomNo":{"type":"string","maxLength":20},"roomDtlNo":{"type":"string","maxLength":20},"mesureDt":{"type":"string","maxLength":20},"mesureVal01":{"type":"string","maxLength":20},"mesureVal02":{"type":"string","maxLength":20},"mesureVal03":{"type":"string","maxLength":20},"mesureVal04":{"type":"string","maxLength":20},"mesureVal05":{"type":"string","maxLength":20},"mesureVal06":{"type":"string","maxLength":20},"mesureVal07":{"type":"string","maxLength":20},"mesureVal08":{"type":"string","maxLength":20},"mesureVal09":{"type":"string","maxLength":20},"mesureVal10":{"type":"string","maxLength":20},"mesureVal11":{"type":"string","maxLength":20},"mesureVal12":{"type":"string","maxLength":20},"mesureVal13":{"type":"string","maxLength":20},"mesureVal14":{"type":"string","maxLength":20},"mesureVal15":{"type":"string","maxLength":20}}}}}}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Authorization: Bearer gsgw_live_… (체험용 gsgw_test_…)"},"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key"}},"responses":{"Ok":{"description":"성공","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"data":{},"meta":{"type":"object","properties":{"count":{"type":"integer"},"next":{"type":["string","null"]},"tz":{"type":"string"}}}}}}}},"Error":{"description":"오류","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}