Home
Home
German Version
Support
Impressum
22.3 Release ►

    Main Navigation

    • Preparation
      • Connectors
      • Create an InSpire VM on Hyper-V
      • Initial Startup for G7 appliances
      • Setup InSpire G7 primary and Standby Appliances
    • Datasources
      • Configuration - Atlassian Confluence Connector
      • Configuration - Best Bets Connector
      • Configuration - Box Connector
      • Configuration - COYO Connector
      • Configuration - Data Integration Connector
      • Configuration - Documentum Connector
      • Configuration - Dropbox Connector
      • Configuration - Egnyte Connector
      • Configuration - GitHub Connector
      • Configuration - Google Drive Connector
      • Configuration - GSA Adapter Service
      • Configuration - HL7 Connector
      • Configuration - IBM Connections Connector
      • Configuration - IBM Lotus Connector
      • Configuration - Jira Connector
      • Configuration - JiveSoftware Jive Connector
      • Configuration - JVM Launcher Service
      • Configuration - LDAP Connector
      • Configuration - Microsoft Azure Principal Resolution Service
      • Configuration - Microsoft Dynamics CRM Connector
      • Configuration - Microsoft Exchange Connector
      • Configuration - Microsoft File Connector (Legacy)
      • Configuration - Microsoft File Connector
      • Configuration - Microsoft Graph Connector
      • Configuration - Microsoft Project Connector
      • Configuration - Microsoft SharePoint Connector
      • Configuration - Microsoft SharePoint Online Azure Principal Resolution Service
      • Configuration - Microsoft Stream Connector
      • Configuration - Microsoft Teams Connector
      • Configuration - Salesforce Connector
      • Configuration - SAP KMC Connector
      • Configuration - SemanticWeb Connector
      • Configuration - ServiceNow Connector
      • Configuration - SharePoint Online Connector
      • Configuration - Sitecore Connector
      • Configuration - Web Connector
      • Configuration - Yammer Connector
      • Configuration - Zoho Connector
      • Data Integration Guide with SQL Database by Example
      • Indexing user-specific properties (Documentum)
      • Installation & Configuration - Atlassian Confluence Sitemap Generator Add-On
      • Installation & Configuration - Caching Principal Resolution Service
      • Installation & Configuration - Jive Sitemap Generator
      • Installation & Configuration - Mindbreeze InSpire Insight Apps in Microsoft SharePoint On-Prem
      • Mindbreeze InSpire Insight Apps in Microsoft SharePoint Online
      • Mindbreeze Web Parts for Microsoft SharePoint
      • User Defined Properties (SharePoint 2013 Connector)
      • Whitepaper - Mindbreeze InSpire Insight Apps in Salesforce
    • Configuration
      • CAS_Authentication
      • Cognito JWT Authentication
      • Configuration - Alternative Search Suggestions and Automatic Search Expansion
      • Configuration - Back-End Credentials
      • Configuration - Chinese Tokenization Plugin (Jieba)
      • Configuration - CJK Tokenizer Plugin
      • Configuration - Collected Results
      • Configuration - CSV Metadata Mapping Item Transformation Service
      • Configuration - Entity Recognition
      • Configuration - Exporting Results
      • Configuration - External Query Service
      • Configuration - Filter Plugins
      • Configuration - GSA Late Binding Authentication
      • Configuration - Identity Conversion Service - Replacement Conversion
      • Configuration - InceptionImageFilter
      • Configuration - Index-Servlets
      • Configuration - Item Property Generator
      • Configuration - Japanese Language Tokenizer
      • Configuration - Kerberos Authentication
      • Configuration - Management Center Menu
      • Configuration - Metadata Enrichment
      • Configuration - Metadata Reference Builder Plugin
      • Configuration - Mindbreeze Proxy Environment (Remote Connector)
      • Configuration - Notifications
      • Configuration - Personalized Relevance
      • Configuration - Plugin Installation
      • Configuration - Principal Validation Plugin
      • Configuration - Profile
      • Configuration - QueryExpr Label Transformer Service
      • Configuration - Reporting Query Logs
      • Configuration - Reporting Query Performance Tests
      • Configuration - Request Header Session Authentication
      • Configuration - Shared Configuration (Windows)
      • Configuration - Vocabularies for Synonyms and Suggest
      • Configuration of Thumbnail Images
      • Cookie-Authentication
      • Documentation - Mindbreeze InSpire
      • I18n Item Transformation
      • Installation & Configuration - Outlook Add-In
      • Installation - GSA Base Configuration Package
      • Language detection - LanguageDetector Plugin
      • Mindbreeze Personalization
      • Mindbreeze Property Expression Language
      • Mindbreeze Query Expression Transformation
      • Non-Inverted Metadata Item Transformer
      • SAML-based Authentication
      • Trusted Peer Authentication for Mindbreeze InSpire
      • Using the InSpire Snapshot for Development in a CI_CD Scenario
      • Whitepaper - MMC_ Services
      • Whitepaper - SSO with Microsoft AAD or AD FS
      • Whitepaper - Text Classification Insight Services
    • Operations
      • app.telemetry Statistics Regarding Search Queries
      • Configuration - app.telemetry dashboards for usage analysis
      • Configuration Usage Analysis
      • Deletion of Hard Disks
      • Handbook - Backup & Restore
      • Handbook - Command Line Tools
      • Handbook - Distributed Operation (G7)
      • Handbook - Filemanager
      • Handbook - Indexing and Search Logs
      • Handbook - Updates and Downgrades
      • Index Operating Concepts
      • Inspire Diagnostics and Resource Monitoring
      • InSpire Support Documentation
      • Mindbreeze InSpire SFX Update
      • Provision of app.telemetry Information on G7 Appliances via SNMPv3
      • Restoring to As-Delivered Condition
    • User Manual
      • Browser Extension
      • Cheat Sheet
      • iOS App
      • Keyboard Operation
    • SDK
      • api.v2.alertstrigger Interface Description
      • api.v2.export Interface Description
      • api.v2.personalization Interface Description
      • api.v2.search Interface Description
      • api.v2.suggest Interface Description
      • api.v3.admin.SnapshotService Interface Description
      • Debugging (Eclipse)
      • Developing an API V2 search request response transformer
      • Developing Item Transformation and Post Filter Plugins with the Mindbreeze SDK
      • Development of Insight Apps
      • Embedding the Insight App Designer
      • Java API Interface Description
    • Release Notes
      • Release Notes 20.1 Release - Mindbreeze InSpire
      • Release Notes 20.2 Release - Mindbreeze InSpire
      • Release Notes 20.3 Release - Mindbreeze InSpire
      • Release Notes 20.4 Release - Mindbreeze InSpire
      • Release Notes 20.5 Release - Mindbreeze InSpire
      • Release Notes 21.1 Release - Mindbreeze InSpire
      • Release Notes 21.2 Release - Mindbreeze InSpire
      • Release Notes 21.3 Release - Mindbreeze InSpire
      • Release Notes 22.1 Release - Mindbreeze InSpire
      • Release Notes 22.2 Release - Mindbreeze InSpire
      • Release Notes 22.3 Release - Mindbreeze InSpire
    • Security
      • Known Vulnerablities
    • Product Information
      • Product Information - Mindbreeze InSpire - Standby
      • Product Information - Mindbreeze InSpire
    Home

    Path

    Sure, you can handle it. But should you?
    Let our experts manage the tech maintenance while you focus on your business.
    See Consulting Packages

    api.v2.export

    Interface Description

    Copyright ©

    Mindbreeze GmbH, A-4020 Linz, July 2022.

    All rights reserved. All hardware and software names are brand names and/or trademarks of their respective manufacturers.

    These documents are strictly confidential. The submission and presentation of these documents does not confer any rights to our software, our services and service outcomes or other protected rights.

    The dissemination, publication or reproduction hereof is prohibited.

    For ease of readability, gender differentiation has been waived. Corresponding terms and definitions apply within the meaning and intent of the equal treatment principle for both sexes.

    .

    OverviewPermanent link for this heading

    Mindbreeze InSpire enables the export of search results with a simple interface. This interface is based on HTTP and JSON.

    Synchronous ExportPermanent link for this heading

    Synchronous Export is only available for the Excel and CSV formats.

    The Export can be downloaded with a HTTP/POST request directly with the URL <Client Service URL>/api/v2/export.

    The  HTTP/POST request contains the search request and some options.

    {
        "search_request": {
            "sort_date_facets_by_value": true,
            "content_sample_length": 300,
            "count": 10,
            "alternatives_query_spelling_max_estimated_count": 50,
            "properties": [{
                    "formats": ["HTML", "VALUE"],
                    "name": "title"
                }, {
                    "formats": ["HTML", "VALUE"],
                    "name": "mes:date"
                }, {
                    "formats": ["HTML", "VALUE"],
                    "name": "mes:size"
                }, {
                    "formats": ["HTML", "VALUE"],
                    "name": "action_0"
                }
            ],
            "user": {
                "query": {
                    "and": [{
                            "unparsed": "ALL",
                            "id": "query"
                        }
                    ]
                },
                "constraints": []
            },
            "source_context": {
                "constraints": [{
                        "unparsed": "ALL",
                        "id": "view_base"
                    }
                ]
            },
            "generate_available_properties_and_facets": true
        },
        "id": "ALL_10:11",
        "name": "my testexport",
        "groupby_properties": [],
        "batch_size": 1000,
        "allow_duplicate": false,
        "currentTime": "10:11",
        "add_description_of_search_request": true,
        "export_format": "application/x-ms-excel"
    }

    The property export_format specifies the format of the exported query results.

    The following export formats are supported:

    • application/x-ms-excel Microsoft Excel XSLX file
    • text/csv  CSV file

    Asynchronous ExportPermanent link for this heading

    The export takes place in two steps. First, an export request must be saved using persisted resources. This returns a path (ID) for the export, which can then be run and retrieved by accessing the export interface.

    Saving the export request Permanent link for this heading

    The export request is sent as HTTP POST to a client service. The path for storing the export request is: <Client Service URL>/api/v2/persistedresources

    The request takes the following form:

    {
        "create": {
            "path": ["queryexports", "default"],
            "data": "<exportrequest>"
        }
    }

    The <exportrequest> is stored as a string in the data property and takes the following form:

    {
        "search_request": {
            "sort_date_facets_by_value": true,
            "content_sample_length": 300,
            "count": 10,
            "alternatives_query_spelling_max_estimated_count": 50,
            "properties": [{
                    "formats": ["HTML", "VALUE"],
                    "name": "title"
                }, {
                    "formats": ["HTML", "VALUE"],
                    "name": "mes:date"
                }, {
                    "formats": ["HTML", "VALUE"],
                    "name": "mes:size"
                }, {
                    "formats": ["HTML", "VALUE"],
                    "name": "action_0"
                }
            ],
            "user": {
                "query": {
                    "and": [{
                            "unparsed": "ALL",
                            "id": "query"
                        }
                    ]
                },
                "constraints": []
            },
            "source_context": {
                "constraints": [{
                        "unparsed": "ALL",
                        "id": "view_base"
                    }
                ]
            },
            "generate_available_properties_and_facets": true
        },
        "export_format": "undefined",
        "id": "ALL_10:11",
        "name": "my testexport",
        "groupby_properties": [],
        "batch_size": 1000,
        "allow_duplicate": false,
        "currentTime": "10:11",
        "add_description_of_search_request": true
    }

    In response, the status of the request is returned along with the path to run the export.

    {
        "persisted_resources": [{
                "path": ["queryexports", "default", "4"],
                "data": "<exportrequest>"
            }
        ],
        "persisted_resource_request": {
            "create": {
                "path": ["queryexports", "default"],
                "data": "<exportrequest>"
            },
            "user_context": {}
        },
        "status": {
            "success": true
        }
    }

    In this example, the response returns the path queryexports/default/4.

    Starting a saved exportPermanent link for this heading

    The export request is sent as HTTP GET to a client service. The URL for starting the export request is:

    <Client Service URL>/api/v2/exportAsync?resource_path=<path of the saved export>

    In this example the URL is: <Client Service URL>/api/v2/exportAsync?resource_path= queryexports/default/4

    The Export is started with this request. When it is ready to download the status changes from PROGRESS to SUCCESS.

    Checking the status of the exportPermanent link for this heading

    Every export and its status is saved. You can query the saved information about an export using the following request.

    Url: <Client Service URL>/api/v2/persistedresources

    The request takes the following form:

    {
        "read": {
            "path": ["queryexports", "default", "4"]
        }
    }

    The path option identifies the export whose status is to be retrieved. The response returns status, status_description, and the downloaded_timestamp. Because this information is stored in persisted resources, it can be retrieved at any time.

    {
        "persisted_resources": [{
                "path": [
                    "queryexports",
                    "default",
                    "16"
                ],
                "data":  < exportrequest > ,
                "property": [{
                        "key": "status_description",
                        "value": ""
                    }, {
                        "key": "downloaded_timestamp",
                        "value": "2017-05-18T09:24:47+02:00"
                    }, {
                        "key": "status",
                        "value": "SUCCESS"
                    }
                ],
                "created": "2017-05-18T09:24:43+02:00",
                "lastmod": "2017-05-18T09:24:47+02:00",
                "owner": "administrator@testlab.mindbreeze.fabagl.fabasoft.com",
                "operations": {
                    "operations": [
                        "READ",
                        "UPDATE",
                        "REMOVE",
                        "CREATE"
                    ]
                }
            }
        ],
        "persisted_resource_request": {
            "read": {
                "path": [
                    "queryexports",
                    "default",
                    "16"
                ]
            },
            "user_context": {}
        },
        "status": {
            "success": true
        }
    }

    Downloading the ResultPermanent link for this heading

    When the status changed from PROGRESS to SUCCESS the export can be downloaded with the URL:

    <Client Service URL>/api/v2/export?resource_path=<path of the saved export>

    In this example the URL is: <Client Service URL>/api/v2/export?resource_path=queryexports/default/4

    Export optionsPermanent link for this heading

    Using the export options in the export request, you can configure the result.

    Determining the properties to be exported per resultPermanent link for this heading

    In the search query, all properties that appear as "columns" in the result must be specified as follows:

    "properties": [{
            "formats": ["HTML", "VALUE"],
            "name": "title"
        }, {
            "formats": ["HTML", "VALUE"],
            "name": "mes:date"
        }, {
            "formats": ["HTML", "VALUE"],
            "name": "mes:size"
        }
    ]

    In this example, the title, date, and size are exported.

    Determining the export formatPermanent link for this heading

    The format in which the result of the search request/query should be delivered can be determined using the option export_format. If no export_format or an unavailable export_format is set, the default export format from the export options of the client service configuration is used.

    The following values and formats are available:

    application/x-ms-excel => A Microsoft Excel xlsx document is created.

    application/json => The results are exported as a JSON document.

    application/zip => The data is exported as a ZIP file.

    text/csv => The data is exported as CSV.

    Configuring the batch sizePermanent link for this heading

    The size of the requests can be configured to increase the performance. By default, 250 results are retrieved and processed by the query service until the next 250 results are retrieved. This batch size is selected to minimize the amount of memory required in the client service. The batch size can be increased to achieve better performance, but this requires more memory in the client service. The batch_size option allows the batch size to be increased up to the limit in the client service configuration.

    Preventing duplicates in the resultPermanent link for this heading

    Using the option allow_duplicate, you can prevent duplicates in the results. Duplicates can be removed in the results document with allow_duplicate: false

    Grouping valuesPermanent link for this heading

    As with SQL, the results can be grouped according to individual properties. The groupby_properties option contains the properties used for grouping.

    For example, to group by date and title, the groupby_properties option can be configured as follows:

    groupby_properties : [“mes:date“, “title“]

    It is important that the properties used for grouping are also requested in the search request.

    Cancelling an exportPermanent link for this heading

    An export can be cancelled by sending the original export request with the option "cancel_pending": true.

    The export request is carried out via HTTP POST to the URL <Client Service URL>/api/v2/export.

    Download PDF

    • api.v2.export Interface Description

    Content

    • Overview
    • Export options

    Download PDF

    • api.v2.export Interface Description