com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Exporting a Model via REST API

Overview

DescriptionExport a model
Resource Path

api/models/{modelId}/export?mode={exportType}

HTTP MethodGET
Request/Response Formatapplication/octet-stream
Parameter description
Parameter
Description
{modelid}The ID of the model that you need to export.
{exportType}The format in which the model is exported.

Example

GET https://localhost:9443/api/models/{name}/export

Sample cURL command

curl -H "Content-Type: application/json" -H "Authorization: Basic YWRtaW46YWRtaW4=" -v https://localhost:9443/api/models/1/export?mode=pmml -k

Sample output

<?xml version="1.0" encoding="UTF-8"?><PMML xmlns="http://www.dmg.org/PMML-4_2" version="4.2">
    <Header description="linear regression">
        <Application name="Apache Spark MLlib"/>
        <Timestamp>2015-11-18T18:02:50</Timestamp>
    </Header>
    <DataDictionary numberOfFields="9">
        <DataField dataType="double" name="field_0" optype="continuous"/>
        <DataField dataType="double" name="field_1" optype="continuous"/>
        <DataField dataType="double" name="field_2" optype="continuous"/>
        <DataField dataType="double" name="field_3" optype="continuous"/>
        <DataField dataType="double" name="field_4" optype="continuous"/>
        <DataField dataType="double" name="field_5" optype="continuous"/>
        <DataField dataType="double" name="field_6" optype="continuous"/>
        <DataField dataType="double" name="field_7" optype="continuous"/>
        <DataField dataType="double" name="target" optype="continuous"/>
    </DataDictionary>
    <RegressionModel functionName="regression" modelName="linear regression">
        <MiningSchema>
            <MiningField name="field_0" usageType="active"/>
            <MiningField name="field_1" usageType="active"/>
            <MiningField name="field_2" usageType="active"/>
            <MiningField name="field_3" usageType="active"/>
            <MiningField name="field_4" usageType="active"/>
            <MiningField name="field_5" usageType="active"/>
            <MiningField name="field_6" usageType="active"/>
            <MiningField name="field_7" usageType="active"/>
            <MiningField name="target" usageType="target"/>
        </MiningSchema>
        <RegressionTable intercept="0.0">
            <NumericPredictor coefficient="0.18637180966084266" name="field_0"/>
            <NumericPredictor coefficient="0.09860314154841378" name="field_1"/>
            <NumericPredictor coefficient="0.07703949089962057" name="field_2"/>
            <NumericPredictor coefficient="0.02658539142216247" name="field_3"/>
            <NumericPredictor coefficient="0.1661298483263787" name="field_4"/>
            <NumericPredictor coefficient="0.0707509545901941" name="field_5"/>
            <NumericPredictor coefficient="0.03607354242895441" name="field_6"/>
            <NumericPredictor coefficient="0.04851007262677507" name="field_7"/>
        </RegressionTable>
    </RegressionModel>
</PMML>

 

REST API response

HTTP status code

200, 400, 404 or 500.

For descriptions of the HTTP status codes, see HTTP Status Codes.

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.