目录

Subscribing to Data

The Health Service Kit cloud provides a subscription mechanism which notifies your app of user data changes in real time, ensuring that your app can always obtain the latest data.

Use an enterprise developer account to register the subscription notification capability. Individual accounts are not supported.

Currently, Health Service Kit provides the following types of events for you to subscribe to:

Basic Concepts

[h2]Data Subscription Process

Your app will be notified of user data changes in real time. In this way, the user data of your app is always up to date. The procedure is as follows:

  1. You need to register as a subscriber on the Health Service Kit management page on HUAWEI Developers.
  2. The Health Service Kit server stores the app subscriber information.
  3. Your app integrates with Health Service Kit, subscribes to events, and generates subscription records.
  4. Subscription records for users are stored in the Health Service Kit server.
  5. Your app is notified of any user data change in real time.
  6. Your app receives the notification and obtains the latest data from the Health Service Kit server.
    • You can view subscriber information such as the product name, callback URL, and subscriber ID on the Health Service Kit card.
    • After subscriber information is deregistered, previously generated subscription records will be deleted. Your app needs to generate a new subscription record when the user grants authorization to your app again.

[h2]Subscription Roles

Role/Component

Description

Subscriber

The app is the subscriber. When the user data changes, Health Service Kit notifies the callback address of the app's server. The subscriber is uniquely identified by a subscriber ID.

Event

User activity events, including authorization cancellation, exercise record change (update or deletion), change of atomic data (update or deletion), and more.

Subscription record

Records the mappings between subscribers, users, and user events that subscribers listen for. The subscription record is uniquely identified by a subscription ID.

Notification

Health Service Kit sends a notification to the subscriber's callback address to notify the subscriber of changes of the user event.

[h2]Event Subscription

Event Type (type)

Event Subtype (subType)

Event Type ID (eventType)

Description

Metadata

USER_EVENT

User account event

REVOKE_ALL

USER_EVENT$REVOKE_ALL

The user cancels the authorization.

None.

DELETE_USER

USER_EVENT$DELETE_USER

The user deletes the account.

REFRESH_TOKEN_INVALID

USER_EVENT$REFRESH_TOKEN_INVALID

The refresh token expires.

ACTIVITY_RECORD_EVENT

User exercise record event

UPDATE

ACTIVITY_RECORD_EVENT$UPDATE

The user adds/updates an exercise record.

metaKey:

  • startTime: start time of data changes.
  • endTime: end time of data changes.
  • activityType: workout type corresponding to the exercise record.
  • timeZone: time zone.

DELETE

ACTIVITY_RECORD_EVENT$DELETE

The user deletes an exercise record.

metaKey:

  • startTime: start time of data changes.
  • endTime: end time of data changes.
  • activityType: workout type corresponding to the exercise record.
  • timeZone: time zone.

SAMPLESET_EVENT

Sampling data event

UPDATE

SAMPLESET_EVENT$UPDATE${DATATYPE}

The user adds/updates the sampling data.

metaKey:

  • startTime: start time of data changes.
  • endTime: end time of data changes.
  • datatype: atomic sampling data type.
  • timeZone: time zone.
  • recordDay: date on which a record is generated.

DELETE

SAMPLESET_EVENT$DELETE${DATATYPE}

The user deletes the sampling data.

metaKey:

  • startTime: start time of data changes.
  • endTime: end time of data changes.
  • datatype: atomic sampling data type.
  • timeZone: time zone.
  • recordDay: date on which a record is generated.

HEALTH_RECORD_EVENT

Health record event

UPDATE

HEALTH_RECORD_EVENT$UPDATE${DATATYPE}

The user adds/updates a health record.

metaKey:

  • startTime: start time of data changes.
  • endTime: end time of data changes.
  • datatype: data type of health records.
  • timeZone: time zone.

DELETE

HEALTH_RECORD_EVENT$DELETE${DATATYPE}

The user deletes a health record.

metaKey:

  • startTime: start time of data changes.
  • endTime: end time of data changes.
  • datatype: data type of health records.
  • timeZone: time zone.

SCENARIO_GOAL_EVENT

Scenario-based goal event

ACHIEVE

SCENARIO_GOAL_EVENT$ACHIEVE

The user achieves a goal.

metaKey:

  • goalInfo: original goal information created by a user.
  • goalStatus: achievement status of goals created by a user in each period.
  • actualAchievedCount: total number of times that a user achieves goals.
  • timeZone: time zone.

DEVICE_EVENT

GPRS device event

BIND

DEVICE_EVENT$BIND

The user binds a device.

metaKey:

deviceCode: device binding code.

UNBIND

DEVICE_EVENT$UNBIND

The user unbinds a device.

CONNECTION_VERIFY_EVENT

Connectivity test event

VERIFY

CONNECTION_VERIFY_EVENT$VERIFY

A test is performed to check the callback URL connectivity.

None.

SAMPLE_CONFIG_EVENT

Configuration update event

UPDATE

SAMPLE_CONFIG_EVENT$UPDATE

The configuration is updated.

metaKey:

  • type: configuration type.
  • id: configuration ID.
  • modifiedTime: time when the configuration is updated.

HEALTH_ALARM_EVENT

Health alert event

ATRIAL_PREMATURE_BEAT

HEALTH_ALARM_EVENT$ATRIAL_PREMATURE_BEAT

An atrial premature beat alert event occurs.

metaKey:

  • startTime: start time of an alert event.
  • endTime: end time of an alert event.
  • datatype: data type.
  • timeZone: time zone.

VENTRICULAR_PREMATURE_BEAT

HEALTH_ALARM_EVENT$VENTRICULAR_PREMATURE_BEAT

A ventricular premature beat alert event occurs.

metaKey:

  • startTime: start time of an alert event.
  • endTime: end time of an alert event.
  • datatype: data type.
  • timeZone: time zone.

ATRIAL_FIBRILLATION

HEALTH_ALARM_EVENT$ATRIAL_FIBRILLATION

An atrial fibrillation alert event occurs.

metaKey:

  • startTime: start time of an alert event.
  • endTime: end time of an alert event.
  • datatype: data type.
  • timeZone: time zone.

TACHYCARDIA

HEALTH_ALARM_EVENT$TACHYCARDIA

A tachycardia alert event occurs.

metaKey:

  • startTime: start time of an alert event.
  • endTime: end time of an alert event.
  • datatype: data type.
  • timeZone: time zone.

BRADYCARDIA

HEALTH_ALARM_EVENT$BRADYCARDIA

A bradycardia alert event occurs.

metaKey:

  • startTime: start time of an alert event.
  • endTime: end time of an alert event.
  • datatype: data type.
  • timeZone: time zone.

LOW_SPO2

HEALTH_ALARM_EVENT$LOW_SPO2

A low SpO2 alert event occurs.

metaKey:

  • startTime: start time of an alert event.
  • endTime: end time of an alert event.
  • datatype: data type.
  • timeZone: time zone.

HYPERTHERMIA

HEALTH_ALARM_EVENT$HYPERTHERMIA

A high body temperature alert event occurs.

metaKey:

  • startTime: start time of an alert event.
  • endTime: end time of an alert event.
  • datatype: data type.
  • timeZone: time zone.

HYPOTHERMIA

HEALTH_ALARM_EVENT$HYPOTHERMIA

A low body temperature alert event occurs.

metaKey:

  • startTime: start time of an alert event.
  • endTime: end time of an alert event.
  • datatype: data type.
  • timeZone: time zone.

Currently, health alert events are only available to certain developers. If you have any interest, submit a ticket or send an email to hihealth@huawei.com to learn more information.

[h2]Subscribable Data Types in the Huawei Health App

Event Type

Data Type

Activity Type/Data Type

Description

User exercise record event

Exercise record

See Workout Type Constants.

See Workout Type Constants.

Sampling data event

Personal information sampling data

com.huawei.instantaneous.body_weight

Weight.

Health sampling data

com.huawei.instantaneous.blood_glucose

Blood glucose.

com.huawei.instantaneous.blood_pressure

Blood pressure.

com.huawei.instantaneous.spo2

SpO2

com.huawei.instantaneous.heart_rate

Heart rate.

com.huawei.instantaneous.resting_heart_rate

Resting heart rate.

com.huawei.instantaneous.stress

Stress.

com.huawei.instantaneous.skin.temperature

Skin temperature.

com.huawei.sleep.on_off_bed_record

Getting in and out of bed record.

com.huawei.instantaneous.body.temperature

Body temperature.

Activity sampling data

com.huawei.continuous.steps.delta

Steps.

com.huawei.continuous.distance.delta

Distance.

com.huawei.continuous.calories.burnt

Calories burned.

com.huawei.continuous.exercise_intensity.v2

Moderate to high intensity.

Activity statistics

com.huawei.continuous.steps.total

Total number of steps.

com.huawei.continuous.distance.total

Total distance.

com.huawei.continuous.calories.burnt.total

Calorie statistics.

com.huawei.continuous.exercise_intensity.v2.statistics

Moderate to high intensity statistics.

Health record event

Health record data

com.huawei.continuous.ecg_record

ECG measurement records.

com.huawei.health.record.sleep

Sleep records.

com.huawei.health.record.menstrual_cycle

Menstrual cycle data.

com.huawei.health.record.tachycardia

Tachycardia data.

com.huawei.health.record.bradycardia

Bradycardia data.

com.huawei.health.record.dynamic_bp

Ambulatory blood pressure monitoring (ABPM)

[h2]Data Types Supported by Scenario-Based Goal Events

Currently, total step count is supported by SCENARIO_GOAL_EVENT.

Data Type

Description

Supported Goal Type

com.huawei.continuous.steps.total

Total step count.

Measurement goal: MetricGoal

Duration goal: DurationGoal

[h2]Data Types Supporting Health Alert Events

Data Type

Description

Application Scenario

com.huawei.continuous.ecg_record

ECG measurement records.

If you only want to query ECG exception events, select the health alert event corresponding to ECG exceptions.

com.huawei.health.record.tachycardia

Tachycardia.

Only available for certain developers. For details, please refer to Tachycardia and Bradycardia.

com.huawei.health.record.bradycardia

Bradycardia.

com.huawei.health.record.lowSpo2Alert

Low SpO2 level.

Only available for certain developers. For details, please refer to Low SpO2 Level Data.

com.huawei.health.record.hyperthermia

High body temperature

Only available for certain developers. For details, please refer to high body temperature data.

Enabling the Subscription Capability

[h2]Registering as a Subscriber

When applying for Health Service Kit on HUAWEI Developers, select a product you have created, and select Registering the Subscription Notification Capability. You can select the HTTP subscription mode, and then specify a callback address and test the connectivity of the callback address.

  • When receiving notifications for changes of subscribed events, you are advised to verify the notification signature in the request header. For details about signature verification, please refer to signature of the event notification content.
  • After the signature verification is successful, Health Service Kit will test the connectivity of your callback URL by checking whether the HTTP status code 204 is returned. If not, Health Service Kit will return 404, indicating that the test failed.
  • Use an HTTPS callback URL, which must end with /healthkit/notifications (in lowercase).
  • After receiving notifications, you can obtain data from the Health Service Kit server asynchronously, preventing long response delay caused by time-consuming operations.
  • Each user can be associated with only one subscriber ID when you create subscription records for them.

If you select HTTP subscription mode, you can add multiple callback addresses and assign labels (for example, test environment or production environment) to them. Then the subscriber ID corresponding to each callback URL is generated. Each user can be associated with only one subscriber ID when you create subscription records for them.

[h2]Data Event Subscription

  1. Register the subscription record.

    For details about the HTTP request, please refer to the API for Adding/Updating a Subscription Record.

    POST
    https://health-api.cloud.huawei.com/healthkit/v2/subscriptions

    Request example

    POST
    https://health-api.cloud.huawei.com/healthkit/v2/subscriptions

    Request body

    POST
    https://health-api.cloud.huawei.com/healthkit/v2/subscriptions
    Content-Type: application/json
    Authorization: Bearer ***
    x-client-id: ***
    x-version: ***
    x-caller-trace-id: ***
    {
      "subscriberId": "08666998-78f6-46b9-8620-faa06cdbac2b",
      "eventTypes": [
          // Subscribe to exercise record update events.
          {
              "type": "ACTIVITY_RECORD_EVENT",
              "subType": "UPDATE",
              "eventType": "ACTIVITY_RECORD_EVENT$UPDATE"
          },
          // Subscribe to exercise record deletion events.
          {
              "type": "ACTIVITY_RECORD_EVENT",
              "subType": "DELETE",
              "eventType": "ACTIVITY_RECORD_EVENT$DELETE"
          },
          // Subscribe to sampling data update events. Here weight data is taken as an example.
          {
              "type": "SAMPLESET_EVENT",
              "subType": "UPDATE",
              "eventType": "SAMPLESET_EVENT$UPDATE$com.huawei.instantaneous.body_weight"
          },
          // Subscribe to health record update events. Here sleep record data is taken as an example.
          {
              "type": "HEALTH_RECORD_EVENT",
              "subType": "UPDATE",
              "eventType": "HEALTH_RECORD_EVENT$UPDATE$com.huawei.health.record.sleep"
          }
      ]
    }

    Response body

    HTTP/1.1 200 OK
    Content-type: application/json;charset=utf-8
    [
        {
            "appId": "101524371",
            "eventType": "ACTIVITY_RECORD_EVENT$UPDATE",
            "subscriberId": "a2613ab0-19d8-4126-b18f-7779405b5992",
            "subscriptionId": "0924d8d1-6d4a-4f81-99b9-b96b1a0c970c",
            "goalInfo": "null",
    	"alarmThreshold": "null",
            "subscriptionMode": 0,
    	"type": "ACTIVITY_RECORD_EVENT",
    	"subType": "UPDATE",
            "openId": "MDFAMTAxNTI0MzcxQGQ0Y2M3N2UxZTVmNjcxNWFkMWQ5Y2JjYjlmZDZiaNTY3QDVhNmNkY2FiaMTFhYzc4NDk4NDI0MzJiaNjg0MzViaYmUyMGEzZjZkNzUzYWVjM2Q5ZTgwYWM5NTgzNmY"
        },
        {
            "appId": "101524371",
            "eventType": "ACTIVITY_RECORD_EVENT$DELETE",
            "subscriberId": "a2613ab0-19d8-4126-b18f-7779405b5992",
            "subscriptionId": "641eeec8-a9c1-4c4c-9789-4963b92a6c46",
            "goalInfo": "null",
    	"alarmThreshold": "null",
            "subscriptionMode": 0,
    	"type": "ACTIVITY_RECORD_EVENT",
    	"subType": "DELETE",
            "openId": "MDFAMTAxNTI0MzcxQGQ0Y2M3N2UxZTVmNjcxNWFkMWQ5Y2JjYjlmZDZiaNTY3QDVhNmNkY2FiaMTFhYzc4NDk4NDI0MzJiaNjg0MzViaYmUyMGEzZjZkNzUzYWVjM2Q5ZTgwYWM5NTgzNmY"
        },
        {
            "appId": "101524371",
            "eventType": "SAMPLESET_EVENT$UPDATE$com.huawei.instantaneous.body_weight",
            "subscriberId": "a2613ab0-19d8-4126-b18f-7779405b5992",
            "subscriptionId": "536sfgc8-a6c1-3tt5c-9369-2643b92g7g46",
            "goalInfo": "null",
    	"alarmThreshold": "null",
            "subscriptionMode": 0,
    	"type": "SAMPLESET_EVENT",
    	"subType": "UPDATE",
            "openId": "MDFAMTAxNTI0MzcxQGQ0Y2M3N2UxZTVmNjcxNWFkMWQ5Y2JjYjlmZDZiaNTY3QDVhNmNkY2FiaMTFhYzc4NDk4NDI0MzJiaNjg0MzViaYmUyMGEzZjZkNzUzYWVjM2Q5ZTgwYWM5NTgzNmY"
        },
        {
            "appId": "101524371",
            "eventType": "HEALTH_RECORD_EVENT$UPDATE$com.huawei.health.record.sleep",
            "subscriberId": "a2613ab0-19d8-4126-b18f-7779405b5992",
            "subscriptionId": "138sfdc8-a6c1-7yt5c-9759-26e33dhh5g67",
            "goalInfo": "null",
    	"alarmThreshold": "null",
            "subscriptionMode": 0,
    	"type": "HEALTH_RECORD_EVENT",
    	"subType": "UPDATE",
            "openId": "MDFAMTAxNTI0MzcxQGQ0Y2M3N2UxZTVmNjcxNWFkMWQ5Y2JjYjlmZDZiaNTY3QDVhNmNkY2FiaMTFhYzc4NDk4NDI0MzJiaNjg0MzViaYmUyMGEzZjZkNzUzYWVjM2Q5ZTgwYWM5NTgzNmY"
        }
    ]

  2. Receive event notifications.

    Notes on processing event notifications:

    • Signature verification is recommended.
    • If the signature verification is successful, 204 No Content is returned. Otherwise, the result code 404 is returned.
    • Use an HTTPS callback URL.
    • After receiving notifications, you can obtain data from the Health Service Kit server asynchronously, preventing long response delay caused by time-consuming operations.

    For details about the HTTP request, please refer to the API for subscribing to event notifications.

    POST
    https://www.example.com/healthkit/notifications

    Request example

    POST
    https://www.example.com/healthkit/notifications

    Request body

    POST
    https://www.example.com/healthkit/notifications
    Content-Type: application/json
    x-notification-signature: ***
    {
        "eventTime":1607514090688,
        "eventType":"ACTIVITY_RECORD_EVENT$UPDATE",
        "metaData":[
            {
                "metaKey":"startTime",
                "metaValue":"1606856007879" // Start time of the data update.
            },
            {
                "metaKey":"endTime",
                "metaValue":"1606916007879"  // End time of the data update.
            },
            {
                "metaKey":"activityType",    // Data type of the data update.
                "metaValue":"1"
            }
        ],
        "openId":"MDFAMTAxNTI0MzcxQGQ0Y2M3N2UxZTVmNjcxNWFkMWQ5Y2JjYjlmZDZiaNTY3QDVhNmNkY2FiaMTFhYzc4NDk4NDI0MzJiaNjg0MzViaYmUyMGEzZjZkNzUzYWVjM2Q5ZTgwYWM5NTgzNmY"
    }

    Response body

    HTTP/1.1 204 No Content
    Content-type: application/json;charset=utf-8

  3. Obtain the data.

    Obtain data from the Health Service Kit server based on the pushed notifications. For details, please refer to Step Count Statistics of Multiple Days or Reading Running Data.

[h2]Scenario-Based Event Subscription

  1. Register the subscription record.

    For details about the HTTP request, please refer to the API for creating/updating subscription records.

    POST
    https://health-api.cloud.huawei.com/healthkit/v2/subscriptions

    Request example

    POST
    https://health-api.cloud.huawei.com/healthkit/v2/subscriptions

    Request body

    POST
    https://health-api.cloud.huawei.com/healthkit/v2/subscriptions
    Content-Type: application/json
    Authorization: Bearer ***
    x-client-id: ***
    x-version: ***
    x-caller-trace-id: ***
    {
      "subscriberId": "08666998-78f6-46b9-8620-faa06cdbac2b",
      "eventTypes": [
            {
                "type": "SCENARIO_GOAL_EVENT",
                "subType": "ACHIEVE",
                "eventType": "SCENARIO_GOAL_EVENT$ACHIEVE",
                "goalInfo": {
                    "createTime": 1654660859105,
                    "startDay": 20220608,  // Start date of a goal. Note that the start date must be later than the date on which the goal is created.
                    "recurrence": {
                        "unit": 1,  // Period unit: day
                        "count": 30, // An entire period is 30 days.
                        "expectedAchievedCount": 28
                    },
                    "goals": [
                        {
                            "goalType": 1,
                            "metricGoal": {
                                "value": 10000, // Set the goal to 10,000 steps.
                                "fieldName": "steps",
                                "dataType": "com.huawei.continuous.steps.total"
                            }
                        }
                    ]
                }
            }
        ]
    }

    Response body

    HTTP/1.1 200 OK
    Content-type: application/json;charset=utf-8
    [
        {
    	"appId": "101524371",
    	"eventType": "SCENARIO_GOAL_EVENT$ACHIEVE",
    	"subscriberId": "1b57117f-8a7a-4584-b90e-149039216af6",
    	"subscriptionId": "3a82f885-97bf-47f8-84d1-21e558fe6e99",
    	"openId": "MDFAMTAxNTI0MzcxQGQ0Y2M3N2UxZTVmNjcxNWFkMWQ5Y2JjYjlmZDZiaNTY3QDVhNmNkY2FiaMTFhYzc4NDk4NDI0MzJiaNjg0MzViaYmUyMGEzZjZkNzUzYWVjM2Q5ZTgwYWM5NTgzNmY",
    	"goalInfo": "{\"createTime\":1654660859105,\"goals\":[{\"goalType\":1,\"metricGoal\":{\"dataType\":\"com.huawei.continuous.steps.total\",\"fieldName\":\"steps\",\"value\":10000.0}}],\"recurrence\":{\"count\":30,\"expectedAchievedCount\":28,\"unit\":1},\"startDay\":20220608}",
    	"alarmThreshold": "null",
    	"subscriptionMode": 0,
    	"type": "SCENARIO_GOAL_EVENT",
    	"subType": "ACHIEVE"
        }
    ]

  2. Process the goal achievement notification.

    Notes on processing event notifications:

    • Signature verification is recommended.
    • If the signature verification is successful, 204 No Content is returned. Otherwise, the result code 404 is returned.
    • Use an HTTPS callback URL.
    • After receiving notifications, you can obtain data from the Health Service Kit server asynchronously, preventing long response delay caused by time-consuming operations.

    For details about the HTTP request, please refer to the API for subscribing to event notifications.

    POST
    https://www.example.com/healthkit/notifications

    Request example

    POST
    https://www.example.com/healthkit/notifications

    Request body

    POST
    https://www.example.com/healthkit/notifications
    Content-Type: application/json
    x-notification-signature: ***
    [{
    	"appId": "101524371",
    	"subscriptionId": "3a82f885-97bf-47f8-84d1-21e558fe6e99",
    	"periodIndex": 0,
    	"periodStartDay": 20220608,
    	"periodEndDay": 20220608,
    	"goalAchieve": [{
    		"goalType": 1,
    		"metricGoal": {
    			"value": 10000.0,
    			"fieldName": "steps",
    			"dataType": "com.huawei.continuous.steps.total"
    		},
    		"achievedFlag": true // Goal achieved.
    	}
        ]
    }
    Response body
    HTTP/1.1 204 No Content
    Content-type: application/json;charset=utf-8

  3. (Optional) Query the subscription records of a scenario-based event, or the goal achievement result in an individual time period as follows:

    For details about the HTTP request, please refer to Querying Scenario-Based Event Results.

    GET
    https://health-api.cloud.huawei.com/healthkit/v2/subscriptions/3a82f885-97bf-47f8-84d1-21e558fe6e99/achievedRecord

    Request example

    GET
    https://health-api.cloud.huawei.com/healthkit/v2/subscriptions/3a82f885-97bf-47f8-84d1-21e558fe6e99/achievedRecord

    Request body

    None.
    Response body
    HTTP/1.1 200 OK
    Content-type: application/json;charset=utf-8
    [    
        {
    	"openId": "MDFAMTAxNTI0MzcxQGQ0Y2M3N2UxZTVmNjcxNWFkMWQ5Y2JjYjlmZDZiaNTY3QDVhNmNkY2FiaMTFhYzc4NDk4NDI0MzJiaNjg0MzViaYmUyMGEzZjZkNzUzYWVjM2Q5ZTgwYWM5NTgzNmY",
    	"appId": "101524371",
    	"subscriptionId": "3a82f885-97bf-47f8-84d1-21e558fe6e99",
    	"periodIndex": 0,
    	"periodStartDay": 20220608,
    	"periodEndDay": 20220608,
    	"goalAchieve": [{
    		"goalType": 1,
    		"metricGoal": {
    			"value": 10000.0,  // Target value.
    			"fieldName": "steps",
    			"dataType": "com.huawei.continuous.steps.total"
    		},
    		"achievedResult": "20023",  // Actual value.
    		"achievedFlag": true // Flag indicating that the goal is achieved.
    	}]
        },
        {
    	"openId": "MDFAMTAxNTI0MzcxQGQ0Y2M3N2UxZTVmNjcxNWFkMWQ5Y2JjYjlmZDZiaNTY3QDVhNmNkY2FiaMTFhYzc4NDk4NDI0MzJiaNjg0MzViaYmUyMGEzZjZkNzUzYWVjM2Q5ZTgwYWM5NTgzNmY",
    	"appId": "101524371",
    	"subscriptionId": "3a82f885-97bf-47f8-84d1-21e558fe6e99",
    	"periodIndex": 1,
    	"periodStartDay": 20220609,
    	"periodEndDay": 20220609,
    	"goalAchieve": [{
    		"goalType": 1,
    		"metricGoal": {
    			"value": 10000.0,  // Target value.
    			"fieldName": "steps",
    			"dataType": "com.huawei.continuous.steps.total"
    		},
    		"achievedResult": "9800",  // Actual value.
    		"achievedFlag": false // Flag indicating that the goal is not achieved.
    	}]
        }
    ]