Skip to main content
Skip table of contents

Merge Types and Discovery

The /types resource provides information about the merge types available through the REST service.

HTTP Request
TEXT
GET /api/v1/ditamerge/types
Response
XML
<MergeTypes>
    <Types>
        <ThreeWayMerge>
            <Links>
                <Links>
                    <rel>self</rel>
                    <href>/api/ditamerge/v1/types/threeway</href>
                </Links>
            </Links>
        </ThreeWayMerge>
        <ConcurrentMerge>
            <Links>
                <Links>
                    <rel>self</rel>
                    <href>/api/ditamerge/v1/types/concurrent</href>
                </Links>
            </Links>
        </ConcurrentMerge>
        <SequentialMerge>
            <Links>
                <Links>
                    <rel>self</rel>
                    <href>/api/ditamerge/v1/types/sequential</href>
                </Links>
            </Links>
        </SequentialMerge>
    </Types>
</MergeTypes>

An equivalent JSON result could be obtained by using the relevant HTTP Accept header:

HTTP Request
TEXT
GET /api/v1/ditamerge/types
Accept application/json
Response
JS
{
    "Types": {
        "ThreeWayMerge": {
            "Links": [
                {
                    "rel": "self",
                    "href": "/api/ditamerge/v1/types/threeway"
                }
            ]
        },
        "ConcurrentMerge": {
            "Links": [
                {
                    "rel": "self",
                    "href": "/api/ditamerge/v1/types/concurrent"
                }
            ]
        },
        "SequentialMerge": {
            "Links": [
                {
                    "rel": "self",
                    "href": "/api/ditamerge/v1/types/sequential"
                }
            ]
        }
    }
}

Further discovery of the merge type parameters and their default values is possible by using the specific types resource - i.e. /types/{typeName}

HTTP Request
TEXT
GET /api/v1/ditamerge/types/sequential

XML

Response
XML
<SequentialMerge>
    <ResultType>DELTAV2</ResultType>
    <Configuration>
        <WordByWord>true</WordByWord>
		<ElementSplitting>true</ElementSplitting>
        <CalsTableProcessing>true</CalsTableProcessing>
        <HtmlTableProcessing>true</HtmlTableProcessing>
        <Indent>false</Indent>
        <FormattingElementsConfiguration enabled="false">
            <AddFormattingElements/>
            <RemoveFormattingElements/>
            <SetFormattingElements/>
          <DefaultFormattingElements>tt,sub,parmname,msgph,sup,uicontrol,filepath,userinput,term,lines,codeph,sep,wintitle,msgnum,b,pre,systemoutput,var,i,q,apiname,u,cmdname,cite,tm</DefaultFormattingElements>
        </FormattingElementsConfiguration>
        <DoctypePreservationMode>PRESERVE_WHEN_UNCHANGED</DoctypePreservationMode>
        <EntityReferencePreservationMode>PRESERVE_REFERENCES</EntityReferencePreservationMode>
        <CalsValidationLevel>RELAXED</CalsValidationLevel>
        <InvalidCalsTableBehaviour>PROPAGATE_UP</InvalidCalsTableBehaviour>
        <WarningReportMode>PROCESSING_INSTRUCTIONS</WarningReportMode>
        <FormattingOutputType>DELTA_V_2_1</FormattingOutputType>
        <FormatExtractionPriorityList/>
    </Configuration>
    <Links>
        <Links>
            <rel>self</rel>
            <href>/api/ditamerge/v1/types/sequential</href>
        </Links>
    </Links>
</SequentialMerge>

JSON

Response
JS
{
    "ResultType": "DELTAV2",
    "Configuration": {
        "WordByWord": true,
		"ElementSplitting": true,
        "CalsTableProcessing": true,
        "HtmlTableProcessing": true,
        "Indent": false,
        "FormattingElementsConfiguration": {
            "AddFormattingElements": [],
            "RemoveFormattingElements": [],
            "SetFormattingElements": [],
            "enabled": false,
            "DefaultFormattingElements": "tt,sub,parmname,msgph,sup,uicontrol,filepath,userinput,term,lines,codeph,sep,wintitle,msgnum,b,pre,systemoutput,var,i,q,apiname,u,cmdname,cite,tm"
        },
        "DoctypePreservationMode": "PRESERVE_WHEN_UNCHANGED",
        "EntityReferencePreservationMode": "PRESERVE_REFERENCES",
        "CalsValidationLevel": "RELAXED",
        "InvalidCalsTableBehaviour": "PROPAGATE_UP",
        "WarningReportMode": "PROCESSING_INSTRUCTIONS",
        "FormattingOutputType": "DELTA_V_2_1",
        "FormatExtractionPriorityList": []
    },
    "Links": [
        {
            "rel": "self",
            "href": "/api/ditamerge/v1/types/sequential"
        }
    ]
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.