Skip to main content
GET
/
v1
/
settings
/
metadata-indexes
List Metadata Indexes
curl --request GET \
  --url https://ledger.sandbox.lerian.net/v1/settings/metadata-indexes
import requests

url = "https://ledger.sandbox.lerian.net/v1/settings/metadata-indexes"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://ledger.sandbox.lerian.net/v1/settings/metadata-indexes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://ledger.sandbox.lerian.net/v1/settings/metadata-indexes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://ledger.sandbox.lerian.net/v1/settings/metadata-indexes"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://ledger.sandbox.lerian.net/v1/settings/metadata-indexes")
.asString();
require 'uri'
require 'net/http'

url = URI("https://ledger.sandbox.lerian.net/v1/settings/metadata-indexes")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
[
  {
    "indexName": "metadata.tier_1",
    "entityName": "transaction",
    "metadataKey": "tier",
    "unique": false,
    "sparse": true,
    "stats": {
      "accesses": 150,
      "statsSince": "2024-01-15T10:30:00Z"
    }
  },
  {
    "indexName": "metadata.externalId_1",
    "entityName": "account",
    "metadataKey": "externalId",
    "unique": true,
    "sparse": false,
    "stats": {
      "accesses": 1200,
      "statsSince": "2024-01-10T08:00:00Z"
    }
  }
]

Headers

Content-Type
string

The type of media of the resource. Recommended value is application/json.

X-Request-Id
string<uuid>

A unique identifier used to trace and track each request.

Authorization
string

Bearer JWT token for authentication. Required when PLUGIN_AUTH_ENABLED=true (enforced in multi-tenant deployments). Optional in default OSS single-tenant mode. Format: Bearer <token>

Query Parameters

entity_name
string

The name of the entity to filter the metadata indexes.

Response

Indicates that the request was successful and the response contains the expected data.

indexName
string
required

The name of the index in the database.

Example:

"metadata.tier_1"

entityName
string
required

The name of the entity associated with the index.

Example:

"transaction"

metadataKey
string
required

The metadata key used in the index.

Example:

"tier"

unique
boolean
required

Indicates whether the index enforces uniqueness.

Example:

false

sparse
boolean
required

Indicates whether the index is sparse (ignores documents without the indexed field).

Example:

true

stats
object

Index usage statistics.