inndx
GitHub

Data maps

Manage per-host data maps and apply them to content.

A data map describes how to extract structured data for a specific host against a schema.

These endpoints share the pagination and error conventions.

List data maps

GET/v1/data_maps

Returns a page of data maps across all hosts, most recent first.

Query parametersin: query
page
string

Pagination cursor. See pagination.

per_page
numberdefault: 10

Maximum number of data maps to return.

min: 1max: 100
include_ids
string[]

Return only data maps with these IDs.

format: uuid
exclude_ids
string[]

Omit data maps with these IDs.

format: uuid
host_hashes
string[]

Return only data maps for these host hashes.

hosts
string[]

Return only data maps for these domains.

schema_ids
string[]

Return only data maps for these schemas.

format: uuid
created_before
string

Return only data maps created before this timestamp.

format: date-time
created_after
string

Return only data maps created after this timestamp.

format: date-time
Responses

curl 'http://localhost:8022/v1/data_maps?per_page=20' \
  -H 'X-Tenant-Id: acme'

List a host's data maps

GET/v1/hosts/{host_hash}/data_maps

Returns a page of data maps for one host. The {host_hash} path segment is the host's hash.

Query parametersin: query
page
string

Pagination cursor. See pagination.

per_page
numberdefault: 10

Maximum number of data maps to return.

min: 1max: 100
include_ids
string[]

Return only data maps with these IDs.

format: uuid
exclude_ids
string[]

Omit data maps with these IDs.

format: uuid
schema_ids
string[]

Return only data maps for these schemas.

format: uuid
created_before
string

Return only data maps created before this timestamp.

format: date-time
created_after
string

Return only data maps created after this timestamp.

format: date-time
Responses

curl 'http://localhost:8022/v1/hosts/9a3f…/data_maps' \
  -H 'X-Tenant-Id: acme'

Create a data map

POST/v1/hosts/{host_hash}/data_maps

Creates a data map for a host. The {host_hash} path segment is the host's hash.

Request bodyin: body
schema_id
stringrequired

The schema the data map extracts against.

format: uuid
map
objectrequired

The data map definition.

id
string

The ID to assign. Generated when omitted.

format: uuid
Responses

curl -X POST 'http://localhost:8022/v1/hosts/9a3f…/data_maps' \
  -H 'X-Tenant-Id: acme' \
  -H 'Content-Type: application/json' \
  -d '{
    "schema_id": "3f1a…",
    "map": {}
  }'

Get a data map

GET/v1/data_maps/{map_id}

Returns a single data map by ID. The {map_id} path segment is the data map's UUID.

Responses

curl 'http://localhost:8022/v1/data_maps/7c2b…' \
  -H 'X-Tenant-Id: acme'

Update a data map

PUT/v1/data_maps/{map_id}

Updates a data map. Only the supplied fields are changed; omitted fields are left as they are.

Request bodyin: body
schema_id
string

A replacement schema the data map extracts against.

format: uuid
map
object

A replacement data map definition.

Responses

curl -X PUT 'http://localhost:8022/v1/data_maps/7c2b…' \
  -H 'X-Tenant-Id: acme' \
  -H 'Content-Type: application/json' \
  -d '{ "map": {} }'

Delete a data map

DELETE/v1/data_maps/{map_id}

Deletes a data map.

Responses

curl -X DELETE 'http://localhost:8022/v1/data_maps/7c2b…' \
  -H 'X-Tenant-Id: acme'

Apply a data map

POST/v1/data_maps/{map_id}/apply

Applies a data map to supplied content and returns the extracted data.

Request bodyin: body
content
stringrequired

The base64-encoded HTML to apply the data map to.

Responses

curl -X POST 'http://localhost:8022/v1/data_maps/7c2b…/apply' \
  -H 'X-Tenant-Id: acme' \
  -H 'Content-Type: application/json' \
  -d '{ "content": "PGh0bWw+Li4uPC9odG1sPg==" }'

Search docs

Search the Self-host documentation