Generating Maps
It is possible to download maps in SVG, PDF or PNG (deprecated) format via API. Results are generated by a headless browser that utilizes the standard T-rank shareholder maps module. Parameter names are therefor a bit different for this endpoint than for the rest of the API.
In general, the endpoint accepts all parameters found in the URL when navigating around in T-rank shareholder maps. The easiest way to
configure the parameters for this endpoint is to experiment in shareholder maps and then copy all parameters from the URL to the generate_map call.
Endpoint URL
GET <host>/api/generate_map
The ID of the entry you are requesting a map for is not specified in the path as for the rest of the API, but in the remoteid parameter.
In addition to all parameters found in the standard shareholder maps module, the following parameters are supported:
| Parameter | Description |
|---|---|
| scale | Deprecated. Only applicable for export_format=png. Double > 0, default 1. The scale of the generated PNG. Doubling the scale will make the image 4 times bigger. Setting this setting too high will produce a gateway error response due to the response size limit on AWS Lambda. We highly recommend to use the SVG (or PDF) output format. |
| export_format | The supported values are png (default, deprecated), svg and pdf. PNG export will export a map similar to the ones in the user interface. SVG use another technology for rendering the graph (GraphViz), and yields in general better results. In addition, the SVG format will give a scalable image with much lesser footprint. PDF exports a pdf with the SVG embedded, in addition to a heading with company name and ID (similar to PDF export with improved layout in the user interface). The SVG format is strongly recommended |
| removes | Comma-separated list of IDs. The listed IDs, along with nodes connected to the requested entity only through these IDs, will be removed from the graph. |
| collapses | Comma-separated list of IDs. Nodes that are connected to the requested entity only through the listed IDs, will be removed from the graph |