Use wide Google Fit integration

With Ants & Apps platform you can connect Google Fit with more than 30 available apps, 600+ functional formulas to boost your productivity

Reference

  • users.dataset

    • Aggregate data of a certain type or stream into buckets divided by a given type of boundary

      This action aggregates data of a certain type or stream into buckets divided by a given type of boundary. Multiple data sets of multiple types and from multiple sources can be aggregated into exactly one bucket type per request.

      POSTFitnessUsersDatasetAggregate

      Request parameters

      • userId*string

        Aggregate data for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.

      Request body

      • aggregateByarray

        The specification of data to be aggregated. At least one aggregateBy spec must be provided. All data that is specified will be aggregated using the same bucketing criteria. There will be one dataset in the response for every aggregateBy spec.

      • bucketByActivitySegmentobject

        Specifies that data be aggregated each activity segment recored for a user. Similar to bucketByActivitySegment, but bucketing is done for each activity segment rather than all segments of the same type. Mutually exclusive of other bucketing specifications.

      • bucketByActivityTypeobject

        Specifies that data be aggregated by the type of activity being performed when the data was recorded. All data that was recorded during a certain activity type (for the given time range) will be aggregated into the same bucket. Data that was recorded while the user was not active will not be included in the response. Mutually exclusive of other bucketing specifications.

      • bucketBySessionobject

        Specifies that data be aggregated by user sessions. Data that does not fall within the time range of a session will not be included in the response. Mutually exclusive of other bucketing specifications.

      • bucketByTimeobject

        Specifies that data be aggregated by a single time interval. Mutually exclusive of other bucketing specifications.

      • endTimeMillisstring

        The end of a window of time. Data that intersects with this time window will be aggregated. The time is in milliseconds since epoch, inclusive.

      • filteredDataQualityStandardarray

        DO NOT POPULATE THIS FIELD. It is ignored.

      • startTimeMillisstring

        The start of a window of time. Data that intersects with this time window will be aggregated. The time is in milliseconds since epoch, inclusive.

  • users.dataSources

    • Return the specified data source

      This action returns the specified data source.

      GETFitnessUsersDataSourcesGet

      Request parameters

      • dataSourceId*string

        The data stream ID of the data source to retrieve.

      • userId*string

        Retrieve a data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.

    • List all data sources that are visible to the developer, using the OAuth scopes provided

      This action lists all data sources that are visible to the developer, using the OAuth scopes provided. The list is not exhaustive; the user may have private data sources that are only visible to other developers, or calls using other scopes.

      GETFitnessUsersDataSourcesList

      Request parameters

      • userId*string

        List data sources for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.

      • dataTypeNamestring

        The names of data types to include in the list. If not specified, all data sources will be returned.

    • Create a new data source that is unique across all data sources belonging to this user

      This action creates a new data source that is unique across all data sources belonging to this user. The data stream ID field can be omitted and will be generated by the server with the correct format. The data stream ID is an ordered combination of some fields from the data source. In addition to the data source fields reflected into the data source ID, the developer project number that is authenticated when creating the data source is included. This developer project number is obfuscated when read by any other developer reading public data types.

      POSTFitnessUsersDataSourcesCreate

      Request parameters

      • userId*string

        Create the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.

      Request body

      • applicationobject

        Information about an application which feeds sensor data into the platform.

      • dataQualityStandardarray

        DO NOT POPULATE THIS FIELD. It is never populated in responses from the platform, and is ignored in queries. It will be removed in a future version entirely.

      • dataStreamIdstring

        A unique identifier for the data stream produced by this data source. The identifier includes: - The physical device's manufacturer, model, and serial number (UID). - The application's package name or name. Package name is used when the data source was created by an Android application. The developer project number is used when the data source was created by a REST client. - The data source's type. - The data source's stream name. Note that not all attributes of the data source are used as part of the stream identifier. In particular, the version of the hardware/the application isn't used. This allows us to preserve the same stream through version updates. This also means that two DataSource objects may represent the same data stream even if they're not equal. The exact format of the data stream ID created by an Android application is: type:dataType.name:application.packageName:device.manufacturer:device.model:device.uid:dataStreamName The exact format of the data stream ID created by a REST client is: type:dataType.name:developer project number:device.manufacturer:device.model:device.uid:dataStreamName When any of the optional fields that make up the data stream ID are absent, they will be omitted from the data stream ID. The minimum viable data stream ID would be: type:dataType.name:developer project number Finally, the developer project number is obfuscated when read by any REST or Android client that did not create the data source. Only the data source creator will see the developer project number in clear and normal form.

      • dataStreamNamestring

        The stream name uniquely identifies this particular data source among other data sources of the same type from the same underlying producer. Setting the stream name is optional, but should be done whenever an application exposes two streams for the same data type, or when a device has two equivalent sensors.

      • dataTypeobject

        The data type defines the schema for a stream of data being collected by, inserted into, or queried from the Fitness API.

      • deviceobject

        Representation of an integrated device (such as a phone or a wearable) that can hold sensors.

      • namestring

        An end-user visible name for this data source.

      • typestring

        A constant describing the type of this data source. Indicates whether this data source produces raw or derived data.

    • Update the specified data source

      This action updates the specified data source. The dataStreamId, dataType, type, dataStreamName, and device properties with the exception of version, cannot be modified. Data sources are identified by their dataStreamId.

      PUTFitnessUsersDataSourcesUpdate

      Request parameters

      • dataSourceId*string

        The data stream ID of the data source to update.

      • userId*string

        Update the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.

      Request body

      • applicationobject

        Information about an application which feeds sensor data into the platform.

      • dataQualityStandardarray

        DO NOT POPULATE THIS FIELD. It is never populated in responses from the platform, and is ignored in queries. It will be removed in a future version entirely.

      • dataStreamIdstring

        A unique identifier for the data stream produced by this data source. The identifier includes: - The physical device's manufacturer, model, and serial number (UID). - The application's package name or name. Package name is used when the data source was created by an Android application. The developer project number is used when the data source was created by a REST client. - The data source's type. - The data source's stream name. Note that not all attributes of the data source are used as part of the stream identifier. In particular, the version of the hardware/the application isn't used. This allows us to preserve the same stream through version updates. This also means that two DataSource objects may represent the same data stream even if they're not equal. The exact format of the data stream ID created by an Android application is: type:dataType.name:application.packageName:device.manufacturer:device.model:device.uid:dataStreamName The exact format of the data stream ID created by a REST client is: type:dataType.name:developer project number:device.manufacturer:device.model:device.uid:dataStreamName When any of the optional fields that make up the data stream ID are absent, they will be omitted from the data stream ID. The minimum viable data stream ID would be: type:dataType.name:developer project number Finally, the developer project number is obfuscated when read by any REST or Android client that did not create the data source. Only the data source creator will see the developer project number in clear and normal form.

      • dataStreamNamestring

        The stream name uniquely identifies this particular data source among other data sources of the same type from the same underlying producer. Setting the stream name is optional, but should be done whenever an application exposes two streams for the same data type, or when a device has two equivalent sensors.

      • dataTypeobject

        The data type defines the schema for a stream of data being collected by, inserted into, or queried from the Fitness API.

      • deviceobject

        Representation of an integrated device (such as a phone or a wearable) that can hold sensors.

      • namestring

        An end-user visible name for this data source.

      • typestring

        A constant describing the type of this data source. Indicates whether this data source produces raw or derived data.

    • Delete the specified data source

      This action deletes the specified data source. The request will fail if the data source contains any data points.

      DELETEFitnessUsersDataSourcesDelete

      Request parameters

      • dataSourceId*string

        The data stream ID of the data source to delete.

      • userId*string

        Retrieve a data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.

  • users.sessions

    • List sessions previously created

      This action lists sessions previously created.

      GETFitnessUsersSessionsList

      Request parameters

      • userId*string

        List sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.

      • endTimestring

        An RFC3339 timestamp. Only sessions ending between the start and end times will be included in the response.

      • includeDeletedboolean

        If true, deleted sessions will be returned. When set to true, sessions returned in this response will only have an ID and will not have any other fields.

      • pageTokenstring

        The continuation token, which is used for incremental syncing. To get the next batch of changes, set this parameter to the value of nextPageToken from the previous response. This token is treated as a timestamp (in millis since epoch). If specified, the API returns sessions modified since this time. The page token is ignored if either start or end time is specified. If none of start time, end time, and the page token is specified, sessions modified in the last 30 days are returned.

      • startTimestring

        An RFC3339 timestamp. Only sessions ending between the start and end times will be included in the response.

    • Update or insert a given session

      This action updates or insert a given session.

      PUTFitnessUsersSessionsUpdate

      Request parameters

      • sessionId*string

        The ID of the session to be created.

      • userId*string

        Create sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.

      • currentTimeMillisstring

        The client's current time in milliseconds since epoch.

      Request body

      • activeTimeMillisstring

        Session active time. While start_time_millis and end_time_millis define the full session time, the active time can be shorter and specified by active_time_millis. If the inactive time during the session is known, it should also be inserted via a com.google.activity.segment data point with a STILL activity value

      • activityTypeinteger

        The type of activity this session represents.

      • applicationobject

        The application that created the session.

      • descriptionstring

        A description for this session.

      • endTimeMillisstring

        An end time, in milliseconds since epoch, inclusive.

      • idstring

        A client-generated identifier that is unique across all sessions owned by this particular user.

      • modifiedTimeMillisstring

        A timestamp that indicates when the session was last modified.

      • namestring

        A human readable name of the session.

      • startTimeMillisstring

        A start time, in milliseconds since epoch, inclusive.

    • Delete a session specified by the given session ID

      This action deletes a session specified by the given session ID.

      DELETEFitnessUsersSessionsDelete

      Request parameters

      • sessionId*string

        The ID of the session to be deleted.

      • userId*string

        Delete a session for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.

      • currentTimeMillisstring

        The client's current time in milliseconds since epoch.