From 7110ca865bf4cdc93bcdcec49100641813741c9f Mon Sep 17 00:00:00 2001 From: Qstick Date: Sun, 9 Jul 2017 21:43:51 -0400 Subject: [PATCH] Created API (markdown) --- API.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 API.md diff --git a/API.md b/API.md new file mode 100644 index 0000000..5a4f17e --- /dev/null +++ b/API.md @@ -0,0 +1,56 @@ +## URL ## + +All API endpoints are based off of `/api`. As in, if you access Lidarr via `http://localhost:8686`, the API root would be `http://localhost:8686/api`. You can also take the example `http://192.168.1.20:8686/lidarr/api`. + +All other items build after this. + +## Authentication ## + +All requests made to the API endpoint require the API Key authentication using the `X-Api-Key` header or using the ```?apikey=``` query string: + +``` +http://localhost:8686/api/system/status?apikey=${YOUR_API_KEY} +``` + +Where: + +1. `http://localhost:8686/api` is the main API Endpoint +2. `/system/status` would be the specific GET request, which can be submitted by the other commands. +3. `?apikey=${YOUR_API_KEY}` is required for requests against your Lidarr instance, and gets stuck here at the end. +4. There are other commands that request/require additional information, of which will be explained on those pages. + +### API Key ### + +- Can be accessed and reset via `Settings -> General` through the GUI +- Also can be accessed via the `Config.xml` file, in the AppData Directory +- alpha-numeric (lower case) + +## Dates & Times ## + +- All dates/timestamps are `ISO-8601` formatted in UTC `2014-01-27T01:30:00Z` +- Episodes (and episode based endpoints, missing & calendar) also include the airdate in the original timezone for display purposes +- Date parameters should be `ISO-8601 UTC` dates to ensure proper handling by Lidarr + +## Content Type ## + +- All `POST/PUT` requests require all parameters to be JSON encoded in the body, unless otherwise noted. +- All `GET` requests will return a JSON encoded response + +## Endpoints ## + +- [[Calendar]] +- [[Command]] +- [[Diskspace]] +- [[Track]] +- [[TrackFile]] +- [[History]] +- [[Images]] +- [[Wanted Missing]] +- [[Queue]] +- [[Profile]] +- [[Release]] +- [[Release/Push|Release-Push]] +- [[Rootfolder]] +- [[Artist]] +- [[Artist-Lookup]] +- [[System-Status]]