EN RU

API MyTreeNotes


Video on Youtube: "MyTreeNotes clicker" this is a windows application as an example of the MyTreeNotes API.
API MyTreeNotes - allows you to interact with notes on the site: https://mytreenotes.com
Access is via a unique "id" of the note, using GET or POST requests. You can use any third-party programs, scripts, services, etc. to receive data from your notes (MyTreeNotes) or send from third-party programs the data to notes (MyTreeNotes).
In the MyTreeNotes app (for Android) you can enable the synchronization of your selected notes with the site mytreenotes.com, then changes to the notes on the site will get in the android application and vice versa, changes in the android application will go to the site.
Example, watch the video on YouTube: Synchronization between the cloud and the application(android).

Thus, you can manage something from the Android application, for example, your or another third-party program periodically polls the MyTreeNotes API for the presence of certain data and when new data appears in the note or the checkbox is turned on / off, then your program or device takes some action.
After a completed action or request, you can send the text with the result to the note.
Attention! Restriction: Do not execute requests to the MyTreeNotes API more than 1 time in 10 seconds. In case of multiple violations, the work with the API in this note will be automatically blocked.
Using the API, you can only access existing notes on the site. The option "Enable API" should be enabled in these notes. The option "Enable API" is located on the website and is enabled individually for each note, in the editing mode of the note (button "Settings").
You can perform operations with notes: read, write, add data to the beginning or end of the note.

Description of API MyTreeNotes:


GET requests:

API MyTreeNotes is located at: https://mytreenotes.com/api.php
Parameter Description
id Unique id of the note, required field.
Example: id=5GEDU2DJC5K45NKUR1Z9FSFSJ5152TSJ041F
action The action for the field "Content of the notes" (in the note). If not specified, the content of the note does not change.
R - Data reading.
W - Overwrite content of the note with new data.
T - Add new data to top of content of the note.
B - Add new data to bottom of content of the note.
Example: action=W
check 0 - "Task completed" disabled.
1 - "Task completed" enabled.
Example: check=1
value Text to save in the field "content of the note".
Example: value=New text
For example, a link to an existing note with which we will work:
https://mytreenotes.com/edt.php?id=5GEDU2DJC5K45NKUR1Z9FSFSJ5152TSJ041F
(id of this note: 5GEDU2DJC5K45NKUR1Z9FSFSJ5152TSJ041F)

Example: GET request to read data (content of the note) from a note by id:
https://mytreenotes.com/api.php?id=5GEDU2DJC5K45NKUR1Z9FSFSJ5152TSJ041F

Example: GET request to add the text "New text" to the bottom of field "content of the note":
https://mytreenotes.com/api.php?id=5GEDU2DJC5K45NKUR1Z9FSFSJ5152TSJ041F&action=B&value=New text

Example: GET request to add the text "The text on the top" to the top of field "content of the note":
https://mytreenotes.com/api.php?id=5GEDU2DJC5K45NKUR1Z9FSFSJ5152TSJ041F&action=T&value=The text on the top

Example: GET request to set the field "Task completed" = enabled:
https://mytreenotes.com/api.php?id=5GEDU2DJC5K45NKUR1Z9FSFSJ5152TSJ041F&action=W&check=1

Example: GET request to set the field "Task completed" = disabled and replace all data in the field "content of the note" with the new value "New text":
https://mytreenotes.com/api.php?id=5GEDU2DJC5K45NKUR1Z9FSFSJ5152TSJ041F&action=W&check=0&value=New text
The result of the GET request is returned as a JSON string. The result will contain all the fields from the note with the current values.
Example of the result:
{"id":"5GEDU2DJC5K45NKUR1Z9FSFSJ5152TSJ041F","check":"1","readonly":"0","date":"1563870943","value":"Text of the note"}



POST requests:

API MyTreeNotes is located at: https://mytreenotes.com/api.php
Parameter Description
id Unique id of the note, required field.
Example: "id":"5GEDU2DJC5K45NKUR1Z9FSFSJ5152TSJ041F"
action The action for the field "Content of the notes" (in the note). If not specified, the content of the note does not change.
R - Data reading.
W - Overwrite content of the note with new data.
T - Add new data to top of content of the note.
B - Add new data to bottom of content of the note.
Example: "action":"W"
check 0 - "Task completed" disabled.
1 - "Task completed" enabled.
Example: "check":"1"
value Text to save in the field "content of the note".
Example: "value":"New text"

POST requests are sent as a JSON string to the address: https://mytreenotes.com/api.php
The fields in the POST request should be in this order: "id","action","check","value".
Required field "id", other fields are not required.

Example: POST request to read data (content of the note) from a note by id:
{"id":"5GEDU2DJC5K45NKUR1Z9FSFSJ5152TSJ041F"}

Example: POST request to add the text "New text" to the bottom of field "content of the note":
{"id":"5GEDU2DJC5K45NKUR1Z9FSFSJ5152TSJ041F","action":"B","value":"New text"}

Example: POST request to add the text "The text on the top" to the top of field "content of the note":
{"id":"5GEDU2DJC5K45NKUR1Z9FSFSJ5152TSJ041F","action":"T","value":"The text on the top"}

Example: POST request to set the field "Task completed" = enabled:
{"id":"5GEDU2DJC5K45NKUR1Z9FSFSJ5152TSJ041F","action":"W","check":"1"}

Example: POST request to set the field "Task completed" = disabled and replace all data in the field "content of the note" with the new value "New text":
{"id":"5GEDU2DJC5K45NKUR1Z9FSFSJ5152TSJ041F","action":"W","check":"0","value":"New text"}
The result of the POST request is returned as a JSON string. The result will contain all the fields from the note with the current values.
Example of the result:
{"id":"5GEDU2DJC5K45NKUR1Z9FSFSJ5152TSJ041F","check":"1","readonly":"0","date":"1563870943","value":"Text of the note"}



Install MyTreeNotes (Android): https://play.google.com/store/apps/details?id=ru.iprg.mytreenotes

MyTreeNotes clicker (for Windows): https://mytreenotes.com/about/utils/clicker

Online notes: https://mytreenotes.com