Configuring Scope, Customizing Output Properties, and Exporting JSON

QueryBase Hierarchical Queries provide complete control over what model data is extracted from your Visual Paradigm Cloud workspace. By defining targeted scope conditions and selecting exact property fields, you can generate lightweight, tailor-made JSON payloads for downstream processing.


The 3-Step Extraction Workflow

Extracting hierarchical JSON from QueryBase follows an intuitive, step-by-step process designed to minimize data noise and maximize output efficiency:
  1. Define Scope Conditions: Filter targeted Projects, Diagrams, and Elements.
  2. Customize Included Properties: Pick exact attributes (e.g., Name, ID, Stereotype, Custom Tags) to feature in the payload.
  3. Export Query and Download JSON: Preview live JSON and download or copy the payload.

1. Configuring Scope Conditions

Defining a precise query scope ensures that your JSON payload contains only the relevant model assets. QueryBase allows multi-tier scope filtering across three levels:

Project Scope

Select specific projects or repositories from your cloud workspace. You can target a single active project or query across multiple related enterprise projects simultaneously.

Diagram Scope

Narrow the scope to specific diagram types (e.g., only Use Case Diagrams, BPMN Business Processes, or Entity Relationship Diagrams) or select individual diagrams by name.

Element Scope & Filters

Filter diagram shapes using logical conditions:
  • Element Type: Restrict extraction to specific shapes like Actor, Class, Task, or Database Table.
  • Stereotype: Filter elements carrying designated stereotypes (e.g., «Primary» or «RESTful»).
  • Name Conditions: Apply string matchers like Contains, Starts With, or exact keyword matches.
3. Generating & Exporting JSON
Once your scope and property selections are set, QueryBase builds the JSON structure dynamically:
  1. Run Query Preview: Click Execute Query to view the structured JSON hierarchy directly in the built-in web editor with full code highlighting.
  2. Verify Payload: Inspect the live output tree to ensure all required fields and element nodes are accurately represented.
  3. Export Payload:
    • Download JSON File: Save the payload as a .json file for immediate use in external toolchains.
    • Copy to Clipboard: Instantly copy raw JSON formatted for quick pasting into code editors or REST client tools.

Best Practices for Optimized JSON Extractions

  • Exclude Unused Properties: Stripping out spatial properties (like position coordinates) when only data definitions are needed can reduce file sizes by up to 70%.
  • Save Query Configurations: Reuse your scope and property filter rules across future cloud project runs to maintain consistent JSON schema structures. Click on Export Query at the top of the page to output the query.
Scroll to Top