1 Star 0 Fork 0

lthirty/Adafruit_IO_Documentation

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
v1.json 15.89 KB
一键复制 编辑 原始数据 按行查看 历史
{"swagger":"2.0","info":{"title":"Adafruit IO","description":"The Internet of Things for Everyone","version":"1.1.0"},"host":"io.adafruit.com","schemes":["https","http"],"basePath":"/api","produces":["application/json","application/xml","text/csv"],"security":[{"HeaderKey":[]},{"QueryKey":[]}],"paths":{"/feeds":{"get":{"x-swagger-router-controller":"Feeds","operationId":"all","summary":"All feeds for current user","description":"The Feeds endpoint returns information about the user's feeds. The response includes the latest value of each feed, and other metadata about each feed.","tags":["Feeds"],"responses":{"200":{"description":"An array of feeds","schema":{"type":"array","items":{"$ref":"#/definitions/Feed"}}},"403":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Server Error"}}},"post":{"summary":"Create a new Feed","description":"","x-swagger-router-controller":"Feeds","operationId":"create","consumes":["application/json","application/x-www-form-urlencoded"],"parameters":[{"$ref":"#/parameters/Feed"}],"tags":["Feeds"],"responses":{"200":{"description":"New feed","schema":{"$ref":"#/definitions/Feed"}},"403":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Server Error"}}}},"/feeds/{id}":{"get":{"description":"Returns feed based on ID","summary":"Get feed by ID, Feed key, or Feed Name","x-swagger-router-controller":"Feeds","operationId":"get","tags":["Feeds"],"responses":{"200":{"description":"Feed response","schema":{"$ref":"#/definitions/Feed"}},"403":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Server Error"}},"parameters":[{"name":"id","in":"path","description":"ID, key, or name of feed to use","required":true,"type":"string"}]},"put":{"summary":"Replace an existing Feed","x-swagger-router-controller":"Feeds","operationId":"replace","description":"","consumes":["application/json","application/x-www-form-urlencoded"],"parameters":[{"name":"id","in":"path","description":"ID, key, or name of Feed","required":true,"type":"string"},{"$ref":"#/parameters/Feed"}],"tags":["Feeds"],"responses":{"200":{"description":"Updated feed","schema":{"type":"object","$ref":"#/definitions/Feed"}},"403":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Server Error"}}},"patch":{"summary":"Update properties of an existing Feed","description":"","x-swagger-router-controller":"Feeds","operationId":"update","consumes":["application/json","application/x-www-form-urlencoded"],"parameters":[{"name":"id","in":"path","description":"ID, key, or name of feed to use","required":true,"type":"string"},{"$ref":"#/parameters/Feed"}],"tags":["Feeds"],"responses":{"200":{"description":"Updated feed","schema":{"$ref":"#/definitions/Feed"}},"403":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Server Error"}}},"delete":{"summary":"Delete an existing Feed","description":"","x-swagger-router-controller":"Feeds","operationId":"destroy","parameters":[{"name":"id","in":"path","description":"ID, key, or name of feed to use","required":true,"type":"string"}],"tags":["Feeds"],"responses":{"200":{"description":"Deleted feed successfully","schema":{"type":"string"}},"403":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Server Error"}}}},"/feeds/{feed_id}/data":{"get":{"x-swagger-router-controller":"Data","operationId":"all","summary":"All data for current feed","description":"","tags":["Data"],"parameters":[{"name":"feed_id","in":"path","description":"ID, key, or name of feed","required":true,"type":"string"},{"name":"start_time","in":"query","description":"Start time for filtering data. Returns data created after given time.","required":false,"type":"dateTime"},{"name":"end_time","in":"query","description":"End time for filtering data. Returns data created before given time.","required":false,"type":"dateTime"},{"name":"limit","in":"query","description":"Limit the number of records returned.","required":false,"type":"integer"}],"responses":{"200":{"description":"An array of data","schema":{"type":"array","items":{"$ref":"#/definitions/Data"}}},"403":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Server Error"}}},"post":{"summary":"Create new Data","description":"","x-swagger-router-controller":"Data","operationId":"create","consumes":["application/json","application/x-www-form-urlencoded"],"parameters":[{"name":"feed_id","in":"path","description":"ID, key, or name of feed","required":true,"type":"string"},{"$ref":"#/parameters/Data"}],"tags":["Data"],"responses":{"200":{"description":"New data","schema":{"$ref":"#/definitions/Data"}},"403":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Server Error"}}}},"/feeds/{feed_id}/data/send":{"post":{"summary":"Create new Data and Feed","description":"","x-swagger-router-controller":"Data","operationId":"send","consumes":["application/json","application/x-www-form-urlencoded"],"parameters":[{"name":"feed_id","in":"path","description":"ID, key, or name of feed","required":true,"type":"string"},{"$ref":"#/parameters/Data"}],"tags":["Data"],"responses":{"200":{"description":"New data","schema":{"$ref":"#/definitions/Data"}},"403":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Server Error"}}}},"/feeds/{feed_id}/data/receive":{"get":{"summary":"Receive data?","description":"","x-swagger-router-controller":"Data","operationId":"receive","consumes":["application/json","application/x-www-form-urlencoded"],"parameters":[{"name":"feed_id","in":"path","description":"ID, key, or name of feed","required":true,"type":"string"}],"tags":["Data"],"responses":{"200":{"description":"Data response","schema":{"type":"object","$ref":"#/definitions/Data"}},"403":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Server Error"}}}},"/feeds/{feed_id}/data/previous":{"get":{"summary":"Previous Data in Queue","description":"","x-swagger-router-controller":"Data","operationId":"previous","consumes":["application/json","application/x-www-form-urlencoded"],"parameters":[{"name":"feed_id","in":"path","description":"ID, key, or name of feed","required":true,"type":"string"}],"tags":["Data"],"responses":{"200":{"description":"Data response","schema":{"type":"object","$ref":"#/definitions/Data"}},"403":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Server Error"}}}},"/feeds/{feed_id}/data/next":{"get":{"summary":"Next Data in Queue","description":"","x-swagger-router-controller":"Data","operationId":"next","consumes":["application/json","application/x-www-form-urlencoded"],"parameters":[{"name":"feed_id","in":"path","description":"ID, key, or name of feed","required":true,"type":"string"}],"tags":["Data"],"responses":{"200":{"description":"Data response","schema":{"$ref":"#/definitions/Data"}},"403":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Server Error"}}}},"/feeds/{feed_id}/data/last":{"get":{"summary":"Last Data in Queue","description":"","x-swagger-router-controller":"Data","operationId":"last","consumes":["application/json","application/x-www-form-urlencoded"],"parameters":[{"name":"feed_id","in":"path","description":"ID, key, or name of feed","required":true,"type":"string"}],"tags":["Data"],"responses":{"200":{"description":"Data response","schema":{"$ref":"#/definitions/Data"}},"403":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Server Error"}}}},"/feeds/{feed_id}/data/{id}":{"get":{"summary":"Returns data based on ID","description":"","x-swagger-router-controller":"Data","operationId":"get","tags":["Data"],"responses":{"200":{"description":"Data response","schema":{"$ref":"#/definitions/Data"}},"403":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Server Error"}},"parameters":[{"name":"feed_id","in":"path","description":"ID, key, or name of feed to use","required":true,"type":"string"},{"name":"id","in":"path","description":"ID, key, or name of Data","required":true,"type":"string"}]},"put":{"summary":"Replace existing Data","x-swagger-router-controller":"Data","operationId":"replace","description":"","consumes":["application/json","application/x-www-form-urlencoded"],"parameters":[{"name":"feed_id","in":"path","description":"ID, key, or name of feed","required":true,"type":"string"},{"name":"id","in":"path","description":"ID, key, or name of Data","required":true,"type":"string"},{"$ref":"#/parameters/Data"}],"tags":["Data"],"responses":{"200":{"description":"Updated Data","schema":{"$ref":"#/definitions/Data"}},"403":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Server Error"}}},"patch":{"summary":"Update properties of existing Data","description":"","x-swagger-router-controller":"Data","operationId":"update","consumes":["application/json","application/x-www-form-urlencoded"],"parameters":[{"name":"feed_id","in":"path","description":"ID, key, or name of feed","required":true,"type":"string"},{"name":"id","in":"path","description":"ID, key, or name of Data","required":true,"type":"string"},{"$ref":"#/parameters/Data"}],"tags":["Data"],"responses":{"200":{"description":"Updated Data","schema":{"$ref":"#/definitions/Data"}},"403":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Server Error"}}},"delete":{"summary":"Delete existing Data","description":"","x-swagger-router-controller":"Data","operationId":"destroy","parameters":[{"name":"feed_id","in":"path","description":"ID, key, or name of feed","required":true,"type":"string"},{"name":"id","in":"path","description":"ID, key, or name of Data","required":true,"type":"string"}],"tags":["Data"],"responses":{"200":{"description":"Deleted Group successfully","schema":{"type":"string"}},"403":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Server Error"}}}},"/groups":{"get":{"summary":"All groups for current user","description":"The Groups endpoint returns information about the user's groups.\nThe response includes the latest value of each feed in the group, and other\nmetadata about the group.\n","x-swagger-router-controller":"Groups","operationId":"all","tags":["Groups"],"responses":{"200":{"description":"An array of groups","schema":{"type":"array","items":{"$ref":"#/definitions/Group"}}},"403":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Server Error"}}},"post":{"summary":"Create a new Group","description":"","x-swagger-router-controller":"Groups","operationId":"create","consumes":["application/json","application/x-www-form-urlencoded"],"parameters":[{"$ref":"#/parameters/Group"}],"tags":["Groups"],"responses":{"200":{"description":"New Group","schema":{"$ref":"#/definitions/Group"}},"403":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Server Error"}}}},"/groups/{id}":{"get":{"summary":"Returns Group based on ID","description":"","x-swagger-router-controller":"Groups","operationId":"get","tags":["Groups"],"responses":{"200":{"description":"Group response","schema":{"$ref":"#/definitions/Group"}},"403":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Server Error\""}},"parameters":[{"name":"id","in":"path","description":"ID, key, or name of Group","required":true,"type":"string"}]},"put":{"summary":"Replace an existing Group","x-swagger-router-controller":"Groups","operationId":"replace","description":"","consumes":["application/json","application/x-www-form-urlencoded"],"parameters":[{"name":"id","in":"path","description":"ID, key, or name of Group","required":true,"type":"string"},{"$ref":"#/parameters/Group"}],"tags":["Groups"],"responses":{"200":{"description":"Updated group","schema":{"$ref":"#/definitions/Group"}},"403":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Server Error"}}},"patch":{"summary":"Update properties of an existing Group","description":"","x-swagger-router-controller":"Groups","operationId":"update","consumes":["application/json","application/x-www-form-urlencoded"],"parameters":[{"name":"id","in":"path","description":"ID, key, or name of Group","required":true,"type":"string"},{"$ref":"#/parameters/Group"}],"tags":["Groups"],"responses":{"200":{"description":"Updated Group","schema":{"$ref":"#/definitions/Group"}},"403":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Server Error"}}},"delete":{"summary":"Delete an existing Group","description":"","x-swagger-router-controller":"Groups","operationId":"destroy","parameters":[{"name":"id","in":"path","description":"ID, key, or name of Group","required":true,"type":"string"}],"tags":["Groups"],"responses":{"200":{"description":"Deleted Group successfully","schema":{"type":"string"}},"403":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Server Error"}}}}},"parameters":{"Data":{"name":"data","in":"body","required":true,"schema":{"type":"object","properties":{"value":{"type":"string"},"lat":{"type":"string"},"lon":{"type":"string"},"ele":{"type":"string"}}}},"Feed":{"name":"feed","in":"body","required":true,"schema":{"type":"object","properties":{"name":{"type":"string"},"key":{"type":"string"},"description":{"type":"string"},"unit_type":{"type":"string"},"unit_symbol":{"type":"string"},"visibility":{"type":"string","default":"private","enum":["private","public"]},"license":{"type":"string"},"group_id":{"type":"string"},"history":{"type":"boolean"}}}},"Group":{"name":"group","in":"body","required":true,"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}}}}},"securityDefinitions":{"HeaderKey":{"description":"The AIO Key is used to restrict or grant access to your data. The key is unique, and you can generate a key per feed, and control it in many different ways. The easiest process is to just use your automatically generated master key. You can access this key right from the right-hand side of your dashboard or from an individual feed page.","type":"apiKey","in":"header","name":"X-AIO-Key"},"QueryKey":{"description":"The AIO Key is used to restrict or grant access to your data. The key is unique, and you can generate a key per feed, and control it in many different ways. The easiest process is to just use your automatically generated master key. You can access this key right from the right-hand side of your dashboard or from an individual feed page.","type":"apiKey","in":"query","name":"X-AIO-Key"}},"definitions":{"Group":{"type":"object","properties":{"id":{"type":"number","readOnly":true},"name":{"type":"string"},"description":{"type":"string"},"feeds":{"type":"array","readOnly":true,"items":{"$ref":"#/definitions/Feed"}},"created_at":{"type":"string","readOnly":true},"updated_at":{"readOnly":true,"type":"string"}}},"Feed":{"type":"object","properties":{"id":{"type":"number","readOnly":true},"name":{"type":"string"},"key":{"type":"string"},"description":{"type":"string"},"unit_type":{"type":"string"},"unit_symbol":{"type":"string"},"history":{"type":"boolean"},"visibility":{"type":"string","default":"private","enum":["private","public"]},"license":{"type":"string"},"enabled":{"type":"boolean","readOnly":true},"last_value":{"type":"string","readOnly":true},"status":{"type":"string","readOnly":true},"group_id":{"type":"number","readOnly":true},"created_at":{"type":"string","readOnly":true},"updated_at":{"type":"string","readOnly":true}}},"Data":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"value":{"type":"string"},"position":{"type":"string"},"feed_id":{"type":"number"},"group_id":{"readOnly":true,"type":"number"},"expiration":{"type":"string"},"lat":{"type":"number"},"lon":{"type":"number"},"ele":{"type":"number"},"completed_at":{"readOnly":true,"type":"string"},"created_at":{"readOnly":true,"type":"string"},"updated_at":{"readOnly":true,"type":"string"},"created_epoch":{"readOnly":true,"type":"number"}}}}}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lthirty/Adafruit_IO_Documentation.git
git@gitee.com:lthirty/Adafruit_IO_Documentation.git
lthirty
Adafruit_IO_Documentation
Adafruit_IO_Documentation
gh-pages

搜索帮助