API and MCP

REST API

Manage versions, files and publishing over HTTP.

Base URL: https://<your-veresk-host>/api/v1. Authenticate with an API token.

The complete, always up-to-date reference with request and response schemas is served by your Veresk instance at /api/v1/docs (Swagger). This page explains how the pieces fit together.

Projects are created and configured in the Veresk interface. The API works with existing projects.

Endpoints

AreaWhat you can do
AccountGET /me
ProjectsList projects you can access; get one
VersionsList, create from a parent, change the description, publish, compare two versions, copy files between versions
FilesList (with search and tag filters), create, get metadata, rename or describe, read and write content per version, reset to the inherited content
Consumers and tagsList consumers; list and create tags; assign a file to consumers and tags

Typical flow: change a value and publish

  1. GET /projects to find the project id.
  2. GET /projects/{projectId}/files?search=settings to find the file id.
  3. GET /projects/{projectId}/files/{fileId}/versions/{versionId} to read the content. Keep the returned etag.
  4. PUT the same URL with the full new content and the etag.
  5. POST /projects/{projectId}/versions/{versionId}/publish.

Safe updates with etag

Writing a file replaces its entire content in that version, and the version gets its own copy of the file. Pass the etag you received when reading. If someone changed the file in the meantime, the request fails with a conflict instead of overwriting their change.

JSON files take a JSON value; other files take a string. A locked version rejects writes.

Inheritance in the API

Reading a file's content returns the content as served in that version: its own copy or the inherited one. The response says which version it actually comes from (resolvedVersion).

Audit trail

Files created or changed through the API get the tags api-created and api-edited, so you can find what automation touched.

Not available through the API

For safety the public API cannot delete or create projects, change roles, regenerate the encryption key, or change Git, encryption flags or validation settings. Use the interface for these.