> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. For full content including API reference and SDK examples, see https://learning.postman.com/llms-full.txt.

# Get analytics data

GET https://api.getpostman.com/analytics

Gets analytics data based on the specified resource, metrics, and given filters for team, internal, and public workspaces, as well as Partner Workspaces.

**Note:**

This endpoint only accepts the following resource:metric query parameter combinations:
- `user` — `workspace_active_users`, `active_users`
- `workspace` — `elements_in_workspace`, `active_workspaces`, `api_calls`, `active_collections`, `response_status`, `pending_invites`, `needs_attention`, `success_rate`, `user_requests`, `collection_error_aggregate`
- `team` — `user_api_journey`, `workspace_distribution`, `internal_workspace_distribution`, `license_consumption`, `members`, `last_autoflex_cycle`, `partner_engagement_funnel`
- `ai` — `top_agent_models_by_usage`, `activity_distribution`, `peak_activity`, `usage_leaderboard`, `credit_usage_by_model`, `messages_sent`, `credit_usage`, `agent_mode_sessions`, `new_vs_returning_users`, `agent_mode_users`
- `api_development` — `active_workspaces`, `entity_activity`, `top_entities`
- `api_testing` — `runs`, `functional_test_runs`, `performance_test_runs`
- `api_production` — `monitor_runs`, `flow_executions`
- `api_distribution` — `active_workspaces`, `pvt_network`, `partner`, `public`
- `api_management` — `workspace_activity`

The `view` query parameter only accepts the following values when called with the following resource:metric pairs:
`detailed` or `summary` — `user:active_users`, `workspace:active_workspaces`, `workspace:pending_invites`, `workspace:needs_attention`, `workspace:success_rate`, `team:partner_engagement_funnel`, `api_distribution:pvt_network`, `api_distribution:partner`, `api_distribution:public`
- `detailed`, `summary`, or `trends` — `api_development:entity_activity`, `api_testing:functional_test_runs` , `api_testing:performance_test_runs`, `api_production:monitor_runs`, `api_production:flow_executions`
- `summary` or `trend` — `api_development:active_workspaces`, `api_testing:runs`, `api_distribution:active_workspaces`, `api_management:workspace_activity`
- `summary` only — `workspace:elements_in_workspace`, `workspace:workspace_active_users`, `workspace:api_calls`, `workspace:response_status`, `team:user_api_journey`, `team:workspace_distribution`, `team:internal_workspace_distribution`, `team:license_consumption`
- `detailed` only — `workspace:active_collections`, `workspace:user_requests`, `api_development:top_entities`, `api_management:popular_workspaces`
- `trends` only — No resource:metric pair restrictions.


Reference: https://learning.postman.com/api-docs/api-reference/analytics/get-analytics-data

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Postman API
  version: 1.0.0
paths:
  /analytics:
    get:
      operationId: getAnalyticsData
      summary: Get analytics data
      description: >
        Gets analytics data based on the specified resource, metrics, and given
        filters for team, internal, and public workspaces, as well as Partner
        Workspaces.


        **Note:**


        This endpoint only accepts the following resource:metric query parameter
        combinations:

        - `user` — `workspace_active_users`, `active_users`

        - `workspace` — `elements_in_workspace`, `active_workspaces`,
        `api_calls`, `active_collections`, `response_status`, `pending_invites`,
        `needs_attention`, `success_rate`, `user_requests`,
        `collection_error_aggregate`

        - `team` — `user_api_journey`, `workspace_distribution`,
        `internal_workspace_distribution`, `license_consumption`, `members`,
        `last_autoflex_cycle`, `partner_engagement_funnel`

        - `ai` — `top_agent_models_by_usage`, `activity_distribution`,
        `peak_activity`, `usage_leaderboard`, `credit_usage_by_model`,
        `messages_sent`, `credit_usage`, `agent_mode_sessions`,
        `new_vs_returning_users`, `agent_mode_users`

        - `api_development` — `active_workspaces`, `entity_activity`,
        `top_entities`

        - `api_testing` — `runs`, `functional_test_runs`,
        `performance_test_runs`

        - `api_production` — `monitor_runs`, `flow_executions`

        - `api_distribution` — `active_workspaces`, `pvt_network`, `partner`,
        `public`

        - `api_management` — `workspace_activity`


        The `view` query parameter only accepts the following values when called
        with the following resource:metric pairs:

        `detailed` or `summary` — `user:active_users`,
        `workspace:active_workspaces`, `workspace:pending_invites`,
        `workspace:needs_attention`, `workspace:success_rate`,
        `team:partner_engagement_funnel`, `api_distribution:pvt_network`,
        `api_distribution:partner`, `api_distribution:public`

        - `detailed`, `summary`, or `trends` —
        `api_development:entity_activity`, `api_testing:functional_test_runs` ,
        `api_testing:performance_test_runs`, `api_production:monitor_runs`,
        `api_production:flow_executions`

        - `summary` or `trend` — `api_development:active_workspaces`,
        `api_testing:runs`, `api_distribution:active_workspaces`,
        `api_management:workspace_activity`

        - `summary` only — `workspace:elements_in_workspace`,
        `workspace:workspace_active_users`, `workspace:api_calls`,
        `workspace:response_status`, `team:user_api_journey`,
        `team:workspace_distribution`, `team:internal_workspace_distribution`,
        `team:license_consumption`

        - `detailed` only — `workspace:active_collections`,
        `workspace:user_requests`, `api_development:top_entities`,
        `api_management:popular_workspaces`

        - `trends` only — No resource:metric pair restrictions.
      tags:
        - analytics
      parameters:
        - name: resource
          in: query
          description: >
            Returns metrics and insights for API usage, success, and
            workspace/team trends in Postman:


            - `user` — Data related to individual user activities and engagement
            within Postman workspaces.

            - `team` — Team-level analytics, license consumption, and
            organizational trends.

            - `workspace` — Workspace-level activities, elements, and
            collaboration patterns.

            - `ai` — Analytics related to Agent Mode usage across workspaces,
            covering user activity, model usage, and credit consumption
            patterns.

            - `api_development` — API development activity metrics that include
            workspace counts, entity activity by type (collection, flow, mock,
            specification, sdk), and top entities.

            - `api_testing` — API testing metrics such as total test runs,
            functional test runs (Collection Runner), and performance test runs.

            - `api_production` — API production metrics, including monitor run
            activity and production flow execution activity.

            - `api_distribution` — API distribution metrics, such as active
            workspace counts across distribution channels.

            - `api_management` — API management metrics, such as workspace
            activity, active counts, trends, and top workspaces.
          required: true
          schema:
            $ref: '#/components/schemas/analyticsResource'
        - name: metrics
          in: query
          description: >
            Filters the response by only the given metrics. The metric must
            match the given `resource` value.


            For a list of metrics and their related `resource` value, call the
            GET `/analytics-metadata` endpoint.
          required: true
          schema:
            $ref: '#/components/schemas/analyticsMetrics'
        - name: view
          in: query
          description: |
            The view type for the analytics data:
              - `detailed` — Return extensive information.
              - `summary` — Return aggregated information.
              - `trend` — Return trend information over a duration.
          required: false
          schema:
            $ref: '#/components/schemas/analyticsView'
        - name: workspaceType
          in: query
          description: >-
            A comma-separated list of `internal`, `public`, and `partner`
            workspace types to filter the results by.
          required: false
          schema:
            $ref: '#/components/schemas/analyticsWorkspaceType'
        - name: userId
          in: query
          description: >-
            A comma-separated list of user IDs to filter the results by. Only
            pass this parameter when calling the `user_requests` metric for the
            `workspace` resource.
          required: false
          schema:
            $ref: '#/components/schemas/analyticsUserId'
        - name: duration
          in: query
          description: Filters the response by the given duration.
          required: false
          schema:
            $ref: '#/components/schemas/analyticsDuration'
        - name: requestId
          in: query
          description: >-
            A comma-separated list of unique request IDs (`userId`-`requestId`)
            to filter the response by. Only pass this parameter when using the
            `user_requests` metric.
          required: false
          schema:
            $ref: '#/components/schemas/analyticsRequestId'
        - name: responseStatus
          in: query
          description: >-
            A comma-separated list of HTTP response status codes to filter the
            results by. Accepts values `100` through `600`. Only pass this
            parameter when using the `user_requests` metric.
          required: false
          schema:
            $ref: '#/components/schemas/analyticsResponseStatus'
        - name: attentionType
          in: query
          description: >-
            A comma-separated list of issues types to filter the results by.
            Attention types provide details about issues users or partners are
            facing. Accepts the `high_non_200OK_rate_for_partner` and
            `no_success_on_tried_request` values. Only pass this parameter when
            using the `needs_attention` metric.
          required: false
          schema:
            $ref: '#/components/schemas/analyticsAttentionType'
        - name: period
          in: query
          description: >-
            Filters results for a given period of time (as opposed to a range)
            for supported views. Use a YEAR-MONTH value for month filtering or
            YEAR-MONTH-DAY day filtering.
          required: false
          schema:
            $ref: '#/components/schemas/analyticsPeriod'
        - name: userType
          in: query
          description: Filters results by a specific user type for supported views.
          required: false
          schema:
            $ref: '#/components/schemas/analyticsUserType'
        - name: entityType
          in: query
          description: The type of Postman entity to filter results by.
          required: false
          schema:
            $ref: '#/components/schemas/analyticsEntityType'
        - name: limit
          in: query
          description: The maximum number of rows to return in the response.
          required: false
          schema:
            $ref: '#/components/schemas/limitDefault100Max10000'
            default: 100
        - name: offset
          in: query
          description: The zero-based offset of the first item to return.
          required: false
          schema:
            $ref: '#/components/schemas/offsetMax10000'
            default: 0
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getAnalyticsData'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorTypeTitleDetailStatusInstance'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorTypeTitleDetailStatusInstance'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetAnalyticsDataRequestInternalServerError
servers:
  - url: https://api.getpostman.com
    description: https://api.getpostman.com
  - url: https://api.eu.postman.com
    description: https://api.eu.postman.com
components:
  schemas:
    analyticsResource:
      type: string
      enum:
        - user
        - team
        - workspace
        - ai
        - api_development
        - api_testing
        - api_production
        - api_distribution
        - api_management
      title: analyticsResource
    analyticsMetrics:
      type: string
      enum:
        - active_users
        - workspace_active_users
        - elements_in_workspace
        - active_workspaces
        - api_calls
        - active_collections
        - response_status
        - pending_invites
        - needs_attention
        - success_rate
        - user_requests
        - user_api_journey
        - workspace_distribution
        - internal_workspace_distribution
        - license_consumption
        - members
        - last_autoflex_cycle
        - partner_engagement_funnel
        - collection_error_aggregate
        - agent_mode_users
        - new_vs_returning_users
        - agent_mode_sessions
        - messages_sent
        - credit_usage
        - credit_usage_by_model
        - usage_leaderboard
        - peak_activity
        - activity_distribution
        - top_agent_models_by_usage
        - entity_activity
        - top_entities
        - runs
        - functional_test_runs
        - performance_test_runs
        - monitor_runs
        - flow_executions
        - pvt_network
        - partner
        - public
        - workspace_activity
      title: analyticsMetrics
    analyticsView:
      type: string
      enum:
        - detailed
        - summary
        - trend
      title: analyticsView
    analyticsWorkspaceType:
      type: string
      title: analyticsWorkspaceType
    analyticsUserId:
      type: string
      title: analyticsUserId
    analyticsDuration:
      type: string
      enum:
        - last_30_days
        - last_180_days
        - last_month
        - last_6_months
        - last_7_days
        - last_1_year
      title: analyticsDuration
    analyticsRequestId:
      type: string
      title: analyticsRequestId
    analyticsResponseStatus:
      type: string
      title: analyticsResponseStatus
    analyticsAttentionType:
      type: string
      title: analyticsAttentionType
    analyticsPeriod:
      type: string
      title: analyticsPeriod
    analyticsUserType:
      type: string
      enum:
        - new
        - returning
      title: analyticsUserType
    analyticsEntityType:
      type: string
      enum:
        - collection
        - specification
        - mock
        - flow
        - sdk-collection
        - sdk-specification
      title: analyticsEntityType
    limitDefault100Max10000:
      type: integer
      default: 100
      title: limitDefault100Max10000
    offsetMax10000:
      type: integer
      default: 0
      title: offsetMax10000
    GetAnalyticsDataColumnsDataItemsType:
      type: string
      enum:
        - DATE
        - STRING
        - INTEGER
        - TIMESTAMP
        - BOOLEAN
        - NUMBER
        - FLOAT
      description: The data type of the column.
      title: GetAnalyticsDataColumnsDataItemsType
    GetAnalyticsDataColumnsDataItems:
      type: object
      properties:
        name:
          type: string
          description: The name of the column.
        type:
          $ref: '#/components/schemas/GetAnalyticsDataColumnsDataItemsType'
          description: The data type of the column.
        format:
          type: string
          description: The data type's format.
        description:
          type: string
          description: A description of what the column represents.
      title: GetAnalyticsDataColumnsDataItems
    getAnalyticsDataColumnsData:
      type: array
      items:
        $ref: '#/components/schemas/GetAnalyticsDataColumnsDataItems'
      description: A list of column entries.
      title: getAnalyticsDataColumnsData
    getAnalyticsDataSchema:
      type: object
      properties:
        columns:
          $ref: '#/components/schemas/getAnalyticsDataColumnsData'
      title: getAnalyticsDataSchema
    GetAnalyticsDataRowsDataItemsItems:
      oneOf:
        - type: string
        - type: integer
        - type: number
          format: double
        - type: boolean
      title: GetAnalyticsDataRowsDataItemsItems
    getAnalyticsDataRowsData:
      type: array
      items:
        type: array
        items:
          $ref: '#/components/schemas/GetAnalyticsDataRowsDataItemsItems'
      description: >-
        A list of data row entries. Each row is an array of values that
        correspond to the columns defined in the schema.
      title: getAnalyticsDataRowsData
    getAnalyticsDataPaginationData:
      type: object
      properties:
        total:
          type: integer
          description: The total number of records available.
        limit:
          type: integer
          description: The maximum number of records returned in the response.
        offset:
          type: integer
          description: The number of records skipped.
        has_more:
          type: boolean
          description: Indicates whether more are records available.
      description: Information about the response pagination.
      title: getAnalyticsDataPaginationData
    getAnalyticsDataObject:
      type: object
      properties:
        schema:
          $ref: '#/components/schemas/getAnalyticsDataSchema'
        rows:
          $ref: '#/components/schemas/getAnalyticsDataRowsData'
        pagination:
          $ref: '#/components/schemas/getAnalyticsDataPaginationData'
      description: Data analytics information.
      title: getAnalyticsDataObject
    getAnalyticsDataSummary:
      type: object
      properties:
        summary:
          $ref: '#/components/schemas/getAnalyticsDataObject'
      required:
        - summary
      title: getAnalyticsDataSummary
    getAnalyticsDataAllPartners:
      type: object
      properties:
        schema:
          $ref: '#/components/schemas/getAnalyticsDataSchema'
        rows:
          $ref: '#/components/schemas/getAnalyticsDataRowsData'
        pagination:
          $ref: '#/components/schemas/getAnalyticsDataPaginationData'
      description: Information about partner users and their activity.
      title: getAnalyticsDataAllPartners
    getAnalyticsDataPartnerWorkspaceVisited:
      type: object
      properties:
        schema:
          $ref: '#/components/schemas/getAnalyticsDataSchema'
        rows:
          $ref: '#/components/schemas/getAnalyticsDataRowsData'
        pagination:
          $ref: '#/components/schemas/getAnalyticsDataPaginationData'
      description: Information about partner users' workspace visits.
      title: getAnalyticsDataPartnerWorkspaceVisited
    GetAnalyticsDataPartnersViewedCollectionSchema:
      type: object
      properties:
        columns:
          $ref: '#/components/schemas/getAnalyticsDataColumnsData'
      title: GetAnalyticsDataPartnersViewedCollectionSchema
    getAnalyticsDataPartnersViewedCollection:
      type: object
      properties:
        schema:
          $ref: '#/components/schemas/GetAnalyticsDataPartnersViewedCollectionSchema'
        rows:
          $ref: '#/components/schemas/getAnalyticsDataRowsData'
        pagination:
          $ref: '#/components/schemas/getAnalyticsDataPaginationData'
      description: Information about partner users' views of collections in a workspace.
      title: getAnalyticsDataPartnersViewedCollection
    GetAnalyticsDataPartnerRequestSentSchema:
      type: object
      properties:
        columns:
          $ref: '#/components/schemas/getAnalyticsDataColumnsData'
      title: GetAnalyticsDataPartnerRequestSentSchema
    getAnalyticsDataPartnerRequestSent:
      type: object
      properties:
        schema:
          $ref: '#/components/schemas/GetAnalyticsDataPartnerRequestSentSchema'
        rows:
          $ref: '#/components/schemas/getAnalyticsDataRowsData'
        pagination:
          $ref: '#/components/schemas/getAnalyticsDataPaginationData'
      description: Information about requests sent by partner users.
      title: getAnalyticsDataPartnerRequestSent
    GetAnalyticsDataPartnerRequestSent200OkSchema:
      type: object
      properties:
        columns:
          $ref: '#/components/schemas/getAnalyticsDataColumnsData'
      title: GetAnalyticsDataPartnerRequestSent200OkSchema
    getAnalyticsDataPartnerRequestSent200OK:
      type: object
      properties:
        schema:
          $ref: '#/components/schemas/GetAnalyticsDataPartnerRequestSent200OkSchema'
        rows:
          $ref: '#/components/schemas/getAnalyticsDataRowsData'
        pagination:
          $ref: '#/components/schemas/getAnalyticsDataPaginationData'
      description: >-
        Information about partner users' successful request calls in a
        workspace.
      title: getAnalyticsDataPartnerRequestSent200OK
    getAnalyticsDataPartnerEngagmentFunnel:
      type: object
      properties:
        all_partners:
          $ref: '#/components/schemas/getAnalyticsDataAllPartners'
        workspace_visited:
          $ref: '#/components/schemas/getAnalyticsDataPartnerWorkspaceVisited'
        viewed_collection:
          $ref: '#/components/schemas/getAnalyticsDataPartnersViewedCollection'
        request_sent:
          $ref: '#/components/schemas/getAnalyticsDataPartnerRequestSent'
        successful_requests_200OK:
          $ref: '#/components/schemas/getAnalyticsDataPartnerRequestSent200OK'
      title: getAnalyticsDataPartnerEngagmentFunnel
    GetAnalyticsDataData:
      oneOf:
        - $ref: '#/components/schemas/getAnalyticsDataSummary'
        - $ref: '#/components/schemas/getAnalyticsDataPartnerEngagmentFunnel'
      title: GetAnalyticsDataData
    getAnalyticsData:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/GetAnalyticsDataData'
      required:
        - data
      title: getAnalyticsData
    CommonErrorTypeTitleDetailStatusType:
      oneOf:
        - type: string
          format: uri-reference
        - type: string
      title: CommonErrorTypeTitleDetailStatusType
    commonErrorTypeTitleDetailStatus:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/CommonErrorTypeTitleDetailStatusType'
        title:
          type: string
          description: A short summary of the problem.
        detail:
          type: string
          description: Information about the error.
        status:
          type: integer
          description: The error's HTTP status code.
      title: commonErrorTypeTitleDetailStatus
    commonErrorTypeTitleDetailStatusInstance:
      type: object
      properties:
        type:
          type: string
          format: uri-reference
          description: >-
            The [URI reference](https://www.rfc-editor.org/rfc/rfc3986) that
            identifies the type of problem.
        title:
          type: string
          description: A short summary of the problem.
        detail:
          type: string
          description: An explanation about the problem.
        status:
          type: integer
          description: The HTTP status code generated by the origin server.
        instance:
          type: string
          description: >-
            The URI reference that identifies the specific occurrence of the
            problem.
      title: commonErrorTypeTitleDetailStatusInstance
    CommonErrorTypeTitleDetailDetail:
      oneOf:
        - type: string
        - type: object
          additionalProperties:
            description: Any type
      description: Information about the error.
      title: CommonErrorTypeTitleDetailDetail
    commonErrorTypeTitleDetail:
      type: object
      properties:
        type:
          type: string
          description: The type of error.
        title:
          type: string
          description: A short summary of the problem.
        detail:
          $ref: '#/components/schemas/CommonErrorTypeTitleDetailDetail'
          description: Information about the error.
      title: commonErrorTypeTitleDetail
    CommonErrorNameMessageError:
      type: object
      properties:
        name:
          type: string
          description: The error name.
        message:
          type: string
          description: The error message.
      description: Information about the error.
      title: CommonErrorNameMessageError
    commonErrorNameMessage:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/CommonErrorNameMessageError'
          description: Information about the error.
      title: commonErrorNameMessage
    GetAnalyticsDataRequestInternalServerError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetail'
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: GetAnalyticsDataRequestInternalServerError
  securitySchemes:
    PostmanApiKey:
      type: apiKey
      in: header
      name: x-api-key
    scimApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        A valid [SCIM API
        key](https://learning.postman.com/docs/administration/scim-provisioning/scim-provisioning-overview/#generating-scim-api-key)
        for calls to SCIM endpoints.
    basicAuth:
      type: http
      scheme: basic

```

## Examples

### Top Five Users



**Response**

```json
{
  "data": {
    "summary": {
      "pagination": {
        "has_more": true,
        "limit": 3,
        "offset": 0,
        "total": 42
      },
      "rows": [
        [
          "2025-03-01",
          "12345678",
          0,
          "2022-06-10",
          "2025-08-25T18:10:00Z"
        ],
        [
          "2025-04-01",
          "87654321",
          0,
          "2022-08-14",
          "2025-08-24T21:30:00Z"
        ],
        [
          "2025-05-01",
          56781234,
          0,
          "2023-01-03",
          "2025-08-23T19:45:00Z"
        ]
      ],
      "schema": {
        "columns": [
          {
            "description": "Date representing the reporting timestamp.",
            "name": "timestamp",
            "type": "DATE"
          },
          {
            "description": "Unique identifier assigned to the user.",
            "name": "user_id",
            "type": "STRING"
          },
          {
            "description": "Total number of API requests made by the user.",
            "name": "api_requests_count",
            "type": "INTEGER"
          },
          {
            "description": "Date when the user joined the team.",
            "name": "team_joining_date",
            "type": "DATE"
          },
          {
            "description": "Timestamp of the user's most recent activity.",
            "name": "last_active_ts",
            "type": "TIMESTAMP"
          }
        ]
      }
    }
  }
}
```

**SDK Code**

```python Top Five Users
import requests

url = "https://api.getpostman.com/analytics"

querystring = {"metrics":"active_users","resource":"user"}

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Top Five Users
const url = 'https://api.getpostman.com/analytics?metrics=active_users&resource=user';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Top Five Users
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/analytics?metrics=active_users&resource=user"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Top Five Users
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/analytics?metrics=active_users&resource=user")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Top Five Users
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.getpostman.com/analytics?metrics=active_users&resource=user")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Top Five Users
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.getpostman.com/analytics?metrics=active_users&resource=user', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Top Five Users
using RestSharp;

var client = new RestClient("https://api.getpostman.com/analytics?metrics=active_users&resource=user");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Top Five Users
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/analytics?metrics=active_users&resource=user")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Partner Workspace Engagement Funnel



**Response**

```json
{
  "data": {
    "all_partners": {
      "pagination": {
        "has_more": true,
        "limit": 3,
        "offset": 0,
        "total": 132
      },
      "rows": [
        [
          "12345678",
          "2026-01-23T00:00:00.000Z"
        ],
        [
          "87654321",
          "2026-01-23T00:00:00.000Z"
        ],
        [
          "56781234",
          "2026-01-23T00:00:00.000Z"
        ]
      ],
      "schema": {
        "columns": [
          {
            "description": "Unique identifier of the partner user.",
            "name": "user_id",
            "type": "STRING"
          },
          {
            "description": "Time when the partner activity was recorded.",
            "format": "YYYY-MM-DDTHH:MM:SSZ",
            "name": "timestamp",
            "type": "TIMESTAMP"
          }
        ]
      }
    },
    "request_sent": {
      "pagination": {
        "has_more": false,
        "limit": 3,
        "offset": 0,
        "total": 3
      },
      "rows": [
        [
          "12345678",
          "2026-01-23T00:00:00.000Z"
        ],
        [
          "87654321",
          "2026-01-23T00:00:00.000Z"
        ],
        [
          "56781234",
          "2026-01-23T00:00:00.000Z"
        ]
      ],
      "schema": {
        "columns": [
          {
            "description": "Unique identifier of the partner user.",
            "name": "user_id",
            "type": "STRING"
          },
          {
            "description": "Time when the partner activity was recorded.",
            "format": "YYYY-MM-DDTHH:MM:SSZ",
            "name": "timestamp",
            "type": "TIMESTAMP"
          }
        ]
      }
    },
    "successful_requests_200OK": {
      "pagination": {
        "has_more": false,
        "limit": 3,
        "offset": 0,
        "total": 3
      },
      "rows": [
        [
          "12345678",
          "2026-01-23T00:00:00.000Z"
        ],
        [
          "87654321",
          "2026-01-23T00:00:00.000Z"
        ],
        [
          "56781234",
          "2026-01-23T00:00:00.000Z"
        ]
      ],
      "schema": {
        "columns": [
          {
            "description": "Unique identifier of the partner user.",
            "name": "user_id",
            "type": "STRING"
          },
          {
            "description": "Time when the partner activity was recorded.",
            "format": "YYYY-MM-DDTHH:MM:SSZ",
            "name": "timestamp",
            "type": "TIMESTAMP"
          }
        ]
      }
    },
    "viewed_collection": {
      "pagination": {
        "has_more": true,
        "limit": 3,
        "offset": 0,
        "total": 6
      },
      "rows": [
        [
          "12345678",
          "2026-01-23T00:00:00.000Z"
        ],
        [
          "87654321",
          "2026-01-23T00:00:00.000Z"
        ],
        [
          "56781234",
          "2026-01-23T00:00:00.000Z"
        ]
      ],
      "schema": {
        "columns": [
          {
            "description": "Unique identifier of the partner user.",
            "name": "user_id",
            "type": "STRING"
          },
          {
            "description": "Time when the partner activity was recorded.",
            "format": "YYYY-MM-DDTHH:MM:SSZ",
            "name": "timestamp",
            "type": "TIMESTAMP"
          }
        ]
      }
    },
    "workspace_visited": {
      "pagination": {
        "has_more": true,
        "limit": 3,
        "offset": 0,
        "total": 7
      },
      "rows": [
        [
          "12345678",
          "2026-01-23T00:00:00.000Z"
        ],
        [
          "87654321",
          "2026-01-23T00:00:00.000Z"
        ],
        [
          "56781234",
          "2026-01-23T00:00:00.000Z"
        ]
      ],
      "schema": {
        "columns": [
          {
            "description": "Unique identifier of the partner user.",
            "name": "user_id",
            "type": "STRING"
          },
          {
            "description": "Time when the partner activity was recorded.",
            "format": "YYYY-MM-DDTHH:MM:SSZ",
            "name": "timestamp",
            "type": "TIMESTAMP"
          }
        ]
      }
    }
  }
}
```

**SDK Code**

```python Partner Workspace Engagement Funnel
import requests

url = "https://api.getpostman.com/analytics"

querystring = {"metrics":"active_users","resource":"user"}

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Partner Workspace Engagement Funnel
const url = 'https://api.getpostman.com/analytics?metrics=active_users&resource=user';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Partner Workspace Engagement Funnel
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/analytics?metrics=active_users&resource=user"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Partner Workspace Engagement Funnel
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/analytics?metrics=active_users&resource=user")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Partner Workspace Engagement Funnel
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.getpostman.com/analytics?metrics=active_users&resource=user")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Partner Workspace Engagement Funnel
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.getpostman.com/analytics?metrics=active_users&resource=user', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Partner Workspace Engagement Funnel
using RestSharp;

var client = new RestClient("https://api.getpostman.com/analytics?metrics=active_users&resource=user");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Partner Workspace Engagement Funnel
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/analytics?metrics=active_users&resource=user")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```