Cloud Services

ModernOps configuration

Topology APIs
Published On Oct 10, 2024 - 9:12 AM

Topology APIs

Learn how to retrieve Topology APIs and what they are used for.
The Topology data can also be retrieved using manual APIs. This page lists the available APIs and their functions.
To get to these APIs, complete these steps:
  1. Click the
    User
    icon in the upper right and select
    Developer Console
    .
  2. In the
    Application
    field, select
    mcmp-nextgen
    .
  3. In the
    Service
    field, select
    mcmp-impactanalysis-api-service
    (for fetching impact analysis data) or
    mcmp-topology-api-service
    (other).

Context Topology with pagination

This API retrieves the Topology data associated with the context values provided in the request body. Multiple parameters can be provided to filter the results.
  • Method:
    POST
  • Endpoint:
    /data
  • Request body:
    All these parameters are optional.
    { filters : { provider : [], account : [], network : [], tags : [], fetch_additional_resources : true } }
  • Parameters:
    • offset:
      The number of records from the beginning of the list to skip.
    • limit:
      The maximum number of records that you want to retrieve. The default is 100.

Fetch impact analysis data

To fetch the impact analysis data for a specific node, use the following API:
  • Method:
    POST
  • Endpoint:
    /predict
  • Parameters:
    All these parameters are optional.
    • data:
      The IDs of the nodes that you want impact analysis data for in the following format:
      { resourceId : [ arn:aws:eks:us-west-1:753022563888:cluster/eks-multinode-demo/namespaces/boutiqueappdemo/pods/a8d10a81-5cd1-4c4c-9221-b7f21e954914 , arn:aws:eks:us-west-1:753022563888:cluster/eks-multinode-demo/namespaces/boutiqueappdemo/pods/4c3c2a58-40e1-4bc5-b925-70874ddec533 , arn:aws:eks:us-west-1:753022563888:cluster/eks-multinode-demo/namespaces/boutiqueappdemo/pods/aa09a22d-dd85-4977-bbcc-20983d1c7212 ] }
  • Response for a single node:
    { success : true, resultMsg : { ImpactAnalysis : [ { impactedResource : arn:aws:ec2:us-west-2:554041277834:vms\\/i-0b1619a6388215b91 , impactedPercentage : 61.63, impactClass : B }, { impactedResource : arn:aws:ec2:us-west-2:554041277834:vms\\/i-0912bf0d265be635a , impactedPercentage : 59.56, impactClass : C }, { impactedResource : crn:v1:bluemix:public:is:eu-gb-2:a\\/f009d95aa83246aeac2e60abcb4874f6::instance:0797_18994a6f-e35e-4d19-870d-b5d353fc068e , impactedPercentage : 0, impactClass : E }, { impactedResource : arn:aws:ec2:us-west-2:554041277834:vms\\/i-0700a6d1e76aa50a5 , impactedPercentage : 57.94, impactClass : C }, { impactedResource : arn:aws:ec2:us-west-2:554041277834:vms\\/i-0f031cbf937c88713 , impactedPercentage : 90.14, impactClass : A }, { impactedResource : arn:aws:ec2:us-west-2:554041277834:vms\\/i-00a31f33290390817 , impactedPercentage : 60.29, impactClass : B } ] } }
A UI is being developed to streamline this process.

Topology service post applications API

This API allows the system to use tags other than the standard ones (app, application, and appName) to be used to group resources as part of an application in the Topology maps.
  • Method:
    POST
  • Endpoint:
    /applications/keys
  • Parameters:
    All these parameters are optional.
    • Application Keys:
      List all the tags that you want to use to determine what application a resource is assigned to in the following format:
      { appKeys : [] }

Topology service nodes API

Fetches Topology nodes based on the context supplied.
  • Method:
    POST
  • Endpoint:
    /data/nodes
  • Parameters:
    • filters:
      Provide all the filters that you want to use in your search in the following format:
      { filters : { provider : [], account : [], network : [], tags : [], fetch_additional_resources : true } }
    • offset:
      The number of results to remove from the start of the list of results.
    • limit:
      The maximum number of nodes to retrieve. The default is 100.

Topology service edges API

Fetches Topology edges based on the context supplied.
  • Method:
    POST
  • Endpoint:
    /data/edges
  • Parameters:
    • Filters:
      Provide all the filters that you want to use in your search in the following format:
      { filters : { provider : [], account : [], network : [], tags : [ { Key : MCMP-app , Value : app1 } ], connected_nodes : false } }
    • offset:
      The number of results to remove from the start of the list of results.
    • limit:
      The maximum number of nodes to retrieve. The default is 100.
Do you have two minutes for a quick survey?
Take Survey