REST API
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.
Endpoints
| Area | What you can do |
|---|---|
| Account | GET /me |
| Projects | List projects you can access; get one |
| Versions | List, create from a parent, change the description, publish, compare two versions, copy files between versions |
| Files | List (with search and tag filters), create, get metadata, rename or describe, read and write content per version, reset to the inherited content |
| Consumers and tags | List consumers; list and create tags; assign a file to consumers and tags |
Typical flow: change a value and publish
GET /projectsto find the project id.GET /projects/{projectId}/files?search=settingsto find the file id.GET /projects/{projectId}/files/{fileId}/versions/{versionId}to read the content. Keep the returnedetag.PUTthe same URL with the full new content and theetag.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.