Skip to content

REST-API Endpoint #2038

Closed
Closed

Description

@artr3y

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.

  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.

  • Subscribe to receive notifications on status change and new comments.


Steps to reproduce

  1. Create a dataset in Nextcloud Analytics (Internal Database type)

  2. Send a POST request to the v3.0 or v4.0 API endpoint: /apps/analytics/api/3.0/data/{datasetId}/add or /apps/analytics/api/4.0/data/{datasetId}/add

  3. Use Basic Auth with the same account that owns the dataset

  4. Send the following JSON body:

{

  "data": [

    {

      "dimension1": "2026-05-25 12:00:00",

      "dimension2": "Test",

      "value": "42"

    }

  ]

}
  1. Observe the response

Expected behaviour

Data is stored in the dataset and the API returns:

{ "success": true, "message": "Data update successful" }

Actual behaviour

Actual behaviour

The API returns error code 9003 when using v3.0 or v4.0 endpoints with the documented URL format:

json

{
"success": false,
"error": {
"code": 9003,
"message": "Unknown or unauthorized report or dataset"
}
}

Workarounds that do work:

Legacy v2.0 endpoint: /apps/analytics/api/2.0/adddata/{datasetId} ✅

v3.0 endpoint works only when sending body as Raw with application/json content type (not as structured JSON): /apps/analytics/api/3.0/data/{datasetId}/add ✅

Same applies to v4.0: /apps/analytics/api/4.0/data/{datasetId}/add ✅

When using structured JSON body (as documented), all three versions return 9003. Only the Raw body format triggers successful data ingestion on v3.0 and v4.0. The v2.0 endpoint works with both body formats.

This suggests the issue is in how v3.0/v4.0 parses the request body when sent as structured JSON from HTTP clients like Postman or n8n.

Server configuration

Web server: Apache/Nginx

Database: MySQL/MariaDB

PHP version: 8.2/8.3/8.4

Nextcloud version: Hetzner managed Nextcloud instance, no command line access available

List of activated apps

No command line access available (managed Nextcloud instance).

Analytics app is installed and active.

Nextcloud configuration

No command line access available (managed Nextcloud instance).

Browser

Browser name: Firefox

Browser version: latest

Operating system: Windows


Tested via Postman and n8n HTTP Request node.

Postman confirmed: v3.0 and v4.0 return 9003, v2.0 returns success.

Content-Type: application/json

Authentication: Basic Auth (dataset owner account)

Activity

  1. Antreesy commented on May 26, 2026

    @Antreesy
    Collaborator

    Should be reported to https://github.com/rello/analytics probably?

  2. artr3y commented on May 26, 2026

    @artr3y
    Author

    Of course, thanks for pointing it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions