Dataset: Nutrition Consumption Log

Dataset name: ds_nutrition_consumption_log

Description

Nutrition Consumption Log Data

Fields in this dataset

Name Field Name Description Field Type Field Example
Calories calories Calories floating point 400
Cholesterol cholesterol Cholesterol floating point 2
Dietary Fibre dietary_fibre Dietary Fibre floating point 1.5
Saturated Fat fat_saturated Saturated Fat floating point 9.8
Total Fat fat_total Total Fat floating point 33.1
Unsaturated Fat fat_unsaturated Unsaturated Fat floating point 11.1
Food Item food_item Food item varchar Banana
ID id The machine name for a record. Internal to PDS and Mydex int 1
Meal End timestamp meal_timestamp_end End date and time of meal int 1648633780
Meal Start Timestamp meal_timestamp_start Start date and time of meal int 1648633780
Meal Type meal_type The type of meal int 2
Measurement Group measurement_group The top level group activity belongs to varchar Activity
Monounsaturated fat monounsaturated_fat Monounsaturated fat floating point 2
Nutrition Log ID nutrition_log_id The link to the nutrition log record int 1
Polyunsaturated fat polyunsaturated_fat Polyunsaturated fat floating point 1.5
Potassium potassium Potassium floating point 1.8
Protein protein Protein floating point 10
Created Timestamp record_created_timestamp Date record added to PDS int 1648633780
Updated Timestamp record_updated_timestamp Date record updated in the PDS int 1648633780
Sodium sodium Sodium floating point 1.1
Source Device Type source_device_type States the type of source device varchar PDA
Source ID source_id The unique ID of source of the data varchar 3621-29756
Source Instance source_instance The instance of the source type int Google Account 1
Source Name source_name The Name given to source varchar Google Fit
Sugar sugar Sugar floating point 5
Total carbohydrates total_carbohydrates Total carbohydrates floating point 34.7
Trans fat trans_fat Trans fat floating point 8.7

Making an API request for this Dataset

Example Request to the Sandbox Server

http://sbx-api.mydex.org/api/pds/transaction/UID.json
  ?key=KEY
  &api_key=API_KEY
  &con_id=CON_ID
  &source_type=connection
  &dataset=ds_nutrition_consumption_log
  &instance=N

Replace the following with your own details: UID KEY, API_KEY, CON_ID and instance N.

Replace sbx-api with api when making a connection to a real member on the production server (must be authenticated).

To return the data in XML, change UID.json to UID.xml.

Example Response

A response to this API request will be structured as follows.

{
  "1": {
    "id": "1",
    "ds_id": "1",
    "calories": "400",
    "cholesterol ": "2",
    "dietary_fibre": "1.5",
    "fat_saturated": "9.8",
    "fat_total": "33.1",
    "fat_unsaturated": "11.1",
    "food_item": "Banana",
    "meal_timestamp_end": "1648633780",
    "meal_timestamp_start": "1648633780",
    "meal_type": "2",
    "measurement_group": "Activity",
    "monounsaturated_fat": "2",
    "nutrition_log_id": "1",
    "polyunsaturated_fat": "1.5",
    "potassium": "1.8",
    "protein": "10",
    "record_created_timestamp": "1648633780",
    "record_updated_timestamp": "1648633780",
    "sodium": "1.1",
    "source_device_type": "PDA",
    "source_id": "3621-29756",
    "source_instance": "Google Account 1",
    "source_name": "Google Fit",
    "sugar": "5",
    "total_carbohydrates": "34.7",
    "trans_fat ": "8.7"
  }
}