Zoho Analytics REST API Collection
What is an API Collection?
The Zoho Analytics REST API Postman collection is a curated set of API requests designed to simplify testing and exploring Zoho Analytics APIs across various environments. These pre-configured requests allow seamless interaction with the APIs, making the process efficient and user-friendly. Click here to access the Zoho Analytics REST API Postman Collection.
Why Use an API Collection?
Setting up API environments, defining variables, and managing authorization manually each time you test an API can be challenging. The Zoho Analytics API Postman collection streamlines this process, reducing setup time and minimizing errors.
Using the Zoho Analytics REST API Collection
Follow these steps to fork and use the Zoho Analytics REST API Collection:
Step 1: Install the Postman App
If you haven’t already, download and install the Postman application. It is recommended to use Postman v9 or later for optimal performance.
- System Requirements: Check the necessary system specifications for installing and running the Postman native app.
- Installation Guide: Follow the official guide to set up Postman on your system.
Step 2: Create a Fork
Method 1: Fork via "Run in Postman" Button
To use the API collection in Postman, create a fork in your workspace by clicking the Run in Postman button.
Follow the instruction to create a fork:
- Click the Run in Postman button and select Fork Collection.
- The Fork Collection dialog will open in a new window.
- Enter a name for the fork, select the desired workspace, and enable the Watch Original Collection checkbox to receive updates.
- Click Fork Collection to complete the process. The collection will now be available in your workspace.
Method 2: Search and Fork in Postman App
Alternatively, you can search for the collection within Postman and fork it manually.
- Open the Postman app.
- In the top search bar, type Zoho Analytics Workspace and select Zoho Analytics Rest APIs collection.
- The Zoho Analytics REST APIs collection will open.
- Hover over the collection, click More option, and select Create a Fork.
- Provide a name for your fork, choose a workspace, and click Fork Collection to add it.
Step 3: Set up the environment
After importing the collection, set up the environment either manually or by importing the sample environment file.
To configure the environment variables:
- Navigate to the Environments tab in the left panel.
- Select Zoho Analytics REST Variables and update the following:
- analytics-domain: The domain for Zoho Analytics API requests (e.g., https://analytics.zoho.com).
- accounts-domain: The domain for Zoho Accounts authentication (e.g., https://accounts.zoho.com).
- client-id: Consumer key generated from the connected app during registration.
- client-secret: Consumer secret obtained from the connected app during registration.
- redirect-uri: A valid URL of your application to which Zoho Accounts redirects you with a grant token(code) after successful authentication.
- refresh-token: Token used to obtain new access tokens (automatically added once generated).
- access-token: Token required to access Zoho Analytics APIs (automatically added once generated).
- expiry-time: Time (in seconds) before the access token expires (automatically updated).
- organization-id: Unique identifier for your Zoho Analytics organization.
- dest-organization-id: Target organization ID for data migration or cross-org API requests.
- Once the Environment variables are configured, select the appropriate environment from the Environment Selector in the top-right corner.
Step 4: Invoke the APIs
- Generate a Grant Code: Obtain the grant code from Zoho API Console. To learn more about generating grant code, click here.
- Generate Access and Refresh Tokens: Use the grant code to generate access and refresh tokens. Click here to learn more.
- Add the grant token to the request input field and click Send.
- Set the Authorization type is set to No Auth.
- Once generated, you can start making API calls using the predefined requests.
Keeping Your Forked Collection Updated
To ensure your forked collection stays up to date with the latest changes:
- Hover over your Zoho Analytics REST API Collection.
- Click More options and select Pull Changes.
- Review the updates and click Pull Changes to sync them with your collection.