{"__v":8,"_id":"556bc25f61c7f40d001ce059","api":{"auth":"required","params":[],"results":{"codes":[]},"settings":"","url":""},"body":"This document describes the make up of the Flood API. It's still in beta, and some endpoints are likely to change. We will publish a change log when this happens.\n\n# Schema\nThe Flood API follows the [Hypertext Application Language](http://stateless.co/hal_specification.html) serialization format for responses, and accepts a standard ActiveModel style request body format for JSON requests, and form-data based requests for application/multipart.\n\n# Current Version\nThe current version of the API is v2, which is also accepted as the default version. We encourage you to explicitly specify the correct version:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Accept: application/vnd.flood.v2+json\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\n# Making requests\nThe Flood API server is `https://api.flood.io`, you must use HTTPS for requests or your client will be redirected to the HTTPS version.\n\n# HTTP Verbs\nWhere possible, Flood API strives to use appropriate HTTP verbs for each action.\n\n#### Verb\tDescription\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Verb\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"HEAD\",\n    \"1-0\": \"GET\",\n    \"2-0\": \"POST\",\n    \"3-0\": \"PUT\",\n    \"4-0\": \"DELETE\",\n    \"5-0\": \"\",\n    \"0-1\": \"Can be issued against any resource to get just the HTTP header info.\",\n    \"1-1\": \"Used for retrieving resources.\",\n    \"2-1\": \"Used for creating resources.\",\n    \"3-1\": \"Used for replacing resources or collections. For PUT requests with no body attribute, be sure to set the Content-Length header to zero.\",\n    \"4-1\": \"Used for deleting resources. Will return a 204 with an empty body on success.\"\n  },\n  \"cols\": 2,\n  \"rows\": 5\n}\n[/block]\n# Authentication\n\nFlood API supports multiple authentication strategies, depending on how you're using the API. \n\n### Basic Token\nThe simplest way to authenticate is by using your API token, which can be found on your account page. Example:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl \\\"https://api.flood.io/api/floods\\\" -u \\\"<USER_TOKEN_HERE>:\\\"\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n### OAuth 2\nWe also support OAuth2, which allows you to generate user tokens, or register an application to develop against and allow your own users to authenticate with their account. This is ideal if you're developing an application for release as a desktop or mobile app.\n\nThis feature is still in private beta, if you would like to request access, please email support+api:::at:::flood.io","category":"556b055230922f1700ad5cfe","createdAt":"2015-06-01T02:24:31.668Z","excerpt":"Overview of working with the Flood API","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"description":"","pages":[]},"order":0,"parentDoc":null,"project":"5563e51e2207bd2100a3d7fd","slug":"flood-api","sync_unique":"","title":"Flood IO API Reference","type":"basic","updates":[],"user":"5563e4862207bd2100a3d7fc","version":"556b055130922f1700ad5cfd","childrenPages":[]}

Flood IO API Reference

Overview of working with the Flood API

This document describes the make up of the Flood API. It's still in beta, and some endpoints are likely to change. We will publish a change log when this happens. # Schema The Flood API follows the [Hypertext Application Language](http://stateless.co/hal_specification.html) serialization format for responses, and accepts a standard ActiveModel style request body format for JSON requests, and form-data based requests for application/multipart. # Current Version The current version of the API is v2, which is also accepted as the default version. We encourage you to explicitly specify the correct version: [block:code] { "codes": [ { "code": "Accept: application/vnd.flood.v2+json", "language": "http" } ] } [/block] # Making requests The Flood API server is `https://api.flood.io`, you must use HTTPS for requests or your client will be redirected to the HTTPS version. # HTTP Verbs Where possible, Flood API strives to use appropriate HTTP verbs for each action. #### Verb Description [block:parameters] { "data": { "h-0": "Verb", "h-1": "Description", "0-0": "HEAD", "1-0": "GET", "2-0": "POST", "3-0": "PUT", "4-0": "DELETE", "5-0": "", "0-1": "Can be issued against any resource to get just the HTTP header info.", "1-1": "Used for retrieving resources.", "2-1": "Used for creating resources.", "3-1": "Used for replacing resources or collections. For PUT requests with no body attribute, be sure to set the Content-Length header to zero.", "4-1": "Used for deleting resources. Will return a 204 with an empty body on success." }, "cols": 2, "rows": 5 } [/block] # Authentication Flood API supports multiple authentication strategies, depending on how you're using the API. ### Basic Token The simplest way to authenticate is by using your API token, which can be found on your account page. Example: [block:code] { "codes": [ { "code": "curl \"https://api.flood.io/api/floods\" -u \"<USER_TOKEN_HERE>:\"", "language": "shell" } ] } [/block] ### OAuth 2 We also support OAuth2, which allows you to generate user tokens, or register an application to develop against and allow your own users to authenticate with their account. This is ideal if you're developing an application for release as a desktop or mobile app. This feature is still in private beta, if you would like to request access, please email support+api@flood.io