---
title: /ingest/settings/ingest-schema
slug: amberflo-api/0or8-ingestsettingsingest-schema
docTags: 
createdAt: 2024-11-07T15:10:16.968Z
---

{
  "id": "yQ76tYHAY-XDRoKnDtp6Y",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/ingest/settings/ingest-schema",
    "servers": [
      {
        "url": "https://app.amberflo.io/ingest/settings/ingest-schema"
      }
    ],
    "name": "",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "ingestion.settings.IngestMessageSchema.in",
          "schema": [
            {
              "name": "id",
              "kind": "optional",
              "type": "string",
              "description": "Unique id for the schema.",
              "example": ""
            },
            {
              "name": "schema",
              "kind": "optional",
              "type": "object",
              "description": "Schema description",
              "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.ExplodeNode.in",
              "customType": "ingestion.schema_adapters.nodes.ExplodeNode.in",
              "schema": [
                {
                  "name": "type",
                  "kind": "optional",
                  "type": "string",
                  "example": "",
                  "default": "explode"
                },
                {
                  "name": "sourceName",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "subComponents",
                  "kind": "optional",
                  "type": "object",
                  "description": "",
                  "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.SchemaExtractorNode.in",
                  "customType": "ingestion.schema_adapters.nodes.SchemaExtractorNode.in[]",
                  "schema": [],
                  "complexType": "oneOf",
                  "complexItems": [
                    {
                      "name": "ingestion.schema_adapters.nodes.CustomerIdNode.in",
                      "description": "",
                      "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.CustomerIdNode.in",
                      "schema": [
                        {
                          "name": "type",
                          "kind": "optional",
                          "type": "string",
                          "example": "",
                          "default": "customer_id"
                        },
                        {
                          "name": "sourceName",
                          "kind": "optional",
                          "type": "string",
                          "example": ""
                        }
                      ]
                    },
                    {
                      "name": "ingestion.schema_adapters.nodes.DimensionNode.in",
                      "description": "",
                      "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.DimensionNode.in",
                      "schema": [
                        {
                          "name": "type",
                          "kind": "optional",
                          "type": "string",
                          "example": "",
                          "default": "dimension"
                        },
                        {
                          "name": "sourceName",
                          "kind": "optional",
                          "type": "string",
                          "example": ""
                        },
                        {
                          "name": "targetName",
                          "kind": "optional",
                          "type": "string",
                          "example": ""
                        }
                      ]
                    },
                    {
                      "name": "ingestion.schema_adapters.nodes.EventTimeNode.in",
                      "description": "",
                      "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.EventTimeNode.in",
                      "schema": [
                        {
                          "name": "type",
                          "kind": "optional",
                          "type": "string",
                          "example": "",
                          "default": "event_time"
                        },
                        {
                          "name": "timeFormat",
                          "kind": "optional",
                          "type": "string",
                          "description": "",
                          "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.TimeFormat.in",
                          "customType": "ingestion.schema_adapters.nodes.TimeFormat.in",
                          "schema": [
                            {
                              "name": "",
                              "description": "",
                              "customType": "Max depth limit reached"
                            }
                          ]
                        },
                        {
                          "name": "sourceName",
                          "kind": "optional",
                          "type": "string",
                          "example": ""
                        }
                      ]
                    },
                    {
                      "name": "ingestion.schema_adapters.nodes.ExplodeNode.in",
                      "description": "",
                      "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.ExplodeNode.in",
                      "schema": [
                        {
                          "name": "",
                          "description": "",
                          "customType": "Max depth limit reached"
                        }
                      ]
                    },
                    {
                      "name": "ingestion.schema_adapters.nodes.ForkNode.in",
                      "description": "",
                      "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.ForkNode.in",
                      "schema": [
                        {
                          "name": "",
                          "description": "",
                          "customType": "Max depth limit reached"
                        }
                      ]
                    },
                    {
                      "name": "ingestion.schema_adapters.nodes.MeterApiNameNode.in",
                      "description": "",
                      "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.MeterApiNameNode.in",
                      "schema": [
                        {
                          "name": "",
                          "description": "",
                          "customType": "Max depth limit reached"
                        }
                      ]
                    },
                    {
                      "name": "ingestion.schema_adapters.nodes.ValueNode.in",
                      "description": "",
                      "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.ValueNode.in",
                      "schema": [
                        {
                          "name": "",
                          "description": "",
                          "customType": "Max depth limit reached"
                        }
                      ]
                    },
                    {
                      "name": "ingestion.schema_adapters.nodes.SameElementArrayNode.in",
                      "description": "",
                      "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.SameElementArrayNode.in",
                      "schema": [
                        {
                          "name": "",
                          "description": "",
                          "customType": "Max depth limit reached"
                        }
                      ]
                    },
                    {
                      "name": "ingestion.schema_adapters.nodes.UniqueIdNode.in",
                      "description": "",
                      "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.UniqueIdNode.in",
                      "schema": [
                        {
                          "name": "",
                          "description": "",
                          "customType": "Max depth limit reached"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name": "condition",
              "kind": "optional",
              "type": "object",
              "description": "Optional condition for applying schema. Used to evaluate if schema should be applied",
              "modelRef": "#/components/schemas/ingestion.schema_adapters.conditions.MatchCondition.in",
              "customType": "ingestion.schema_adapters.conditions.MatchCondition.in",
              "schema": [],
              "complexType": "oneOf",
              "complexItems": [
                {
                  "name": "ingestion.schema_adapters.conditions.NotCondition.in",
                  "description": "",
                  "modelRef": "#/components/schemas/ingestion.schema_adapters.conditions.NotCondition.in",
                  "schema": [
                    {
                      "name": "type",
                      "kind": "optional",
                      "type": "string",
                      "example": "",
                      "default": "not"
                    },
                    {
                      "name": "condition",
                      "kind": "optional",
                      "type": "object",
                      "description": "",
                      "modelRef": "#/components/schemas/ingestion.schema_adapters.conditions.MatchCondition.in",
                      "customType": "ingestion.schema_adapters.conditions.MatchCondition.in",
                      "schema": [],
                      "complexType": "oneOf",
                      "complexItems": [
                        {
                          "name": "ingestion.schema_adapters.conditions.NotCondition.in",
                          "description": "",
                          "modelRef": "#/components/schemas/ingestion.schema_adapters.conditions.NotCondition.in",
                          "schema": [
                            {
                              "name": "",
                              "description": "",
                              "customType": "Circular-Reference"
                            }
                          ]
                        },
                        {
                          "name": "ingestion.schema_adapters.conditions.ValidIdentifierCondition.in",
                          "description": "",
                          "modelRef": "#/components/schemas/ingestion.schema_adapters.conditions.ValidIdentifierCondition.in",
                          "schema": [
                            {
                              "name": "type",
                              "kind": "optional",
                              "type": "string",
                              "example": "",
                              "default": "valid_identifier"
                            },
                            {
                              "name": "fieldName",
                              "kind": "optional",
                              "type": "string",
                              "example": ""
                            },
                            {
                              "name": "validValues",
                              "kind": "optional",
                              "type": "array",
                              "example": "",
                              "itemType": "string",
                              "customType": "string[]",
                              "itemExample": "",
                              "itemDefault": ""
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name": "ingestion.schema_adapters.conditions.ValidIdentifierCondition.in",
                  "description": "",
                  "modelRef": "#/components/schemas/ingestion.schema_adapters.conditions.ValidIdentifierCondition.in",
                  "schema": [
                    {
                      "name": "type",
                      "kind": "optional",
                      "type": "string",
                      "example": "",
                      "default": "valid_identifier"
                    },
                    {
                      "name": "fieldName",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "validValues",
                      "kind": "optional",
                      "type": "array",
                      "example": "",
                      "itemType": "string",
                      "customType": "string[]",
                      "itemExample": "",
                      "itemDefault": ""
                    }
                  ]
                }
              ]
            },
            {
              "name": "autoDetectable",
              "kind": "optional",
              "type": "boolean",
              "description": "Whether the schema can be used in schema auto-detection. Can only be true if schema has condition",
              "example": ""
            }
          ],
          "modelRef": "#/components/schemas/ingestion.settings.IngestMessageSchema.in",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ingestion.settings.IngestMessageSchema.out",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "string",
                "description": "Unique id for the schema.",
                "example": ""
              },
              {
                "name": "createTimeInSeconds",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Create time in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds)",
                "example": 0
              },
              {
                "name": "updateTimeInSeconds",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Update time in [Unix time](https://en.wikipedia.org/wiki/Unix_time) (seconds)",
                "example": 0
              },
              {
                "name": "schema",
                "kind": "optional",
                "type": "object",
                "description": "Schema description",
                "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.ExplodeNode.out",
                "customType": "ingestion.schema_adapters.nodes.ExplodeNode.out",
                "schema": [
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "example": "",
                    "default": "explode"
                  },
                  {
                    "name": "sourceName",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "subComponents",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.SchemaExtractorNode.out",
                    "customType": "ingestion.schema_adapters.nodes.SchemaExtractorNode.out[]",
                    "schema": [],
                    "complexType": "oneOf",
                    "complexItems": [
                      {
                        "name": "ingestion.schema_adapters.nodes.CustomerIdNode.out",
                        "description": "",
                        "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.CustomerIdNode.out",
                        "schema": [
                          {
                            "name": "type",
                            "kind": "optional",
                            "type": "string",
                            "example": "",
                            "default": "customer_id"
                          },
                          {
                            "name": "sourceName",
                            "kind": "optional",
                            "type": "string",
                            "example": ""
                          }
                        ]
                      },
                      {
                        "name": "ingestion.schema_adapters.nodes.DimensionNode.out",
                        "description": "",
                        "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.DimensionNode.out",
                        "schema": [
                          {
                            "name": "type",
                            "kind": "optional",
                            "type": "string",
                            "example": "",
                            "default": "dimension"
                          },
                          {
                            "name": "sourceName",
                            "kind": "optional",
                            "type": "string",
                            "example": ""
                          },
                          {
                            "name": "targetName",
                            "kind": "optional",
                            "type": "string",
                            "example": ""
                          }
                        ]
                      },
                      {
                        "name": "ingestion.schema_adapters.nodes.EventTimeNode.out",
                        "description": "",
                        "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.EventTimeNode.out",
                        "schema": [
                          {
                            "name": "type",
                            "kind": "optional",
                            "type": "string",
                            "example": "",
                            "default": "event_time"
                          },
                          {
                            "name": "timeFormat",
                            "kind": "optional",
                            "type": "string",
                            "description": "",
                            "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.TimeFormat.out",
                            "customType": "ingestion.schema_adapters.nodes.TimeFormat.out",
                            "schema": [
                              {
                                "name": "",
                                "description": "",
                                "customType": "Max depth limit reached"
                              }
                            ]
                          },
                          {
                            "name": "sourceName",
                            "kind": "optional",
                            "type": "string",
                            "example": ""
                          }
                        ]
                      },
                      {
                        "name": "ingestion.schema_adapters.nodes.ExplodeNode.out",
                        "description": "",
                        "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.ExplodeNode.out",
                        "schema": [
                          {
                            "name": "",
                            "description": "",
                            "customType": "Max depth limit reached"
                          }
                        ]
                      },
                      {
                        "name": "ingestion.schema_adapters.nodes.ForkNode.out",
                        "description": "",
                        "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.ForkNode.out",
                        "schema": [
                          {
                            "name": "",
                            "description": "",
                            "customType": "Max depth limit reached"
                          }
                        ]
                      },
                      {
                        "name": "ingestion.schema_adapters.nodes.MeterApiNameNode.out",
                        "description": "",
                        "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.MeterApiNameNode.out",
                        "schema": [
                          {
                            "name": "",
                            "description": "",
                            "customType": "Max depth limit reached"
                          }
                        ]
                      },
                      {
                        "name": "ingestion.schema_adapters.nodes.ValueNode.out",
                        "description": "",
                        "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.ValueNode.out",
                        "schema": [
                          {
                            "name": "",
                            "description": "",
                            "customType": "Max depth limit reached"
                          }
                        ]
                      },
                      {
                        "name": "ingestion.schema_adapters.nodes.SameElementArrayNode.out",
                        "description": "",
                        "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.SameElementArrayNode.out",
                        "schema": [
                          {
                            "name": "",
                            "description": "",
                            "customType": "Max depth limit reached"
                          }
                        ]
                      },
                      {
                        "name": "ingestion.schema_adapters.nodes.UniqueIdNode.out",
                        "description": "",
                        "modelRef": "#/components/schemas/ingestion.schema_adapters.nodes.UniqueIdNode.out",
                        "schema": [
                          {
                            "name": "",
                            "description": "",
                            "customType": "Max depth limit reached"
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              {
                "name": "condition",
                "kind": "optional",
                "type": "object",
                "description": "Optional condition for applying schema. Used to evaluate if schema should be applied",
                "modelRef": "#/components/schemas/ingestion.schema_adapters.conditions.MatchCondition.out",
                "customType": "ingestion.schema_adapters.conditions.MatchCondition.out",
                "schema": [],
                "complexType": "oneOf",
                "complexItems": [
                  {
                    "name": "ingestion.schema_adapters.conditions.NotCondition.out",
                    "description": "",
                    "modelRef": "#/components/schemas/ingestion.schema_adapters.conditions.NotCondition.out",
                    "schema": [
                      {
                        "name": "type",
                        "kind": "optional",
                        "type": "string",
                        "example": "",
                        "default": "not"
                      },
                      {
                        "name": "condition",
                        "kind": "optional",
                        "type": "object",
                        "description": "",
                        "modelRef": "#/components/schemas/ingestion.schema_adapters.conditions.MatchCondition.out",
                        "customType": "ingestion.schema_adapters.conditions.MatchCondition.out",
                        "schema": [],
                        "complexType": "oneOf",
                        "complexItems": [
                          {
                            "name": "ingestion.schema_adapters.conditions.NotCondition.out",
                            "description": "",
                            "modelRef": "#/components/schemas/ingestion.schema_adapters.conditions.NotCondition.out",
                            "schema": [
                              {
                                "name": "",
                                "description": "",
                                "customType": "Circular-Reference"
                              }
                            ]
                          },
                          {
                            "name": "ingestion.schema_adapters.conditions.ValidIdentifierCondition.out",
                            "description": "",
                            "modelRef": "#/components/schemas/ingestion.schema_adapters.conditions.ValidIdentifierCondition.out",
                            "schema": [
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "example": "",
                                "default": "valid_identifier"
                              },
                              {
                                "name": "fieldName",
                                "kind": "optional",
                                "type": "string",
                                "example": ""
                              },
                              {
                                "name": "validValues",
                                "kind": "optional",
                                "type": "array",
                                "example": "",
                                "itemType": "string",
                                "customType": "string[]",
                                "itemExample": "",
                                "itemDefault": ""
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "ingestion.schema_adapters.conditions.ValidIdentifierCondition.out",
                    "description": "",
                    "modelRef": "#/components/schemas/ingestion.schema_adapters.conditions.ValidIdentifierCondition.out",
                    "schema": [
                      {
                        "name": "type",
                        "kind": "optional",
                        "type": "string",
                        "example": "",
                        "default": "valid_identifier"
                      },
                      {
                        "name": "fieldName",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "validValues",
                        "kind": "optional",
                        "type": "array",
                        "example": "",
                        "itemType": "string",
                        "customType": "string[]",
                        "itemExample": "",
                        "itemDefault": ""
                      }
                    ]
                  }
                ]
              },
              {
                "name": "autoDetectable",
                "kind": "optional",
                "type": "boolean",
                "description": "Whether the schema can be used in schema auto-detection. Can only be true if schema has condition",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/ingestion.settings.IngestMessageSchema.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "WTxYvHvoFeEAfbbDIDfzs",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/ingest/settings/ingest-schema \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"schema\": {\n     \"type\": \"explode\",\n     \"subComponents\": {\n     \"type\": \"customer_id\"\n     }\n     },\n     \"condition\": {\n     \"type\": \"not\",\n     \"condition\": {}\n     }\n     }'"
        },
        {
          "id": "If8oAxVtYVHXsGLMXJR1a",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"schema\": {\n      \"type\": \"explode\",\n      \"subComponents\": {\n         \"type\": \"customer_id\"\n      }\n   },\n   \"condition\": {\n      \"type\": \"not\",\n      \"condition\": {}\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/ingest/settings/ingest-schema\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "mBjLAUMJE6l9h7mL3dUq3",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/ingest/settings/ingest-schema\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"schema\": {\n      \"type\": \"explode\",\n      \"subComponents\": {\n         \"type\": \"customer_id\"\n      }\n   },\n   \"condition\": {\n      \"type\": \"not\",\n      \"condition\": {}\n   }\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "J7WrZJEUN3fDPW7LfQH4Q",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/ingest/settings/ingest-schema\"\n\npayload = json.dumps({\n   \"schema\": {\n      \"type\": \"explode\",\n      \"subComponents\": {\n         \"type\": \"customer_id\"\n      }\n   },\n   \"condition\": {\n      \"type\": \"not\",\n      \"condition\": {}\n   }\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "WTxYvHvoFeEAfbbDIDfzs"
    },
    "results": {
      "languages": [
        {
          "id": "LW-X2WY88gql1fFJlS3XX",
          "language": "200",
          "code": "// Successful request\n{\n  \"id\": \"\",\n  \"createTimeInSeconds\": \"\",\n  \"updateTimeInSeconds\": \"\",\n  \"schema\": {\n    \"type\": \"\",\n    \"sourceName\": \"\",\n    \"subComponents\": {}\n  },\n  \"condition\": {},\n  \"autoDetectable\": false\n}"
        }
      ],
      "selectedLanguageId": "LW-X2WY88gql1fFJlS3XX"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}