Create a wellness activity
post
/hcmRestApi/resources/11.13.18.05/wellnessActivities
Request
Header Parameters
-
Metadata-Context:
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version:
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Supported Media Types
- application/json
Root Schema : schema
Type:
Show Source
object
-
activitymeasures: array
Activity Measures
Title:
Activity Measures
The activityMeasures resource is a child of the wellnessActivities resource. It includes measures to track fitness activities. For example, a daily activity summary includes a value for the number of steps equivalent to the activities recorded for that day, as well as the time spent at low, moderate, and high activity levels. -
DeviceName(required): string
Maximum Length:
80
Name of the fitness tracking device. -
StartTime(required): string
(date-time)
Start date and time of the tracking period. This is optional.
-
StopTime(required): string
(date-time)
End date and time of the tracking period. This is optional and can be the same as the start time for a daily summary.
-
TimePeriodUnitsURI(required): string
Maximum Length:
80
Unique identifier for the unit of measure of the tracking period. For example, oracle:apps:odin:domain:unit:time_period:daily for a daily summary. -
URI(required): string
Maximum Length:
80
Unique identifier for the fitness tracker account. -
UserId(required): string
Maximum Length:
80
Identifier for the Wellness user, typically Person ID or the value supplied by Oracle HCM Cloud to an external bridge when a user opts-in to Wellness. -
VendorName(required): string
Maximum Length:
80
Name of the manufacturer of the fitness tracking device.
Nested Schema : Activity Measures
Type:
array
Title:
Activity Measures
The activityMeasures resource is a child of the wellnessActivities resource. It includes measures to track fitness activities. For example, a daily activity summary includes a value for the number of steps equivalent to the activities recorded for that day, as well as the time spent at low, moderate, and high activity levels.
Show Source
Nested Schema : schema
Type:
Show Source
object
-
UnitURI: string
Maximum Length:
80
Unique identifier for the units used to measure the activity being tracked. For example, oracle:apps:odin:domain:unit:distance:miles for distance. -
URI: string
Maximum Length:
80
Unique identifier of the activity being tracked. -
Value: number
Value of the measurement specified by the resource URI in the units specified by UnitsURI.
Response
Supported Media Types
- application/json
Default Response
The following table describes the default response for this task.
Headers
-
Metadata-Context:
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version:
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Root Schema : wellnessActivities-item-response
Type:
Show Source
object
-
activitymeasures: array
Activity Measures
Title:
Activity Measures
The activityMeasures resource is a child of the wellnessActivities resource. It includes measures to track fitness activities. For example, a daily activity summary includes a value for the number of steps equivalent to the activities recorded for that day, as well as the time spent at low, moderate, and high activity levels. -
DeviceName: string
Maximum Length:
80
Name of the fitness tracking device. -
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
StartTime: string
(date-time)
Start date and time of the tracking period. This is optional.
-
StopTime: string
(date-time)
End date and time of the tracking period. This is optional and can be the same as the start time for a daily summary.
-
TimePeriodUnitsURI: string
Maximum Length:
80
Unique identifier for the unit of measure of the tracking period. For example, oracle:apps:odin:domain:unit:time_period:daily for a daily summary. -
URI: string
Maximum Length:
80
Unique identifier for the fitness tracker account. -
UserId: string
Maximum Length:
80
Identifier for the Wellness user, typically Person ID or the value supplied by Oracle HCM Cloud to an external bridge when a user opts-in to Wellness. -
VendorName: string
Maximum Length:
80
Name of the manufacturer of the fitness tracking device.
Nested Schema : Activity Measures
Type:
array
Title:
Activity Measures
The activityMeasures resource is a child of the wellnessActivities resource. It includes measures to track fitness activities. For example, a daily activity summary includes a value for the number of steps equivalent to the activities recorded for that day, as well as the time spent at low, moderate, and high activity levels.
Show Source
Nested Schema : Links
Type:
array
Title:
Links
The link relations associated with the resource instance.
Show Source
Nested Schema : wellnessActivities-activitymeasures-item-response
Type:
Show Source
object
-
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
UnitURI: string
Maximum Length:
80
Unique identifier for the units used to measure the activity being tracked. For example, oracle:apps:odin:domain:unit:distance:miles for distance. -
URI: string
Maximum Length:
80
Unique identifier of the activity being tracked. -
Value: number
Value of the measurement specified by the resource URI in the units specified by UnitsURI.
Nested Schema : Links
Type:
array
Title:
Links
The link relations associated with the resource instance.
Show Source
Nested Schema : link
Type:
Show Source
object
-
href: string
Title:
hyperlink reference
The URI to the related resource. -
kind: string
Title:
kind
Allowed Values:[ "collection", "item", "describe", "other" ]
The kind of the related resource. -
name: string
Title:
name
The name of the link to the related resource. -
properties: object
properties
-
rel: string
Title:
relation
Allowed Values:[ "self", "lov", "parent", "canonical", "child", "enclosure", "action", "custom" ]
The name of the relation to the resource instance. Example: self.
Nested Schema : properties
Type:
Show Source
object
-
changeIndicator: string
Change indicator or the ETag value of the resource instance.
Links
- activitymeasures
-
Parameters:
- wellnessActivitiesUniqID:
$request.path.wellnessActivitiesUniqID
The activityMeasures resource is a child of the wellnessActivities resource. It includes measures to track fitness activities. For example, a daily activity summary includes a value for the number of steps equivalent to the activities recorded for that day, as well as the time spent at low, moderate, and high activity levels. - wellnessActivitiesUniqID:
Examples
The following example shows how to create a wellness activity by submitting a POST request on the REST resource using cURL.
curl -X POST -H "<username>:<password>" -H "Content-Type: application/vnd.oracle.adf.resourceitem+json" -H "Cache-Control: no-cache" -d <payload> http://<host>:<port>/hcmRestApi/resources/11.13.18.05/wellnessActivities"
Example of Payload
The following shows an example of the payload.
{ "UserId":"300000049043637", "StartTime":"2019-03-07", "StopTime":"2019-03-07", "URI":"oracle:apps:hcm:hwr:cardea:activity:summary", "TimePeriodUnitsURI":"oracle:apps:odin:domain:unit:time_period:daily", "DeviceName":"FitnessBand", "VendorName":"FitnessTracker", "activitymeasures": [ { "URI":"oracle:apps:hcm:hwr:cardea:activitymeasure:steps", "UnitURI":"oracle:apps:odin:domain:unit:simple_count:count", "Value":"8001" }, { "URI":"oracle:apps:hcm:hwr:cardea:activitymeasure:distance", "UnitURI":"oracle:apps:odin:domain:unit:distance:miles", "Value":"4.1" }, { "URI":"oracle:apps:hcm:hwr:cardea:activitymeasure:high_activity_time", "UnitURI":"oracle:apps:odin:domain:unit:time:min", "Value":"22" }, { "URI":"oracle:apps:hcm:hwr:cardea:activitymeasure:moderate_activity_time", "UnitURI":"oracle:apps:odin:domain:unit:time:min", "Value":"10"}, { "URI":"oracle:apps:hcm:hwr:cardea:activitymeasure:low_activity_time", "UnitURI":"oracle:apps:odin:domain:unit:time:min", "Value":"50" }, { "URI":"oracle:apps:hcm:hwr:cardea:activitymeasure:calories", "UnitURI":"oracle:apps:odin:domain:unit:energy:kcal", "Value" : "1801" } ] }
Example of Response Header
The following shows an example of the response header.
Status: HTTP/1.1 201 Created Content-Type : application/json
Example of Response Body
The following example shows the contents of the response body in JSON format.
{ "UserId":"300000049043637", "StartTime":"2019-03-07", "StopTime":"2019-03-07", "URI":"oracle:apps:hcm:hwr:cardea:activity:summary", "TimePeriodUnitsURI":"oracle:apps:odin:domain:unit:time_period:daily", "DeviceName":"FitnessBand", "VendorName":"FitnessTracker", "activitymeasures": [ { "URI":"oracle:apps:hcm:hwr:cardea:activitymeasure:steps", "UnitURI":"oracle:apps:odin:domain:unit:simple_count:count", "Value":"8001" "links":[ { ...} ] }, { "URI":"oracle:apps:hcm:hwr:cardea:activitymeasure:distance", "UnitURI":"oracle:apps:odin:domain:unit:distance:miles", "Value":"4.1" "links":[ { ...} ] }, { "URI":"oracle:apps:hcm:hwr:cardea:activitymeasure:high_activity_time", "UnitURI":"oracle:apps:odin:domain:unit:time:min", "Value":"22" "links":[ { ...} ] }, { "URI":"oracle:apps:hcm:hwr:cardea:activitymeasure:moderate_activity_time", "UnitURI":"oracle:apps:odin:domain:unit:time:min", "Value":"10"}, "links":[ { ...} ] }, { "URI":"oracle:apps:hcm:hwr:cardea:activitymeasure:low_activity_time", "UnitURI":"oracle:apps:odin:domain:unit:time:min", "Value":"50" "links":[ { ...} ] }, { "URI":"oracle:apps:hcm:hwr:cardea:activitymeasure:calories", "UnitURI":"oracle:apps:odin:domain:unit:energy:kcal", "Value" : "1801" "links":[ { ...} ] } ] }