GetEntityPortraitGraph

Updated at:

Retrieves the fact graph of an entity portrait.

Operation description

Returns the fact nodes in an entity portrait and the relationships between these nodes. You can filter the results by dimension, fact type, and text.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cms:GetEntityPortraitGraph

get

*Workspace

acs:cms:{#regionId}:{#accountId}:workspace/{#WorkspaceName}

None None

Request syntax

GET /v1/workspaces/{workspace}/entities/{entityType}/{entityId}/portrait/graph HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

workspace

string

Yes

The workspace.

prod-cn-beijing

entityType

string

Yes

The entity type.

acs.ack.cluster

entityId

string

Yes

The entity ID.

c1a2b3c4d5e6f7890

Request parameters

Parameter

Type

Required

Description

Example

dimension

string

No

Filters facts by a specific cognitive dimension. Valid values: user_input, infrastructure, compute, workload, delivery, dependency, security, resilience, and observability.

infrastructure

factType

string

No

The fact type. Valid values: world, experience, and observation.

Valid values:

  • world
  • experience
  • observation

world

q

string

No

The text used to filter facts.

Node pool

limit

integer

No

The maximum number of fact nodes to return. Default value: 1000. Maximum value: 1000. Edges exist only between the returned nodes. You cannot use offset for pagination.

1000

Response elements

Element

Type

Description

Example

object

The fact nodes returned in the current request, the edges between the nodes, and the total number of facts that match the filter conditions.

workspace

string

The workspace.

prod-cn-beijing

nodes

array<object>

The fact nodes.

object

id

string

The node ID.

mem_01

label

string

The node label.

world

text

string

The fact text.

The node pool uses pay-as-you-go elastic nodes

factType

string

The fact type. This value is null if the node does not have a type.

world

context

string

The context.

The node pool uses pay-as-you-go elastic nodes

entities

string

The entities.

nodepool

tags

array

The tags.

string

A tag on a fact node, such as a dimension identifier.

infrastructure

occurredStart

string

The time when the fact occurred. This value is null if the occurrence time is not available.

2026-12-01T06:00:00Z

mentionedAt

string

The time when the fact was mentioned. This value is null if the mention time is not available.

2026-12-01T06:00:00Z

edges

array<object>

The edges between facts. These edges connect only the nodes returned in the current request.

object

id

string

The edge ID.

edge_01

source

string

The source node.

mem_01

target

string

The target node.

mem_02

linkType

string

The relationship type.

semantic

weight

number

The relationship weight.

0.8

entityName

string

The entity name on the relationship.

nodepool

total

integer

The total number of facts that match the filter conditions.

12

limit

integer

The actual maximum number of nodes returned in the current request.

1000

Examples

Success response

JSON format

{
  "workspace": "prod-cn-beijing",
  "nodes": [
    {
      "id": "mem_01",
      "label": "world",
      "text": "The node pool uses pay-as-you-go elastic nodes",
      "factType": "world",
      "context": "The node pool uses pay-as-you-go elastic nodes",
      "entities": "nodepool",
      "tags": [
        "infrastructure"
      ],
      "occurredStart": "2026-12-01T06:00:00Z",
      "mentionedAt": "2026-12-01T06:00:00Z"
    }
  ],
  "edges": [
    {
      "id": "edge_01",
      "source": "mem_01",
      "target": "mem_02",
      "linkType": "semantic",
      "weight": 0.8,
      "entityName": "nodepool"
    }
  ],
  "total": 12,
  "limit": 1000
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.