MuviaDevelopers
Guides: Getting started

Getting started

The Muvia public API lets an integration read its own company's Muvia data: the company, its projects, the datasets of each project and the rows they hold, and the nodes that collect the data. Version 1 is read-only.

Every request carries an API key. A key belongs to one company and only ever sees that company's data.

Base URL

The base URL is the server shown at the top of the API Reference. On the dev environment it is:

https://dev-api-muvia.oncode.it/api/public

Every v1 path starts with /v1, so the company's projects are at https://dev-api-muvia.oncode.it/api/public/v1/projects.

1. Get an API key

A company administrator issues keys in Muvia, under Settings → Company → API keys. A key has a name, a lifetime in days (90 by default, at most 3650) and the scopes the integration needs — for example settings_read to list projects and datasets_read to read datasets.

The key, mvk_<key_id>_<secret>, is shown once, when it is issued. Store it in a secret manager. A lost key cannot be recovered: revoke it and issue a new one.

2. Make your first request

curl -H "X-Api-Key: mvk_…" https://dev-api-muvia.oncode.it/api/public/v1/projects

The answer is one page of the company's projects:

{
  "items": [
    {
      "id": "66f1a2b3c4d5e6f708192a3b",
      "name": "Line 3 monitoring",
      "description": "Sensors on the third production line",
      "is_default": true,
      "created_at": "2026-05-12T08:30:00Z",
      "updated_at": "2026-09-20T14:05:12Z"
    }
  ],
  "total": 1,
  "page": 1,
  "size": 50,
  "pages": 1
}

From a project, read its datasets, then a dataset's rows:

curl -H "X-Api-Key: mvk_…" \
  https://dev-api-muvia.oncode.it/api/public/v1/projects/<project_id>/datasets

curl -H "X-Api-Key: mvk_…" \
  "https://dev-api-muvia.oncode.it/api/public/v1/projects/<project_id>/datasets/<dataset_id>/rows?size=100"

The API Reference has the full schema of every resource.

3. Handle errors

Every error answers with the same envelope:

{
  "error": {
    "code": "unauthorized",
    "message": "Invalid or missing API key",
    "status": 401
  }
}

Branch on code, never on message. The Errors guide lists every code.

What v1 offers

Resource Endpoints Scope
Company GET /v1/company settings_read
Projects GET /v1/projects, GET /v1/projects/{project_id} settings_read
Datasets GET /v1/projects/{project_id}/datasets, GET /v1/projects/{project_id}/datasets/{dataset_id} datasets_read
Dataset rows GET /v1/projects/{project_id}/datasets/{dataset_id}/rows datasets_read
Nodes GET /v1/projects/{project_id}/nodes, GET /v1/projects/{project_id}/nodes/{node_id} nodes_read

The datasets of a project are the project's own datasets plus the physical datasets of the project's database.

Next steps

  • Authentication — the header, the key format, expiry and revocation.
  • Scopes — what a key is allowed to read.
  • Pagination — walking lists and dataset rows.
  • Rate limits — how much you can call, and how to back off.
  • Webhooks — events pushed to you instead of polling.