Skip to content

docs: Document Cloud API space/room composite endpoints#21942

Open
Ancairon wants to merge 1 commit intomasterfrom
docs/cloud-api-space-room-endpoints
Open

docs: Document Cloud API space/room composite endpoints#21942
Ancairon wants to merge 1 commit intomasterfrom
docs/cloud-api-space-room-endpoints

Conversation

@Ancairon
Copy link
Member

@Ancairon Ancairon commented Mar 12, 2026

Summary

This PR adds comprehensive documentation for Netdata Cloud API space/room composite endpoints, addressing the user query from issue #620.

Changes

  • Added new section "Cloud API Space/Room Composite Endpoints" to `api-tokens.md`
  • Documented the `POST /api/v1/spaces/{spaceID}/rooms/{roomID}/data` endpoint
  • Included detailed request body structure with:
    • Aggregation methods (avg, min, max, sum)
    • Grouping options (dimension, node, chart, label)
    • Time grouping configuration
  • Added working curl example for querying aggregated data
  • Created API version mapping table clarifying:
    • Agent API v3 (stable) vs v1/v2 (deprecated)
    • Cloud API v1 for space/room composite queries
    • Cloud API v2 for listing resources

Context

The user was attempting to use `/api/v3/spaces/.../rooms/.../data` but receiving 404 errors. This documentation clarifies that:

  1. Cloud API uses v1 (not v3) for space/room composite endpoints
  2. The correct endpoint pattern is `/api/v1/spaces/{spaceID}/rooms/{roomID}/data`
  3. This endpoint supports the aggregation and grouping features the user needs

Related


Summary by cubic

Adds documentation for Netdata Cloud space/room composite endpoints. Clarifies how to run multi-node aggregated queries and which API versions to use.

  • New Features
    • New section in api-tokens.md for POST /api/v1/spaces/{spaceID}/rooms/{roomID}/data.
    • Describes request body structure: aggregations, grouping, and time grouping.
    • Adds a working curl example for aggregated queries.
    • Explains API version mapping: Agent API v3 (agent queries), Cloud API v1 (space/room composites), Cloud API v2 (listing resources).

Written for commit f13ede7. Summary will update on new commits.

Add comprehensive documentation for Cloud API space/room composite endpoints including:
- POST /api/v1/spaces/{spaceID}/rooms/{roomID}/data endpoint
- Aggregation methods (avg/min/max/sum)
- Grouping options (dimension/node/chart/label)
- Time grouping configuration
- API version mapping between Agent API v3 and Cloud API v1/v2
- Practical curl example with aggregations

This addresses user confusion about the correct endpoint structure and API versioning for aggregated multi-node queries.
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Netdata Docs Bot seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.
Architecture diagram
sequenceDiagram
    participant Client as External Client
    participant Gateway as Cloud API Gateway
    participant Auth as Auth Service
    participant QueryEng as Cloud Query Engine
    participant Agents as Netdata Agents (Nodes)

    Note over Client,Agents: NEW: Multi-Node Aggregated Data Flow (Cloud API v1)

    Client->>Gateway: POST /api/v1/spaces/{sID}/rooms/{rID}/data
    Note right of Client: Body: { aggregations, scope, format: "json2" }

    Gateway->>Auth: Validate API Token (scope:all)
    Auth-->>Gateway: Authorized

    Gateway->>QueryEng: Execute composite query
    
    QueryEng->>QueryEng: NEW: Resolve Space/Room to Node List
    
    rect rgb(23, 37, 84)
    Note right of QueryEng: Parallel Data Retrieval
    loop For each Node in Room/Scope
        QueryEng->>Agents: Fetch metrics (via ACLK)
        Agents-->>QueryEng: Raw metric data
    end
    end

    QueryEng->>QueryEng: CHANGED: Apply aggregation logic<br/>(avg, min, max, sum)
    
    QueryEng->>QueryEng: CHANGED: Apply grouping<br/>(dimension, node, chart, label)

    QueryEng-->>Gateway: Formatted Result (json2)
    Gateway-->>Client: 200 OK (Aggregated Dataset)

    Note over Client,Gateway: API Version Comparison
    alt Listing Resources
        Client->>Gateway: GET /api/v2/spaces | /api/v2/nodes
    else Direct Agent Query (Non-Cloud)
        Client->>Agents: GET /api/v3/data
    end
Loading

@Ancairon
Copy link
Member Author

@ktsaou @ilyam8 this is an example where I am not sure if this is the best way to address this

on occassions where we don't agree with the edit, we should review and do the changes.

@ilyam8

This comment was marked as resolved.

@Ancairon

This comment was marked as resolved.

@ilyam8

This comment was marked as resolved.

@Ancairon Ancairon changed the title (audit) Document Cloud API space/room composite endpoints docs: Document Cloud API space/room composite endpoints Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

monitor JVM and applications on java?

3 participants