Search tips

apple banana
Find rows that contain at least one of the two words.

+apple +juice
Find rows that contain both words.

+apple macintosh
Find rows that contain the word 'apple', but rank rows higher if they also contain 'macintosh'.

+apple -macintosh
Find rows that contain the word 'apple' but not 'macintosh'.

+apple ~macintosh
Find rows that contain the word 'apple', but if the row also contains the word 'macintosh', rate it lower than if row does not. This is "softer" than a search for '+apple -macintosh', for which the presence of 'macintosh' causes the row not to be returned at all.

+apple +(>turnover >strudel)
Find rows that contain the words 'apple' and 'turnover', or 'apple' and 'strudel' (in any order), but rank 'apple turnover' higher than 'apple strudel'.

Find rows that contain words such as 'apple', 'apples', 'applesauce', or 'applet'.

"some words"
Find rows that contain the exact phrase 'some words' (for example, rows that contain 'some words of wisdom' but not "some noise words").

By continuing to use this site you agree to the use of cookies. For more information and to find out how to change this click here. Accept Cookies
Please enable cookies in your browser for this website.
Advanced search

How to Create a Custom Export Using API

Last updated: 2020-04-09

How can I create a custom export using the API in Squore?


This article will help you create a custom export using the API and integrate it in Squore.

The practical use case is: “Exporting level E files from model projects to an Excel file”.

All files mentioned hereafter can be found in the archive

SQUORE_HOME refers to the absolute Squore installation directory path.


  • Squore 19 or up should be installed and contain Software Analytics demo projects :
  • Following custom Highlight should exists in Squore, at project/application level :
    • Name: Get all Level E Files
    • Target Artefact Types: File (Alias)
    • Columns:
      • Measure: Line Count
    • Additional Filters
      • Indicator: Software Analytics
      • Valid Levels: Level E
    • For more information, see online documentation Creating Highlights.

Creating Custom Export

In <SQUORE_HOME>/configuration/exports folder:

  • Create new custom export folder: files_level_e_excel.

In <SQUORE_HOME>/configuration/exports/files_level_e_excel folder:

  • Create the custom export descriptions file
  • Create the custom export definition file form.xml.
  • Create the custom export main script file level_e_to_excel.groovy.
  • Create the custom export Excel template file template.xml.

In <SQUORE_HOME>/configuration/models/software_analytics/Exports folder:

  • Append your custom export, in file import.xml, add line :
    • <ExportDef name="files_level_e_excel" onArtefactTypes="MODEL" />

Testing Custom Export

Using the GUI :

  • Reload the configuration under Administration | Reload Configuration.
  • Select Software Analytics node in Project Portfolio and go in Documents tab.
  • In the Exports section, select your export in the drop-down list and click Create.
  • Compare the obtained Excel sheet with the one you can create in the Highlights tab.

Using the command line:

  • Edit file, where:
    • $ { SquorePath } is the absolute Squore installation directory path.
    • $ { PathResult } is the absolute path to the result folder.
    • $ { idModel } is the Model ID to use for the export.
    • $ { apiToken } is the token for using the REST API.
    • $ { templatePath } is the Excel template used to produce the output Excel file.
  • Execute file
  • NOTA: use test-command.bat file if you are on Windows.
Article Options
Views: 86
Rate this article: