Table of contents
Official Content
  • This documentation is valid for:

This API provides access to the data and metrics available in the User tab in Adoption Dashboard.

Check the generic variables needed to use the API.

Endpoints

Method Path Description
GET /analytics/requests/total-active-users Returns the total number of users who have made a request and, thus, been active within the selected period.
GET /analytics/requests/total-active-projects Returns the total number of projects with requests and activity in the selected period.
GET /analytics/requests/total-active-agents Provides the total number of agents that have been active and received requests.
GET /analytics/requests/average-requests-per-day Provides the average number of requests made per day.
GET /analytics/requests/average-users-per-project Returns the average number of users who made requests for each of the displayed projects.
GET /analytics/requests/average-users-per-agent Provides the average number of users who made requests in the displayed Agents.
GET /analytics/requests/top-10-agents-by-requests Lists the top 10 Agents ranked by the number of requests.
GET /analytics/requests/top-10-users-by-requests Lists the top 10 users who made the most requests, ranked by number.
GET /analytics/requests/top-10-agents-by-tokens Lists the top 10 Agents ranked by the number of tokens processed.
GET /analytics/requests/total-requests-per-day Returns the number of requests made per day.
GET /analytics/requests/agent-usage-per-user Returns cost, request count, and token usage grouped by user.

Authentication

All endpoints require authentication using one of the following:

  • Authorization: Bearer $GEAI_APITOKEN
  • Authorization: Bearer $OAuth_accesstoken

For $OAuth_accesstoken, you must also include the header: ProjectId: $PROJECT_ID (otherwise, this and OrganizationId:$ORGANIZATION_ID headers are optional) Some endpoints may require additional headers such as:

  • Content-Type: application/json

GET /analytics/requests/total-active-users

Returns the total number of users who have been active within the selected period, supporting user engagement analysis.

Parameters

Name Type Description
startDate string Start date for the query (YYYY-MM-DD)
endDate string End date for the query (YYYY-MM-DD)
agentName string Agent name (optional)

Request

  • Method: GET
  • Path: $BASE_URL/v1/analytics/requests/total-active-users
  • Body: Empty

Response

json
{
  "totalActiveUsers": integer                                       // Number of total active users.
}

cURL Sample

curl -X GET "$BASE_URL/v1/analytics/requests/total-active-users?startDate=2024-01-01&endDate=2024-01-31&agentName=" \
  -H "Authorization: Bearer $GEAI_APITOKEN" \
  -H "Content-Type: application/json" \
  -H "organization-id: $GEAI_ORGANIZATIONID" \    
-H "project-id: $GEAI_PROJECTID"

GET /analytics/requests/total-active-projects

Returns the total number of projects with requests and activity in the selected period, enabling project engagement and adoption tracking.

Parameters

Name Type Description
startDate string Start date for the query (YYYY-MM-DD)
endDate string End date for the query (YYYY-MM-DD)
agentName string Agent name (optional)

Request

  • Method: GET
  • Path: $BASE_URL/v1/analytics/requests/total-active-projects
  • Body: Empty

Response

{
  "totalActiveProjects": integer                                // Total number of active projects in requested period.
}

cURL Sample

curl -X GET "$BASE_URL/v1/analytics/requests/total-active-projects?startDate=2024-01-01&endDate=2024-01-31&agentName=" \
  -H "Authorization: Bearer $GEAI_APITOKEN" \
  -H "Content-Type: application/json" \
 -H "organization-id: $GEAI_ORGANIZATIONID" \    
 -H "project-id: $GEAI_PROJECTID"

GET /analytics/requests/total-active-agents

Provides the total number of Agents that have received requests and been active, supporting analysis of Agent utilization.

Parameters

Name Type Description
startDate string Start date for the query (YYYY-MM-DD)
endDate string End date for the query (YYYY-MM-DD)
agentName string Agent name (optional)

Request

  • Method: GET
  • Path: $BASE_URL/v1/analytics/requests/total-active-agents
  • Body: Empty

Response

{
  "totalActiveAgents": integer                                // Total number of Agents which are active in the requested period.
}

cURL Sample

curl -X GET "$BASE_URL/v1/analytics/requests/total-active-agents?startDate=2024-01-01&endDate=2024-01-31&agentName=" \
  -H "Authorization: Bearer $GEAI_APITOKEN" \
  -H "Content-Type: application/json" \
  -H "organization-id: $GEAI_ORGANIZATIONID" \    
 -H "project-id: $GEAI_PROJECTID"

GET /analytics/requests/average-requests-per-day

Returns the average number of requests made per day, supporting overall platform usage analysis.

Parameters

Name Type Description
startDate string Start date for the query (YYYY-MM-DD)
endDate string End date for the query (YYYY-MM-DD)
agentName string Agent name (optional)

Request

  • Method: GET
  • Path: $BASE_URL/v1/analytics/requests/average-requests-per-day
  • Body: Empty

Response

{
  "averageRequests": number                                                                       // Average number of daily requests in the selected period.
}

cURL Sample

curl -X GET "$BASE_URL/v1/analytics/requests/average-requests-per-day?startDate=2024-01-01&endDate=2024-01-31&agentName=" \
  -H "Authorization: Bearer $GEAI_APITOKEN" \
  -H "Content-Type: application/json" \
  -H "organization-id: $GEAI_ORGANIZATIONID" \    
-H "project-id: $GEAI_PROJECTID"

GET /analytics/requests/average-users-per-project

Returns the average number of requests from users per project, supporting analysis of project collaboration and adoption.

Parameters

Name Type Description
startDate string Start date for the query (YYYY-MM-DD)
endDate string End date for the query (YYYY-MM-DD)
agentName string Agent name (optional)

Request

  • Method: GET
  • Path: $BASE_URL/v1/analytics/requests/average-users-per-project
  • Body: Empty

Response

{
  "averageUsers": number                             // Number of average users in the requested period.
}

cURL Sample

curl -X GET "$BASE_URL/v1/analytics/requests/average-users-per-project?startDate=2024-01-01&endDate=2024-01-31&agentName=" \
  -H "Authorization: Bearer $GEAI_APITOKEN" \
  -H "Content-Type: application/json" \
  -H "organization-id: $GEAI_ORGANIZATIONID" \    
-H "project-id: $GEAI_PROJECTID"

GET /analytics/requests/average-users-per-agent

Returns the average number per Agent of users who made requests.

Parameters

Name Type Description
startDate string Start date for the query (YYYY-MM-DD)
endDate string End date for the query (YYYY-MM-DD)
agentName string Agent name (optional)

Request

  • Method: GET
  • Path: $BASE_URL/v1/analytics/requests/average-users-per-agent
  • Body: Empty

Response

json
{
  "averageUsers": number // Number of average users of the selected Agent in the selected period.
}

cURL Sample

bash
curl -X GET "$BASE_URL/v1/analytics/requests/average-users-per-agent?startDate=2024-01-01&endDate=2024-01-31&agentName=" \
  -H "Authorization: Bearer $GEAI_APITOKEN" \
  -H "Content-Type: application/json" \
  -H "organization-id: $GEAI_ORGANIZATIONID" \    
-H "project-id: $GEAI_PROJECTID"

GET /analytics/requests/top-10-agents-by-requests

Lists the top 10 Agents ranked by the number of requests, supporting identification of the most used Agents.

Parameters

Name Type Description
startDate string Start date for the query (YYYY-MM-DD)
endDate string End date for the query (YYYY-MM-DD)
agentName string Agent name (optional)

Request

  • Method: GET
  • Path: $BASE_URL/v1/analytics/requests/
  • Body: Empty

Response

json

{
  "top10Agents": [
    {
      "agent": "string",                                           // Agent’s name.
      "totalRequests": integer                               // Total number of requests for the Agent above (repeats one entry for each Top 10 Agent).
    }
 ]
}

cURL Sample

curl -X GET "$BASE_URL/v1/analytics/requests/top-10-agents-by-requests?startDate=2024-01-01&endDate=2024-01-31&agentName=" \
  -H "Authorization: Bearer $GEAI_APITOKEN" \
  -H "Content-Type: application/json" \
  -H "organization-id: $GEAI_ORGANIZATIONID" \    
-H "project-id: $GEAI_PROJECTID"

GET /analytics/requests/top-10-users-by-requests

Lists the top 10 users ranked by the number of requests made, supporting identification of the most engaged users.

Parameters

Name Type Description
startDate string Start date for the query (YYYY-MM-DD)
endDate string End date for the query (YYYY-MM-DD)
agentName string Agent name (optional)

Request

  • Method: GET
  • Path: $BASE_URL/v1/analytics/requests/top-10-users-by-requests
  • Body: Empty

Response

{
  "top10Users": [
    {
      "totalRequests": integer,                 // Number of requests for this specific Top 10 users.
      "user": "string"                              // Typically email address.
    },
    {
      "totalRequests": integer,
      "user": "string"
    },
    {
      "totalRequests": integer,
      "user": "string"
    },
    {
      "totalRequests": integer,
      "user": "string"
    },
    {
      "totalRequests": integer,
      "user": "string"
    },
    {
      "totalRequests": integer,
      "user": "string"
    }
  ]
}

cURL Sample

bash
curl -X GET "$BASE_URL/v1/analytics/requests/top-10-users-by-requests?startDate=2024-01-01&endDate=2024-01-31&agentName=" \
  -H "Authorization: Bearer $GEAI_APITOKEN" \
  -H "Content-Type: application/json" \
  -H "organization-id: $GEAI_ORGANIZATIONID" \    
-H "project-id: $GEAI_PROJECTID"

GET /analytics/requests/top-10-agents-by-tokens

Lists the top 10 Agents ranked by the number of tokens processed, supporting workload and resource consumption analysis per Agent.

Parameters

Name Type Description
startDate string Start date for the query (YYYY-MM-DD)
endDate string End date for the query (YYYY-MM-DD)
agentName string Agent name (optional)

Request

  • Method: GET
  • Path: $BASE_URL/v1/analytics/requests/top-10-agents-by-tokens
  • Body: Empty

Response

json
{
  "top10Agents": [
    {
      "agent": "string",                          // Agent’s name.
      "totalTokens": integer                   // Total number of tokens consumed by the Agent above (repeats one entry for each Top 10 Agent).
    }
  ]
}

cURL Sample

bash
curl -X GET "$BASE_URL/v1/analytics/requests/top-10-agents-by-tokens?startDate=2024-01-01&endDate=2024-01-31&agentName=" \
  -H "Authorization: Bearer $GEAI_APITOKEN" \
  -H "Content-Type: application/json" \
  -H "organization-id: $GEAI_ORGANIZATIONID" \    
-H "project-id: $GEAI_PROJECTID"

GET /analytics/requests/total-requests-per-day

Returns the number of requests made per day.

Parameters

Name Type Description
startDate string Start date for the query (YYYY-MM-DD)
endDate string End date for the query (YYYY-MM-DD)
agentName string Agent name (optional)

Request

  • Method: GET
  • Path: $BASE_URL/v1/analytics/requests/total-requests-per-day
  • Body: Empty

Response

json
{
  "totalRequestsPerDay": [
    {
      "date": "string",                                             // Format YYYY-MM-DD (one response for each day of the requested period).
      "totalRequests": integer,                           // Total requests during the date specified above
      "totalRequestsWithError": integer              // Total requests with error during the date specified above.
    }
  ]
}

cURL Sample

bash
curl -X GET "$BASE_URL/v1/analytics/requests/total-requests-per-day?startDate=2024-01-01&endDate=2024-01-31&agentName=" \
  -H "Authorization: Bearer $GEAI_APITOKEN" \
  -H "Content-Type: application/json" \
  -H "organization-id: $GEAI_ORGANIZATIONID" \    
-H "project-id: $GEAI_PROJECTID"

GET /analytics/requests/agent-usage-per-user

Returns the cost, number of requests, and token usage grouped by user, supporting detailed user-level resource and billing analysis.

Parameters

Name Type Description
startDate string Start date for the query (YYYY-MM-DD)
endDate string End date for the query (YYYY-MM-DD)
agentName string Agent name (optional)

Request

  • Method: GET
  • Path: $BASE_URL/v1/analytics/requests/agent-usage-per-user
  • Body: Empty

Response

json
{
  "agentUsage": [
    {
      "totalCost": number,                                 // Expressed in USD.
      "totalRequests": integer,                          // Total requests made by users for this Agent.
      "totalTokens": integer,                             // Total tokens consumed by this Agent.
      "user": "string"                                      // User’s ID, typically email (repeats one entry per user)
    }
  ]
}

cURL Sample

bash
curl -X GET "$BASE_URL/v1/analytics/requests/agent-usage-per-user?startDate=2024-01-01&endDate=2024-01-31&agentName=" \
  -H "Authorization: Bearer $GEAI_APITOKEN" \
  -H "Content-Type: application/json" \
  -H "organization-id: $GEAI_ORGANIZATIONID" \    
-H "project-id: $GEAI_PROJECTID"

Availability

Since version 2025-09.

Last update: December 2025 | © GeneXus. All rights reserved. GeneXus Powered by Globant