Browse the documentation

REST API

Mapping sets (legacy)

The account-level mapping set endpoints of the Layerz REST API, kept for existing integrations. New integrations write rules per source instead.

Watch out

Mapping sets are an account-level catalogue of mapping rules, kept for the integrations that use them. A model's rules belong to its sources: write them with PUT /models/:id/sources/:sourceId/rules. Writing a model's own set through these routes returns 400.

Method and pathDoes
GET /mapping-setsThe sets you can read: system catalogues and your own
POST /mapping-setsCreate a set
GET /mapping-sets/:idOne set with its rules
DELETE /mapping-sets/:idDelete one of your sets (system sets cannot be deleted)
POST /mapping-sets/:id/mappingsAdd a rule to one of your catalogue sets

Create a set

FieldTypeRequiredDescription
namestringyes
descriptionstring

Add a rule

FieldTypeRequiredDescription
account_patternstringyes
secondary_patternstring
target_metricstringyes
sign_convention"natural" | "negate" | "absolute"
aggregation_mode"sum" | "last"

A set owned by someone else returns 404.