Migrate drafts to patches
https://api.lytics.io/v2/schema/patch/migrateCaptures each table's existing draft delta as a new patch titled "Migrated Draft Changes" and enables schema patches on the account.
{
"_meta": {},
"data": {
"enable_schema_patches": true,
"patches": [
{
"patch_id": "string",
"table": "string"
}
]
},
"request_id": "string",
"status": 0
}List schema patches
https://api.lytics.io/v2/schema/patch/{table}Retrieves all patches for the specified table with diff information.
{
"_meta": {},
"data": [
{
"created": "2019-08-24T14:15:22Z",
"created_by": "string",
"description": "string",
"draft_status": "string",
"fields": [
{
"assertions": {
"email": true,
"filter": [
"string"
],
"format": "alpha",
"length": {
"max": 0,
"min": 0
}
},
"capacity": 0,
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"disable_indexing": true,
"edit_status": "string",
"id": "string",
"id_config": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
},
"is_identifier": true,
"is_pii": true,
"keep_days": 0,
"keep_duration": "string",
"longdesc": "string",
"managed_by": "string",
"mergeop": "string",
"modified": "string",
"shortdesc": "string",
"tags": [
"string"
],
"type": "string"
}
],
"id": "string",
"is_patch": true,
"mappings": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"edit_status": "string",
"expr": "string",
"field": "string",
"guard_expr": "string",
"id": "string",
"managed_by": "string",
"modified": "2019-08-24T14:15:22Z",
"stream": "string"
}
],
"modified": "2019-08-24T14:15:22Z",
"parent_id": "string",
"published_by": "string",
"ranks": {
"id_config": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
}
],
"id_ranks": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"created": "string",
"edit_status": "string",
"fields": [
"string"
],
"modified": "string"
}
},
"retention_settings": {
"capacity": 0,
"created": "string",
"edit_status": "string",
"keep_days": 0,
"modified": "string"
},
"status": "live",
"table": "string",
"tag": "string",
"version_number": 0
}
],
"request_id": "string",
"status": 0
}Create schema patch
https://api.lytics.io/v2/schema/patch/{table}Creates a new patch for the table. Tag and description are optional; a tag is required later, at apply time. Tag is capped at 264 characters.
{
"created": "2019-08-24T14:15:22Z",
"created_by": "string",
"description": "string",
"draft_status": "string",
"fields": [
{
"assertions": {
"email": true,
"filter": [
"string"
],
"format": "alpha",
"length": {
"max": 0,
"min": 0
}
},
"capacity": 0,
"created": "2019-08-24T14:15:22Z",
"disable_indexing": true,
"edit_status": "string",
"id": "string",
"id_config": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
},
"is_identifier": true,
"is_pii": true,
"keep_days": 0,
"keep_duration": "string",
"longdesc": "string",
"managed_by": "string",
"mergeop": "string",
"modified": "string",
"shortdesc": "string",
"tags": [
"string"
],
"type": "string"
}
],
"id": "string",
"is_patch": true,
"mappings": [
{
"created": "2019-08-24T14:15:22Z",
"edit_status": "string",
"expr": "string",
"field": "string",
"guard_expr": "string",
"id": "string",
"managed_by": "string",
"modified": "2019-08-24T14:15:22Z",
"stream": "string"
}
],
"modified": "2019-08-24T14:15:22Z",
"parent_id": "string",
"published_by": "string",
"ranks": {
"id_config": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
}
],
"id_ranks": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"created": "string",
"edit_status": "string",
"fields": [
"string"
],
"modified": "string"
}
},
"retention_settings": {
"capacity": 0,
"created": "string",
"edit_status": "string",
"keep_days": 0,
"modified": "string"
},
"status": "live",
"table": "string",
"tag": "string",
"version_number": 0
}{
"_meta": {},
"data": {
"created": "2019-08-24T14:15:22Z",
"created_by": "string",
"description": "string",
"draft_status": "string",
"fields": [
{
"assertions": {
"email": true,
"filter": [
"string"
],
"format": "alpha",
"length": {
"max": 0,
"min": 0
}
},
"capacity": 0,
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"disable_indexing": true,
"edit_status": "string",
"id": "string",
"id_config": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
},
"is_identifier": true,
"is_pii": true,
"keep_days": 0,
"keep_duration": "string",
"longdesc": "string",
"managed_by": "string",
"mergeop": "string",
"modified": "string",
"shortdesc": "string",
"tags": [
"string"
],
"type": "string"
}
],
"id": "string",
"is_patch": true,
"mappings": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"edit_status": "string",
"expr": "string",
"field": "string",
"guard_expr": "string",
"id": "string",
"managed_by": "string",
"modified": "2019-08-24T14:15:22Z",
"stream": "string"
}
],
"modified": "2019-08-24T14:15:22Z",
"parent_id": "string",
"published_by": "string",
"ranks": {
"id_config": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
}
],
"id_ranks": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"created": "string",
"edit_status": "string",
"fields": [
"string"
],
"modified": "string"
}
},
"retention_settings": {
"capacity": 0,
"created": "string",
"edit_status": "string",
"keep_days": 0,
"modified": "string"
},
"status": "live",
"table": "string",
"tag": "string",
"version_number": 0
},
"request_id": "string",
"status": 0
}Revert schema to a version (as a patch)
https://api.lytics.io/v2/schema/patch/{table}/revert-to-versionCreates a patch that reverts the live schema to the given published version, for the user to review and publish. Non-destructive until published.
{
"_meta": {},
"data": {
"patch_id": "string",
"reverted": true
},
"request_id": "string",
"status": 0
}Get schema patch
https://api.lytics.io/v2/schema/patch/{table}/{id}Retrieves a specific patch for the schema with diff information.
{
"_meta": {},
"data": {
"created": "2019-08-24T14:15:22Z",
"created_by": "string",
"description": "string",
"draft_status": "string",
"fields": [
{
"assertions": {
"email": true,
"filter": [
"string"
],
"format": "alpha",
"length": {
"max": 0,
"min": 0
}
},
"capacity": 0,
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"disable_indexing": true,
"edit_status": "string",
"id": "string",
"id_config": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
},
"is_identifier": true,
"is_pii": true,
"keep_days": 0,
"keep_duration": "string",
"longdesc": "string",
"managed_by": "string",
"mergeop": "string",
"modified": "string",
"shortdesc": "string",
"tags": [
"string"
],
"type": "string"
}
],
"id": "string",
"is_patch": true,
"mappings": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"edit_status": "string",
"expr": "string",
"field": "string",
"guard_expr": "string",
"id": "string",
"managed_by": "string",
"modified": "2019-08-24T14:15:22Z",
"stream": "string"
}
],
"modified": "2019-08-24T14:15:22Z",
"parent_id": "string",
"published_by": "string",
"ranks": {
"id_config": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
}
],
"id_ranks": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"created": "string",
"edit_status": "string",
"fields": [
"string"
],
"modified": "string"
}
},
"retention_settings": {
"capacity": 0,
"created": "string",
"edit_status": "string",
"keep_days": 0,
"modified": "string"
},
"status": "live",
"table": "string",
"tag": "string",
"version_number": 0
},
"request_id": "string",
"status": 0
}Update schema patch
https://api.lytics.io/v2/schema/patch/{table}/{id}Updates an existing patch with fields and mappings. If the patch ID does not exist, a new patch is created; tag and description are optional. Tag is capped at 264 characters. On update, sending a field as an empty string clears it, while omitting the field leaves it unchanged.
{
"created": "2019-08-24T14:15:22Z",
"created_by": "string",
"description": "string",
"draft_status": "string",
"fields": [
{
"assertions": {
"email": true,
"filter": [
"string"
],
"format": "alpha",
"length": {
"max": 0,
"min": 0
}
},
"capacity": 0,
"created": "2019-08-24T14:15:22Z",
"disable_indexing": true,
"edit_status": "string",
"id": "string",
"id_config": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
},
"is_identifier": true,
"is_pii": true,
"keep_days": 0,
"keep_duration": "string",
"longdesc": "string",
"managed_by": "string",
"mergeop": "string",
"modified": "string",
"shortdesc": "string",
"tags": [
"string"
],
"type": "string"
}
],
"id": "string",
"is_patch": true,
"mappings": [
{
"created": "2019-08-24T14:15:22Z",
"edit_status": "string",
"expr": "string",
"field": "string",
"guard_expr": "string",
"id": "string",
"managed_by": "string",
"modified": "2019-08-24T14:15:22Z",
"stream": "string"
}
],
"modified": "2019-08-24T14:15:22Z",
"parent_id": "string",
"published_by": "string",
"ranks": {
"id_config": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
}
],
"id_ranks": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"created": "string",
"edit_status": "string",
"fields": [
"string"
],
"modified": "string"
}
},
"retention_settings": {
"capacity": 0,
"created": "string",
"edit_status": "string",
"keep_days": 0,
"modified": "string"
},
"status": "live",
"table": "string",
"tag": "string",
"version_number": 0
}{
"_meta": {},
"data": {
"created": "2019-08-24T14:15:22Z",
"created_by": "string",
"description": "string",
"draft_status": "string",
"fields": [
{
"assertions": {
"email": true,
"filter": [
"string"
],
"format": "alpha",
"length": {
"max": 0,
"min": 0
}
},
"capacity": 0,
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"disable_indexing": true,
"edit_status": "string",
"id": "string",
"id_config": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
},
"is_identifier": true,
"is_pii": true,
"keep_days": 0,
"keep_duration": "string",
"longdesc": "string",
"managed_by": "string",
"mergeop": "string",
"modified": "string",
"shortdesc": "string",
"tags": [
"string"
],
"type": "string"
}
],
"id": "string",
"is_patch": true,
"mappings": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"edit_status": "string",
"expr": "string",
"field": "string",
"guard_expr": "string",
"id": "string",
"managed_by": "string",
"modified": "2019-08-24T14:15:22Z",
"stream": "string"
}
],
"modified": "2019-08-24T14:15:22Z",
"parent_id": "string",
"published_by": "string",
"ranks": {
"id_config": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
}
],
"id_ranks": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"created": "string",
"edit_status": "string",
"fields": [
"string"
],
"modified": "string"
}
},
"retention_settings": {
"capacity": 0,
"created": "string",
"edit_status": "string",
"keep_days": 0,
"modified": "string"
},
"status": "live",
"table": "string",
"tag": "string",
"version_number": 0
},
"request_id": "string",
"status": 0
}Delete schema patch
https://api.lytics.io/v2/schema/patch/{table}/{id}Deletes a patch. The patch must not be locked (applied) to be deleted.
{
"_meta": {},
"data": {},
"request_id": "string",
"status": 0
}Apply schema patch
https://api.lytics.io/v2/schema/patch/{table}/{id}/applyApplies (publishes) a patch to make it the live schema. Once applied, the patch becomes locked. A tag is required, capped at 264 characters: supply one via the optional VersionCommit body, otherwise the patch's stored tag is used; applying with neither returns 400.
{
"description": "string",
"tag": "string"
}{
"_meta": {},
"data": {
"created": "2019-08-24T14:15:22Z",
"created_by": "string",
"description": "string",
"draft_status": "string",
"fields": [
{
"assertions": {
"email": true,
"filter": [
"string"
],
"format": "alpha",
"length": {
"max": 0,
"min": 0
}
},
"capacity": 0,
"created": "2019-08-24T14:15:22Z",
"disable_indexing": true,
"edit_status": "string",
"id": "string",
"id_config": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
},
"is_identifier": true,
"is_pii": true,
"keep_days": 0,
"keep_duration": "string",
"longdesc": "string",
"managed_by": "string",
"mergeop": "string",
"modified": "string",
"shortdesc": "string",
"tags": [
"string"
],
"type": "string"
}
],
"id": "string",
"is_patch": true,
"mappings": [
{
"created": "2019-08-24T14:15:22Z",
"edit_status": "string",
"expr": "string",
"field": "string",
"guard_expr": "string",
"id": "string",
"managed_by": "string",
"modified": "2019-08-24T14:15:22Z",
"stream": "string"
}
],
"modified": "2019-08-24T14:15:22Z",
"parent_id": "string",
"published_by": "string",
"ranks": {
"id_config": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
}
],
"id_ranks": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"created": "string",
"edit_status": "string",
"fields": [
"string"
],
"modified": "string"
}
},
"retention_settings": {
"capacity": 0,
"created": "string",
"edit_status": "string",
"keep_days": 0,
"modified": "string"
},
"status": "live",
"table": "string",
"tag": "string",
"version_number": 0
},
"request_id": "string",
"status": 0
}Batch discard patch fields and mappings
https://api.lytics.io/v2/schema/patch/{table}/{id}/discardReverts the listed field and mapping deltas to their live definitions in one atomic (all-or-nothing) request, matching the single-item discard per item. An id not present in the patch is a no-op. A still-published identifier keeps its rank-list membership; a net-new identifier added in the patch is removed from the rank list along with its field.
{
"field_ids": [
"string"
],
"mapping_ids": [
"string"
]
}{
"_meta": {},
"data": {
"created": "2019-08-24T14:15:22Z",
"created_by": "string",
"description": "string",
"draft_status": "string",
"fields": [
{
"assertions": {
"email": true,
"filter": [
"string"
],
"format": "alpha",
"length": {
"max": 0,
"min": 0
}
},
"capacity": 0,
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"disable_indexing": true,
"edit_status": "string",
"id": "string",
"id_config": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
},
"is_identifier": true,
"is_pii": true,
"keep_days": 0,
"keep_duration": "string",
"longdesc": "string",
"managed_by": "string",
"mergeop": "string",
"modified": "string",
"shortdesc": "string",
"tags": [
"string"
],
"type": "string"
}
],
"id": "string",
"is_patch": true,
"mappings": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"edit_status": "string",
"expr": "string",
"field": "string",
"guard_expr": "string",
"id": "string",
"managed_by": "string",
"modified": "2019-08-24T14:15:22Z",
"stream": "string"
}
],
"modified": "2019-08-24T14:15:22Z",
"parent_id": "string",
"published_by": "string",
"ranks": {
"id_config": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
}
],
"id_ranks": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"created": "string",
"edit_status": "string",
"fields": [
"string"
],
"modified": "string"
}
},
"retention_settings": {
"capacity": 0,
"created": "string",
"edit_status": "string",
"keep_days": 0,
"modified": "string"
},
"status": "live",
"table": "string",
"tag": "string",
"version_number": 0
},
"request_id": "string",
"status": 0
}Create patch field
https://api.lytics.io/v2/schema/patch/{table}/{id}/fieldCreates or updates a field in a patch.
{
"assertions": {
"email": true,
"filter": [
"string"
],
"format": "alpha",
"length": {
"max": 0,
"min": 0
}
},
"capacity": 0,
"created": "2019-08-24T14:15:22Z",
"disable_indexing": true,
"edit_status": "string",
"id": "string",
"id_config": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
},
"is_identifier": true,
"is_pii": true,
"keep_days": 0,
"keep_duration": "string",
"longdesc": "string",
"managed_by": "string",
"mergeop": "string",
"modified": "string",
"shortdesc": "string",
"tags": [
"string"
],
"type": "string"
}{
"_meta": {},
"data": {
"created": "2019-08-24T14:15:22Z",
"created_by": "string",
"description": "string",
"draft_status": "string",
"fields": [
{
"assertions": {
"email": true,
"filter": [
"string"
],
"format": "alpha",
"length": {
"max": 0,
"min": 0
}
},
"capacity": 0,
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"disable_indexing": true,
"edit_status": "string",
"id": "string",
"id_config": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
},
"is_identifier": true,
"is_pii": true,
"keep_days": 0,
"keep_duration": "string",
"longdesc": "string",
"managed_by": "string",
"mergeop": "string",
"modified": "string",
"shortdesc": "string",
"tags": [
"string"
],
"type": "string"
}
],
"id": "string",
"is_patch": true,
"mappings": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"edit_status": "string",
"expr": "string",
"field": "string",
"guard_expr": "string",
"id": "string",
"managed_by": "string",
"modified": "2019-08-24T14:15:22Z",
"stream": "string"
}
],
"modified": "2019-08-24T14:15:22Z",
"parent_id": "string",
"published_by": "string",
"ranks": {
"id_config": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
}
],
"id_ranks": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"created": "string",
"edit_status": "string",
"fields": [
"string"
],
"modified": "string"
}
},
"retention_settings": {
"capacity": 0,
"created": "string",
"edit_status": "string",
"keep_days": 0,
"modified": "string"
},
"status": "live",
"table": "string",
"tag": "string",
"version_number": 0
},
"request_id": "string",
"status": 0
}Get patch field
https://api.lytics.io/v2/schema/patch/{table}/{id}/field/{field_id}Retrieves a specific field from a patch. If the field is not in the patch, retrieves it from the live schema.
{
"_meta": {},
"data": {
"assertions": {
"email": true,
"filter": [
"string"
],
"format": "alpha",
"length": {
"max": 0,
"min": 0
}
},
"capacity": 0,
"created": "2019-08-24T14:15:22Z",
"disable_indexing": true,
"edit_status": "string",
"id": "string",
"id_config": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
},
"is_identifier": true,
"is_pii": true,
"keep_days": 0,
"keep_duration": "string",
"longdesc": "string",
"managed_by": "string",
"mergeop": "string",
"modified": "string",
"shortdesc": "string",
"tags": [
"string"
],
"type": "string"
},
"request_id": "string",
"status": 0
}Update, remove, or delete patch field
https://api.lytics.io/v2/schema/patch/{table}/{id}/field/{field_id}Updates an existing field, removes a field from a patch (remove=true), or marks a field for deletion when the patch is applied (delete=true).
{
"assertions": {
"email": true,
"filter": [
"string"
],
"format": "alpha",
"length": {
"max": 0,
"min": 0
}
},
"capacity": 0,
"created": "2019-08-24T14:15:22Z",
"disable_indexing": true,
"edit_status": "string",
"id": "string",
"id_config": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
},
"is_identifier": true,
"is_pii": true,
"keep_days": 0,
"keep_duration": "string",
"longdesc": "string",
"managed_by": "string",
"mergeop": "string",
"modified": "string",
"shortdesc": "string",
"tags": [
"string"
],
"type": "string"
}{
"_meta": {},
"data": {
"created": "2019-08-24T14:15:22Z",
"created_by": "string",
"description": "string",
"draft_status": "string",
"fields": [
{
"assertions": {
"email": true,
"filter": [
"string"
],
"format": "alpha",
"length": {
"max": 0,
"min": 0
}
},
"capacity": 0,
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"disable_indexing": true,
"edit_status": "string",
"id": "string",
"id_config": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
},
"is_identifier": true,
"is_pii": true,
"keep_days": 0,
"keep_duration": "string",
"longdesc": "string",
"managed_by": "string",
"mergeop": "string",
"modified": "string",
"shortdesc": "string",
"tags": [
"string"
],
"type": "string"
}
],
"id": "string",
"is_patch": true,
"mappings": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"edit_status": "string",
"expr": "string",
"field": "string",
"guard_expr": "string",
"id": "string",
"managed_by": "string",
"modified": "2019-08-24T14:15:22Z",
"stream": "string"
}
],
"modified": "2019-08-24T14:15:22Z",
"parent_id": "string",
"published_by": "string",
"ranks": {
"id_config": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
}
],
"id_ranks": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"created": "string",
"edit_status": "string",
"fields": [
"string"
],
"modified": "string"
}
},
"retention_settings": {
"capacity": 0,
"created": "string",
"edit_status": "string",
"keep_days": 0,
"modified": "string"
},
"status": "live",
"table": "string",
"tag": "string",
"version_number": 0
},
"request_id": "string",
"status": 0
}Rename a net-new patch field
https://api.lytics.io/v2/schema/patch/{table}/{id}/field/{field_id}/renameRenames the slug/id of a field added in this patch (not yet on the live schema), re-pointing the patch's pending mappings so none orphan. Rejects fields already on the live schema and id collisions.
{
"new_id": "string"
}{
"_meta": {},
"data": {
"created": "2019-08-24T14:15:22Z",
"created_by": "string",
"description": "string",
"draft_status": "string",
"fields": [
{
"assertions": {
"email": true,
"filter": [
"string"
],
"format": "alpha",
"length": {
"max": 0,
"min": 0
}
},
"capacity": 0,
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"disable_indexing": true,
"edit_status": "string",
"id": "string",
"id_config": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
},
"is_identifier": true,
"is_pii": true,
"keep_days": 0,
"keep_duration": "string",
"longdesc": "string",
"managed_by": "string",
"mergeop": "string",
"modified": "string",
"shortdesc": "string",
"tags": [
"string"
],
"type": "string"
}
],
"id": "string",
"is_patch": true,
"mappings": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"edit_status": "string",
"expr": "string",
"field": "string",
"guard_expr": "string",
"id": "string",
"managed_by": "string",
"modified": "2019-08-24T14:15:22Z",
"stream": "string"
}
],
"modified": "2019-08-24T14:15:22Z",
"parent_id": "string",
"published_by": "string",
"ranks": {
"id_config": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
}
],
"id_ranks": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"created": "string",
"edit_status": "string",
"fields": [
"string"
],
"modified": "string"
}
},
"retention_settings": {
"capacity": 0,
"created": "string",
"edit_status": "string",
"keep_days": 0,
"modified": "string"
},
"status": "live",
"table": "string",
"tag": "string",
"version_number": 0
},
"request_id": "string",
"status": 0
}Create patch mapping
https://api.lytics.io/v2/schema/patch/{table}/{id}/mappingCreates or updates a mapping in a patch.
{
"created": "2019-08-24T14:15:22Z",
"edit_status": "string",
"expr": "string",
"field": "string",
"guard_expr": "string",
"id": "string",
"managed_by": "string",
"modified": "2019-08-24T14:15:22Z",
"stream": "string"
}{
"_meta": {},
"data": {
"created": "2019-08-24T14:15:22Z",
"created_by": "string",
"description": "string",
"draft_status": "string",
"fields": [
{
"assertions": {
"email": true,
"filter": [
"string"
],
"format": "alpha",
"length": {
"max": 0,
"min": 0
}
},
"capacity": 0,
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"disable_indexing": true,
"edit_status": "string",
"id": "string",
"id_config": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
},
"is_identifier": true,
"is_pii": true,
"keep_days": 0,
"keep_duration": "string",
"longdesc": "string",
"managed_by": "string",
"mergeop": "string",
"modified": "string",
"shortdesc": "string",
"tags": [
"string"
],
"type": "string"
}
],
"id": "string",
"is_patch": true,
"mappings": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"edit_status": "string",
"expr": "string",
"field": "string",
"guard_expr": "string",
"id": "string",
"managed_by": "string",
"modified": "2019-08-24T14:15:22Z",
"stream": "string"
}
],
"modified": "2019-08-24T14:15:22Z",
"parent_id": "string",
"published_by": "string",
"ranks": {
"id_config": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
}
],
"id_ranks": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"created": "string",
"edit_status": "string",
"fields": [
"string"
],
"modified": "string"
}
},
"retention_settings": {
"capacity": 0,
"created": "string",
"edit_status": "string",
"keep_days": 0,
"modified": "string"
},
"status": "live",
"table": "string",
"tag": "string",
"version_number": 0
},
"request_id": "string",
"status": 0
}Get patch mapping
https://api.lytics.io/v2/schema/patch/{table}/{id}/mapping/{mapping_id}Retrieves a specific mapping from a patch. If the mapping is not in the patch, retrieves it from the live schema.
{
"_meta": {},
"data": {
"created": "2019-08-24T14:15:22Z",
"edit_status": "string",
"expr": "string",
"field": "string",
"guard_expr": "string",
"id": "string",
"managed_by": "string",
"modified": "2019-08-24T14:15:22Z",
"stream": "string"
},
"request_id": "string",
"status": 0
}Update, remove, or delete patch mapping
https://api.lytics.io/v2/schema/patch/{table}/{id}/mapping/{mapping_id}Updates an existing mapping, removes a mapping from a patch (remove=true), or marks a mapping for deletion when the patch is applied (delete=true).
{
"created": "2019-08-24T14:15:22Z",
"edit_status": "string",
"expr": "string",
"field": "string",
"guard_expr": "string",
"id": "string",
"managed_by": "string",
"modified": "2019-08-24T14:15:22Z",
"stream": "string"
}{
"_meta": {},
"data": {
"created": "2019-08-24T14:15:22Z",
"created_by": "string",
"description": "string",
"draft_status": "string",
"fields": [
{
"assertions": {
"email": true,
"filter": [
"string"
],
"format": "alpha",
"length": {
"max": 0,
"min": 0
}
},
"capacity": 0,
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"disable_indexing": true,
"edit_status": "string",
"id": "string",
"id_config": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
},
"is_identifier": true,
"is_pii": true,
"keep_days": 0,
"keep_duration": "string",
"longdesc": "string",
"managed_by": "string",
"mergeop": "string",
"modified": "string",
"shortdesc": "string",
"tags": [
"string"
],
"type": "string"
}
],
"id": "string",
"is_patch": true,
"mappings": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"edit_status": "string",
"expr": "string",
"field": "string",
"guard_expr": "string",
"id": "string",
"managed_by": "string",
"modified": "2019-08-24T14:15:22Z",
"stream": "string"
}
],
"modified": "2019-08-24T14:15:22Z",
"parent_id": "string",
"published_by": "string",
"ranks": {
"id_config": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
}
],
"id_ranks": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"created": "string",
"edit_status": "string",
"fields": [
"string"
],
"modified": "string"
}
},
"retention_settings": {
"capacity": 0,
"created": "string",
"edit_status": "string",
"keep_days": 0,
"modified": "string"
},
"status": "live",
"table": "string",
"tag": "string",
"version_number": 0
},
"request_id": "string",
"status": 0
}Get patch rank list
https://api.lytics.io/v2/schema/patch/{table}/{id}/rankRetrieves the identifier rank list for a patch, returned within the full patch (with diff information).
{
"_meta": {},
"data": {
"created": "2019-08-24T14:15:22Z",
"created_by": "string",
"description": "string",
"draft_status": "string",
"fields": [
{
"assertions": {
"email": true,
"filter": [
"string"
],
"format": "alpha",
"length": {
"max": 0,
"min": 0
}
},
"capacity": 0,
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"disable_indexing": true,
"edit_status": "string",
"id": "string",
"id_config": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
},
"is_identifier": true,
"is_pii": true,
"keep_days": 0,
"keep_duration": "string",
"longdesc": "string",
"managed_by": "string",
"mergeop": "string",
"modified": "string",
"shortdesc": "string",
"tags": [
"string"
],
"type": "string"
}
],
"id": "string",
"is_patch": true,
"mappings": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"edit_status": "string",
"expr": "string",
"field": "string",
"guard_expr": "string",
"id": "string",
"managed_by": "string",
"modified": "2019-08-24T14:15:22Z",
"stream": "string"
}
],
"modified": "2019-08-24T14:15:22Z",
"parent_id": "string",
"published_by": "string",
"ranks": {
"id_config": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
}
],
"id_ranks": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"created": "string",
"edit_status": "string",
"fields": [
"string"
],
"modified": "string"
}
},
"retention_settings": {
"capacity": 0,
"created": "string",
"edit_status": "string",
"keep_days": 0,
"modified": "string"
},
"status": "live",
"table": "string",
"tag": "string",
"version_number": 0
},
"request_id": "string",
"status": 0
}Set patch rank list
https://api.lytics.io/v2/schema/patch/{table}/{id}/rankSets the identifier rank list for a patch, or removes it (remove=true).
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"created": "string",
"edit_status": "string",
"fields": [
"string"
],
"modified": "string"
}{
"_meta": {},
"data": {
"created": "2019-08-24T14:15:22Z",
"created_by": "string",
"description": "string",
"draft_status": "string",
"fields": [
{
"assertions": {
"email": true,
"filter": [
"string"
],
"format": "alpha",
"length": {
"max": 0,
"min": 0
}
},
"capacity": 0,
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"disable_indexing": true,
"edit_status": "string",
"id": "string",
"id_config": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
},
"is_identifier": true,
"is_pii": true,
"keep_days": 0,
"keep_duration": "string",
"longdesc": "string",
"managed_by": "string",
"mergeop": "string",
"modified": "string",
"shortdesc": "string",
"tags": [
"string"
],
"type": "string"
}
],
"id": "string",
"is_patch": true,
"mappings": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"configuration_error": "string",
"created": "2019-08-24T14:15:22Z",
"edit_status": "string",
"expr": "string",
"field": "string",
"guard_expr": "string",
"id": "string",
"managed_by": "string",
"modified": "2019-08-24T14:15:22Z",
"stream": "string"
}
],
"modified": "2019-08-24T14:15:22Z",
"parent_id": "string",
"published_by": "string",
"ranks": {
"id_config": [
{
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"compact_after_days": 0,
"compact_over": 0,
"created": "string",
"edit_status": "string",
"field": "string",
"many_to": [
"string"
],
"modified": "string"
}
],
"id_ranks": {
"changes": {
"diff": [
{
"from_val": null,
"property": "string",
"to_val": null
}
],
"id": "string",
"subject": "mapping",
"verb": "created"
},
"created": "string",
"edit_status": "string",
"fields": [
"string"
],
"modified": "string"
}
},
"retention_settings": {
"capacity": 0,
"created": "string",
"edit_status": "string",
"keep_days": 0,
"modified": "string"
},
"status": "live",
"table": "string",
"tag": "string",
"version_number": 0
},
"request_id": "string",
"status": 0
}