Skip to main content
POST
/
index-pipelines
Create an index pipeline
import requests

url = "https://{FUSION HOST}/api/index-pipelines"

payload = {
    "id": "my-index-pipeline",
    "stages": [
        {
            "id": "field_mapping",
            "type": "field-mapping",
            "reservedFieldsMappingAllowed": False
        },
        {
            "id": "solr_dynamic_field_mapping",
            "type": "solr-dynamic-field-name-mapping",
            "advancedTextFieldsIndexing": True
        },
        {
            "id": "solr_indexing",
            "type": "solr-index",
            "fieldsList": False
        }
    ]
}
headers = {
    "Authorization": "Basic <encoded-value>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
{
  "id": "my-index-pipeline",
  "stages": [
    {
      "id": "field_mapping",
      "translationMappings": [],
      "retentionMappings": [],
      "updateMappings": [],
      "unmappedRule": {
        "keep": true,
        "delete": false,
        "fieldToMoveValuesTo": "",
        "fieldToCopyValuesTo": "",
        "valueToAddToUnmappedFields": "",
        "valueToSetOnUnmappedFields": ""
      },
      "reservedFieldsMappingAllowed": false,
      "type": "field-mapping",
      "skip": false,
      "secretSourceStageId": "field_mapping"
    },
    {
      "id": "solr_dynamic_field_mapping",
      "duplicateSingleValuedFields": false,
      "fieldsToExclude": [],
      "advancedTextFieldsIndexing": true,
      "maxTextLengthForAdvancedIndexing": 100,
      "type": "solr-dynamic-field-name-mapping",
      "skip": false,
      "secretSourceStageId": "solr_dynamic_field_mapping"
    },
    {
      "id": "solr_indexing",
      "enforceSchema": true,
      "fieldsList": false,
      "dateFormats": [],
      "params": [],
      "bufferDocsForSolr": true,
      "allowBlacklistedRequestParameters": false,
      "type": "solr-index",
      "skip": false,
      "secretSourceStageId": "solr_indexing"
    }
  ],
  "properties": {
    "secretSourcePipelineId": "my-index-pipeline"
  }
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Query Parameters

context
string

The app to which this object belongs, as app:SomeApp. If the app doesn't exist, the request fails. Other comma-separated contexts in the context parameter are allowed but ignored.

Body

application/json

A JSON object defining the index pipeline.

id
string

The index pipeline ID.

stages
object[]

The stages in this index pipeline and their configurations. Use /api/index-stages/schema and /api/index-stages/schema/{type} to get the configuration schemas for the available index stage types.

properties
object

Additional properties defining this index pipeline.

Response

201 - application/json

Created

A JSON object defining the index pipeline.

id
string

The index pipeline ID.

stages
object[]

The stages in this index pipeline and their configurations. Use /api/index-stages/schema and /api/index-stages/schema/{type} to get the configuration schemas for the available index stage types.

properties
object

Additional properties defining this index pipeline.