Rendering static topologies via UI-API
You can use the UI-API to render a static topology view via cURL command, which you then download as an image. You use the resourceId parameter to seed the topology, and then define a number of additional parameters to generate a static server-side topology image.
To define a cURL string that renders a topology via the UI-API, you must know the URL for your core host, the resource ID for your seed resource, as well as the Agile Service Manager basic access authentication credentials.
The Agile Service Manager UI-API is available on the following
endpoints:
https://<ASM CORE HOST>/1.0/ui-api/render/svg
https://<ASM CORE HOST>/1.0/ui-api/render/png
You construct your cURL command as described in this procedure, then use it to download a static topology view as an image (either PNG or SVG).
In addition to the resourceId parameter, you use a
Basic authentication header when calling the UI-API. This lets you call the API
without having to log into the Agile Service Manager UI first.
- PNG example
-
curl -X GET "https://asm.example.host.com/1.0/ui-api/render/png?resourceId=sl1RQ5NCR_ykgciQCTkFGA" -H "accept: image/png" -H "authorization: Basic YXNtOmFzbQ=="
- SVG example
-
curl -X GET "https://asm.example.host.com/1.0/ui-api/render/svg?resourceId=sl1RQ5NCR_ykgciQCTkFGA" -H "accept: image/svg+xml" -H "authorization: Basic YXNtOmFzbQ=="
- The Agile Service Manager core host is
asm.example.host.com
- The resourceId that identifies the seed resource is
sl1RQ5NCR_ykgciQCTkFGA
- The output format is specified by either
png
orsvg
- The authorization method is specified as
Basic
- The encrypted user credentials (username and password) are
YXNtOmFzbQ==
Tips:
- You can use the width and height URL parameters
(exclusively for use with the UI-API) to set the size of the image produced; the default size is
1000 x 700
. - The hideToolbar and hideSearch parameters are not available when constructing an UI-API call. Parameters are listed here.
- You can include advanced resource or relationship filters in your URL by specifying 'type'. Topology filtering is described here.
- You can change the label length for your resource types, should the default label legibility be less than optimal in your topology image. Resource labels are described here.
Having created topology images, you can save them for quick access to specific views, or
share them with others to provide them with specific, instant information.