AI-generated Key Takeaways
-
Learn how to construct HTTP requests to invoke the Fitness REST API for managing data sources, working with datasets, and working with sessions.
-
You need an OAuth token to try the examples provided in the following pages.
-
Example requests can be submitted using either the OAuth Playground or the curl command-line tool.
-
Instructions are provided for submitting requests using both the OAuth Playground and curl, including prerequisites for using curl.
The examples in the following pages show you how to construct HTTP requests to invoke the Fitness REST API:
To try these examples, you need to obtain an OAuth token first. Then you can submit the example requests without having to build an application by either:
- Using the OAuth Playground from your browser.
- Using curl from the command line.
Submit requests with the OAuth Playground
This process is described in Getting Started. The examples indicate the HTTP method to use and provide the request body.
Submit requests with curl
Prerequisites:
- Install curl if it is not installed on your machine.
- Obtain an OAuth token as described in Getting Started.
Fore more information about OAuth tokens and authorization, see Authorizing Requests.
To run each of the examples:
- Copy and paste the request body from the example into a plain text file.
- Copy the
curlcommand from the example and paste it into a terminal window. - Edit the command to replace the OAuth token value and the name of the file that contains the request body.
- Run the resulting command on the terminal.
curl sends the HTTP request with the authorization header and shows the response on the terminal.