Tropic Marin Lab API V0.9 beta
This is a lightweight API to access Tropic Marin's laboratory database.
Users can create a unique 64-character string as an access token, granting access to the user's data here (must be logged in):
https://lab.tropic-marin.com/en/home/token
To create a new test-token for your company you can use:
Login: user@example.com
Passwort: test
The token can be renewed or discarded by the user at any time.
The token is user-specific, so you don´t have to submit a user-ID or password!
Limitations
- To use our api an partner-key must be submitted with the user-token!
Please contact us at lab@tropic-marin.com to get the secret partner key to access the API V2! - You can only send 60 Requests per minute.
TOC
User-Endpoint
https://lab.tropic-marin.com/api/v2/get_user
Parameter (get or post):
- Send via get or post:
key string with auth-string per partner token string with auth-string from user
Output:
- returned user-Date in json:
id bigint(20) unsigned Auto-Inkrement name varchar(255) email varchar(190) email_verified timestamp NULL created timestamp NULL updated timestamp NULL customerId int(10) unsigned NULL lastname varchar(255) NULL firstname varchar(255) NULL langId int(10) unsigned [0] lastLogin datetime NULL last_seen datetime NULL
Aquariums-Endpoint
https://lab.tropic-marin.com/api/v2/get_aquariums
Parameter (get or post):
- Send via get or post:
key string with auth-string per partner token string with auth-string from user
Output:
- Array of Aquariums-data in json:
id bigint(20) unsigned Auto-Inkrement created timestamp NULL updated timestamp NULL user_id int(10) unsigned name varchar(255) startup_date date NULL show tinyint(1) NULL [0] length decimal(8,2) NULL width decimal(8,2) NULL height decimal(8,2) NULL thickness int(10) unsigned NULL volume int(10) unsigned NULL lighting text NULL filtration text NULL pumps text NULL interior text NULL animals_sessile text NULL animals_vagile text NULL notes text NULL video_link varchar(191) NULL
Test:
Analyses-Endpoint
https://lab.tropic-marin.com/api/v2/get_analyses
Parameter:
- Send via get or post:
key string with auth-string per partner token string with auth-string from user aquarium_id bigint(20) unsigned with key startdate optional date of first analysis, format: yyyy-mm-dd enddate optional date of last analysis, format: yyyy-mm-dd
Output:
- Array of analysis-data for aquarium "aquarium_id" where analysis_date is biger or equal 'startdate' and smaller or equal 'enddate' in json.
id bigint(20) unsigned Auto-Inkrement created timestamp NULL updated timestamp NULL water_type tinyint(4) NULL [0] 0-seawater,
1-osmosis water
2-freshwaterowner_type tinyint(4) NULL [0] Who did the analysis:
0: TropicMarin
1: User
2: External Labparent bigint(20) NULL Main Analysis Result. If this ID of other Analysis is given, it is normaly an osmosis water analysis. ag double(16,8) NULL Silver al double(16,8) NULL Aluminium ar double(16,8) NULL as double(16,8) NULL b double(16,8) NULL ba double(16,8) NULL be double(16,8) NULL br double(16,8) NULL ca double(16,8) NULL cd double(16,8) NULL co double(16,8) NULL cr double(16,8) NULL cu double(16,8) NULL fe double(16,8) NULL hg double(16,8) NULL i double(16,8) NULL Iodine in mg/l, like 0,0055 k double(16,8) NULL la double(16,8) NULL li double(16,8) NULL mg double(16,8) NULL mn double(16,8) NULL mo double(16,8) NULL na double(16,8) NULL ni double(16,8) NULL p double(16,8) NULL pb double(16,8) NULL rb double(16,8) NULL s double(16,8) NULL sb double(16,8) NULL sc double(16,8) NULL se double(16,8) NULL si double(16,8) NULL sn double(16,8) NULL sr double(16,8) NULL te double(16,8) NULL ti double(16,8) NULL tl double(16,8) NULL v double(16,8) NULL w double(16,8) NULL zn double(16,8) NULL zr double(16,8) NULL fluoride double(16,8) NULL chloride double(16,8) NULL bromide double(16,8) NULL nitrate double(16,8) NULL nitrite double(16,8) NULL sulfate double(16,8) NULL conductivity double(16,8) NULL pH double(16,8) NULL alkalinityMmol double(16,8) NULL alkalinityDkH double(16,8) NULL salinity double(16,8) NULL temperature double(16,8) NULL density double(16,8) NULL densityrel double(16,8) NULL po4g double(16,8) NULL po4er double(16,8) NULL smell tinyint(1) [0] color tinyint(1) [0] date datetime NULL type smallint(6) [0] deprecated note text NULL staff_id bigint(20) unsigned NULL aquarium_id bigint(20) unsigned co2 double(16,8) NULL calculated value acid_binding_capacity double(16,8) NULL calculated value
Test:
Latest Analysis-Endpoint
https://lab.tropic-marin.com/api/v2/get_latest_analysis
Parameter:
- Send via get or post:
key string with auth-string per partner token string with auth-string from user aquarium_id bigint(20) unsigned with key
Output:
- Returns one latest known analysis for aquarium "aquarium_id" in json.
id bigint(20) unsigned Auto-Inkrement created timestamp NULL updated timestamp NULL water_type tinyint(4) NULL [0] 0-seawater,
1-osmosis water
2-freshwaterowner_type tinyint(4) NULL [0] Who did the analysis:
0: TropicMarin
1: User
2: External Labparent bigint(20) NULL Main Analysis Result. If this ID of other Analysis is given, it is normaly an osmosis water analysis. ag double(16,8) NULL Silver al double(16,8) NULL Aluminium ar double(16,8) NULL as double(16,8) NULL b double(16,8) NULL ba double(16,8) NULL be double(16,8) NULL br double(16,8) NULL ca double(16,8) NULL cd double(16,8) NULL co double(16,8) NULL cr double(16,8) NULL cu double(16,8) NULL fe double(16,8) NULL hg double(16,8) NULL i double(16,8) NULL Iodine in mg/l, like 0,0055 k double(16,8) NULL la double(16,8) NULL li double(16,8) NULL mg double(16,8) NULL mn double(16,8) NULL mo double(16,8) NULL na double(16,8) NULL ni double(16,8) NULL p double(16,8) NULL pb double(16,8) NULL rb double(16,8) NULL s double(16,8) NULL sb double(16,8) NULL sc double(16,8) NULL se double(16,8) NULL si double(16,8) NULL sn double(16,8) NULL sr double(16,8) NULL te double(16,8) NULL ti double(16,8) NULL tl double(16,8) NULL v double(16,8) NULL w double(16,8) NULL zn double(16,8) NULL zr double(16,8) NULL fluoride double(16,8) NULL chloride double(16,8) NULL bromide double(16,8) NULL nitrate double(16,8) NULL nitrite double(16,8) NULL sulfate double(16,8) NULL conductivity double(16,8) NULL pH double(16,8) NULL alkalinityMmol double(16,8) NULL alkalinityDkH double(16,8) NULL salinity double(16,8) NULL temperature double(16,8) NULL density double(16,8) NULL densityrel double(16,8) NULL po4g double(16,8) NULL po4er double(16,8) NULL smell tinyint(1) [0] color tinyint(1) [0] date datetime NULL type smallint(6) [0] deprecated note text NULL staff_id bigint(20) unsigned NULL aquarium_id bigint(20) unsigned co2 double(16,8) NULL calculated value acid_binding_capacity double(16,8) NULL calculated value
Test: