API
Describes the HTTP API that allows creating Everdo items programmatically.
The Curl examples on this page have been tested in a Bash environment. Some adjustments may be necessary for them to run on Windows.
API server configuration
Before making requests, you need to make sure the API is up.
- Go to Settings->API and enable the API by checking a checkbox.
- Specify the IP address or hostname of the computer. To be able to communicate with the API from the same computer, you can specify
localhost
as the hostname. If you want the API to be accessible on the network, the specify the IP address on the local network. See determining the IP address. - In most cases you will not need to change the default port value, but sometimes it’s necessary in case of a conflict.
Once configured, press Apply and restart the app. Upon restart you should see a notification saying Everdo API is up.
Creating an inbox item
This action will create a new item in inbox. You can omit the optional properties from the request model.
// Action: POST /api/items
// Request Body:
{
"title": "Inbox item",
"note": "Example note", // Optional; Default = null
"isFocused": true // Optional; Default = false
}
// Response Body:
{
"id": "B71C671F38144A9196D7D5C81B80BD7F" // This is a UUID-v4 that identifies the item in the database
"createdOn": 1582089151 // Unix seconds
}
Examples with curl
Try calling the API from the command line using the following snippets.
Make sure to specify the correct host, port and API key for your setup.
$ curl -k --header "Content-Type: application/json" \
--request POST \
--data '{"title": "Hello API", "note": "Example" }' \
https://localhost:11111/api/items?key=***
A command line script to add items to inbox
Here is how to make a script that allows you to create Inbox items from the terminal without opening the app. For example,
$ inbox "New item" "Some Description"
$ inbox "New item without description"
To create the inbox
command:
- Create a file named
inbox
using the snippet code below. - Make the script executable by running
chmod +x inbox
in the terminal - Move the
inbox
file to$PATH
#!/bin/bash
title=$1
note=$2
data()
{
cat <<EOF
{
"title": "$title",
"note": "$note"
}
EOF
}
curl -ks --header "Content-Type: application/json" \
--request POST \
--data "$(data)" \
https://localhost:11111/api/items?key=*** > /dev/null
Make sure to specify the correct host and api key in the script.
This provided script ignores the API response and will not report any communication errors. It should be extended to deal with such conditions if needed.
Last modified November 8, 2020