Table of Contents
You can use any Icetop Database URL as a REST endpoint. All you need to do is append file extension like .json .xml etc to the end of the URL and send a request from your favorite HTTPS client.
New!! - try our new cool cloud based variable (iput and iget) usage tool [Windows] [macOS] [linux]
Generic using curl for Terminal environments
Python
Dart and Flutter
You can write data with a PUT request. Two variables proj and suburl are important which specify the projectname and the endponit name under which the data is filed.
curl -X PUT -d "{ 'first': 'Chris', 'last': 'Jack'}" "http://icetop.acnodelabs.com/icetop.php?proj=family&suburl=/users/chris/name.json"
A successful request is indicated by a 200 OK HTTP status code. The response contains the data specified in the PUT request.
{ 'first': 'Chris', 'last': 'Jack'}
Note:- To update the data redo the PUT request containing updated data. Data from the preceeding calls will still remain in database for record. You can also PUT data manually using an html form here
You can read data with a simple GET request.
curl "http://icetop.acnodelabs.com/icetop.php?proj=family&suburl=/users/chris/name.json"
A successful request is indicated by a 200 OK HTTP status code. The response contains the data obtained from database.
{ 'first': 'Chris', 'last': 'Jack'}Note:- The data spitted is from the latest PUT request.
To setup usage in python download python ccript file icetop.py and place it in your project folder. You can also get it as under by executing the following command in your project directory:-
curl -o icetop.py "http://icetop.acnodelabs.com/icetop.php?proj=scripts&suburl=/scripts/icetop/icetop.py"
You can read data with a simple get function call.
import icetop icetop.proj = 'MyProject' icetop.server = 'icetopserver.com' # only override if required, the default is set as icetop.acnodelabs.com print(icetop.get('/users/jack/name.json')
A successful request is indicated by a 200 OK HTTP status code. The response contains the data obtained from database.
{ 'first': 'Chris', 'last': 'Jack'}Note:- The data spitted is from the latest icetop.put(..) call.
You can put data with a Put(..) call. Two static variables proj is important which specify the projectname under which the data is filed.
import icetop icetop.proj = 'MyProject' icetop.put('/users/jack/name.json','{ 'first': 'Chris', 'last': 'Jack'}') res = icetop.get('/users/jack/name.json') print(res)
A successful call is indicated by a echo of same data. The response contains the data specified in the put call.
{ 'first': 'Chris', 'last': 'Jack'}
Note:- To update the data redo the PUT request containing updated data. Data from the preceeding calls will still remain in database for record. You can also PUT data manually using manual.php
To setup in dart download dart source file icetop.dart and place it in your project folder. You can also get it as under by executing the following command in your project directory:-
curl -o icetop.dart "http://icetop.acnodelabs.com/icetop.php?proj=scripts&suburl=/scripts/icetop/icetop.dart"
You can read data with a simple Get function call.
import 'icetop.dart'; .... IceTop.proj = 'MyProject'; IceTop.server = 'icetopserver.com'; # only override if required, the default is set as icetop.acnodelabs.com String resp = IceTop().Get('/users/jack/name.json'); ......
A successful request is indicated by a response containing data obtained from database.
{ 'first': 'Chris', 'last': 'Jack'}Note:- The data spitted is from the latest IceTop().Put(..) call.
You can put data with a Put(..) call. The static variable proj is important to specify the projectname under which the data is filed.
import 'icetop.dart'; .... IceTop.proj = 'MyProject'; IceTop.server = 'icetopserver.com'; # only override if required, the default is set as icetop.acnodelabs.com String resp = IceTop().Put('/users/jack/name.json','{ 'first': 'Chris', 'last': 'Jack'}'); ......
A successful call is indicated by a echo of same data. The response contains the data specified in the put call.
{ 'first': 'Chris', 'last': 'Jack'}
Note for Flutter usage:- Add the dependecy http: ^0.13.5 in your pubspec.yaml file.