> For the complete documentation index, see [llms.txt](https://docs.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digit.org/works/works-v1.0/platform/configuration/service-configuration/measurement-book-registry.md).

# Measurement Book Registry

## Overview

The registry provides functionality to add measures data.

## Pre-requisites

A running DIGIT platform is needed to deploy the measurement registry. Specifically, the following dependencies are needed:

* DIGIT backbone services
* Persister
* Indexer
* IDGen
* MDMS
* FileStore

## Functionality

This service provides APIs to create, update and search for measurement registries.  Refer to the [functional specifications here](/works/works-v1.0/platform/functional-specifications/measurements.md).

## Deployment

The below variables should be configured for the measurement registry in the Helm environment file before deployment. The Helm environment file will be located under:

`https://github.com/`<mark style="color:red;">`{{ORG}}`</mark>`/DIGIT-DevOps/deploy-as-code/helm/environments/`<mark style="color:red;">`{{EnvironmentFile}}`</mark>`.yaml`

Refer to the [sample here](https://github.com/egovernments/DIGIT-DevOps/blob/unified-env/deploy-as-code/helm/environments/unified-works-dev.yaml).

* Add db-host,db-name,db-url,domain and all the digit core platform services configurations (Idgen, workflow,user etc.) in the YAML file.
* Add the ‘[egov-mdms-service](https://github.com/egovernments/DIGIT-DevOps/blob/unified-env/deploy-as-code/helm/environments/unified-works-dev.yaml#L416)’ related configuration to the respective environment YAML file. Change the gitsync.branch name.
* Check the measurement-registry persister file is added to the **`egov-persister.perister-yml-path`** variable. If not, add the way it's done [here](https://github.com/egovernments/DIGIT-DevOps/blob/1f68ca9dcb4b27689c32f2026a4ea0de3761a88d/deploy-as-code/helm/environments/unified-works-dev.yaml#L445).
* Make sure to add the DB (Postgres and flyway) username & password in the respective environment secret yaml file. Follow the steps [here](https://github.com/egovernments/DIGIT-DevOps/blob/1f68ca9dcb4b27689c32f2026a4ea0de3761a88d/deploy-as-code/helm/environments/unified-works-dev-secrets.yaml#L3).
* Make sure to add the DIGIT core services-related secrets configured in the respective environment secret file. Follow the steps [here](https://github.com/egovernments/DIGIT-DevOps/blob/1f68ca9dcb4b27689c32f2026a4ea0de3761a88d/deploy-as-code/helm/environments/unified-works-dev-secrets.yaml#L3).

{% hint style="info" %}
Restart egov-mdms-service and egov-persister after the above changes are performed.
{% endhint %}

## Configuration

### Configure ID Generation

Ensure the id format is configured in the ‘IdFormat.json’ file of the ‘common-masters’ module. The sample [is available here](https://github.com/egovernments/egov-mdms-data/blob/0dd049ffddbc7c6078b940b5eb9eb4951eb8996a/data/pg/common-masters/IdFormat.json#L94C1-L94C1).&#x20;

<table><thead><tr><th>IDGen Format</th></tr></thead><tbody><tr><td><p></p><pre><code>{
  "format": "MB/[fy:yyyy-yy]/[SEQ_MEASUREMENT_NUM]",
  "idname": "mb.reference.number"
}
</code></pre></td></tr></tbody></table>

### Configure Persister

Make sure that the file[ <mark style="color:purple;">measurement-registry-persister.yml</mark>](https://github.com/egovernments/configs/blob/e3cca4152e63d9b671ed34c2e0fa321f1b4da87c/works/egov-persister/measurement-persister.yml) is present in the **`configs`** repository in the below location.&#x20;

[https://github.com/\<YOUR ORGANISATION>/configs/tree/UNIFIED-DEV/works/egov-persister](https://github.com/egovernments/configs/blob/e3cca4152e63d9b671ed34c2e0fa321f1b4da87c/works/egov-persister/measurement-persister.yml)

In case it is not available, make sure to add the persister YML file.&#x20;

{% hint style="warning" %}
It is important to restart MDMS and the persister service after adding the file to the above location.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.digit.org/works/works-v1.0/platform/configuration/service-configuration/measurement-book-registry.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
