代码拉取完成,页面将自动刷新
{"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"}}}}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。