Data API Documentation
What is?
This space offers a simple API to save data generated by your IoT projects.
Using a simple API you can send and retrieve your data, remaining stored for when you need them.
We have used MongoDB to store any data (if can be parsed as JSON). Also, we offer different working modes to simplify everything as much as possible.
You have a tabular visualization system. It's paginated, you can filter and order by columns.
How do I use it?
First you have to create an Application. You will need 2 fields: Name and email. After this you get an ApiKey.
You can use API with your ApiKey or login in this site using also your email to view your data.
Yoiu can create as much applications as youn want with same email, each one will have its own ApiKey.
You can change email or Application, your ApiKey will not change.
Store data:
URL:
http://www.foroelectro.net/arduino/api/<ApiKey>/store
Parameters:
All parameters can be passed in any method (GET, POST, etc).
-
_femode - Optional (default 1).
- 1 - Takes all request paramters and store them. Removes _femode, _edit_row_id and ApiKey from parameters to save.
- 2 - Takes data parameter as JSON and if correct, stores them
Return:
JSON object.
-
result
- status - false - incorrect; true - correct.
- message - When status = false, error reason.
- id - When status = true, ID of new register.
Overwrite register:
URL:
http://www.foroelectro.net/arduino/api/<ApiKey>/overwrite/<row_id>
Parameters:
All parameters can be passed in any method (GET, POST, etc).
-
_femode - Optional (default 1).
- 1 - Takes all request paramters and store them. Removes _femode, _edit_row_id and ApiKey from parameters to save.
- 2 - Takes data parameter as JSON and if correct, stores them
Return:
JSON object.
-
result
- status - false - incorrect; true - correct.
- message - When status = false, error reason.
- id - When status = true, ID of overwriten register (must be the same as passed id).
Get all data:
URL:
http://www.foroelectro.net/arduino/api/<ApiKey>/getAll
Parameters:
None.
Return:
JSON object.
-
result
- status - false - incorrect; true - correct.
- message - When status = false, error reason.
- data - When status = true, Array with all registers ordered by store date (GMT).
Delete register(s):
URL:
http://www.foroelectro.net/arduino/api/<ApiKey>/remove
Parameters:
All parameters can be passed in any method (GET, POST, etc).
- id - Id or array of ids to delete. Must correspond to your application (provided ApiKey)
Return:
JSON object.
-
result
- status - false - incorrect; true - correct.
- message - When status = false, error reason.
- data - When status = true, array of objects in the form {id: id, result: boolean}. Each object indicates delete result of that individual row.