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
/v1/data_mapsReturns a page of data maps across all hosts, most recent first.
- 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
curl 'http://localhost:8022/v1/data_maps?per_page=20' \
-H 'X-Tenant-Id: acme'List a host's data maps
/v1/hosts/{host_hash}/data_mapsReturns a page of data maps for one host. The {host_hash} path segment is the host's hash.
- 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
curl 'http://localhost:8022/v1/hosts/9a3f…/data_maps' \
-H 'X-Tenant-Id: acme'Create a data map
/v1/hosts/{host_hash}/data_mapsCreates a data map for a host. The {host_hash} path segment is the host's hash.
- 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
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
/v1/data_maps/{map_id}Returns a single data map by ID. The {map_id} path segment is the data map's UUID.
curl 'http://localhost:8022/v1/data_maps/7c2b…' \
-H 'X-Tenant-Id: acme'Update a data map
/v1/data_maps/{map_id}Updates a data map. Only the supplied fields are changed; omitted fields are left as they are.
- schema_id string
A replacement schema the data map extracts against.
format: uuid- map object
A replacement data map definition.
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
/v1/data_maps/{map_id}Deletes a data map.
curl -X DELETE 'http://localhost:8022/v1/data_maps/7c2b…' \
-H 'X-Tenant-Id: acme'Apply a data map
/v1/data_maps/{map_id}/applyApplies a data map to supplied content and returns the extracted data.
- content stringrequired
The base64-encoded HTML to apply the data map to.
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==" }'