Updated on 2025-12-25 GMT+08:00

Querying Scene Analysis Plugin Information

Function

This API is used to query the information about the application analysis capability in a scene, including information about the applications, parameters, and function details.

URI

GET /v2/{project_id}/graphs/scenes

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID. For details about how to obtain a project ID, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain up to 64 characters. Only letters and digits are allowed.

Default Value

N/A

Table 2 Query parameters

Parameter

Mandatory

Type

Description

scene_name

No

String

Definition

Scene name.

Constraints

  • When only scene_name has a value, all application details under that specific scene will be returned.
  • When both scene_name and application_name have values, the application details corresponding to the specified application will be returned.
  • When none of scene_name, application_name, or graph_id have values, all scene applications will be returned.

Range

N/A

Default Value

N/A

application_name

No

String

Definition

Application name.

Constraints

  • When both scene_name and application_name have values, the application details corresponding to the specified application will be returned.
  • When none of scene_name, application_name, or graph_id have values, all scene applications will be returned.

Range

N/A

Default Value

N/A

graph_id

No

String

Definition

Graph ID.

Constraints

  • When only graph_id has a value, the details of the subscribed application under the corresponding graph ID will be returned.
  • When none of scene_name, application_name, or graph_id have values, all scene applications will be returned.

Range

N/A

Default Value

N/A

Request Parameters

Table 3 Request header parameter

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. It is used to obtain the permission to call APIs. For how to obtain the token, see Authentication. (The token is the value of X-Subject-Token in the response header.)

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

results

Array of results objects

Definition

Scene analysis plug-in information.

Range

N/A

Table 5 results

Parameter

Type

Description

scene

String

Definition

Scene name.

Range

N/A

name

String

Definition

Application name

Range

N/A

params

Array of params objects

Definition

Parameter list.

Range

N/A

description

String

Definition

Description of an application in a scene.

Range

N/A

Table 6 params

Parameter

Type

Description

name

String

Definition

Parameter name.

Range

N/A

type

String

Definition

Parameter type. The value range is ["string","int"]. Currently, only "string" is supported.

Range

N/A

default_value

String

Definition

The value can be left blank or a specified value. If left blank, you must pass in this parameter when using it.

Range

N/A

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Definition

System prompt.

  • If the execution succeeds, this parameter may be left blank.
  • If the execution fails, this parameter is used to display the error code.

Range

N/A

error_msg

String

Definition

System prompt.

  • If the execution succeeds, this parameter may be left blank.
  • If the execution fails, this parameter is used to display the error message.

Range

N/A

Example Request

Query the information about the application analysis capability in a scene.

GET /v2/{project_id}/graphs/scenes?scene_name=xxx&application_name=xxx&graph_id=xxx

Example Response

Status code: 200

Example response for a successful request

{
  "results" : [ {
    "name" : "movie_recommendation",
    "description": "Recommend movies that friends are interested in. Graph constraints: (user)-[friends]->(user), (user)-[rates]->(movie)",
    "params" : [ {
      "name" : "user",
      "default_value" : "",
      "type" : "string"
    } ],
    "scene" : "MovieSocialNetwork_V2"
  }, {
    "name" : "friend_recommendation",
    "description": "Recommend people who you may be interested in (considering the relationships between potential friends and movie preference). Graph constraints: (user) -[friends]-> (user), (user) -[rates]-> (movie)",
    "params" : [ {
      "name" : "user",
      "default_value" : "",
      "type" : "string"
    } ],
    "scene" : "MovieSocialNetwork_V2"
  } ]
}

Status code: 404

Example response for a failed request

{
    "error_msg": "The graph does not exist or has been deleted.",
    "error_code": "GES.7000"
}

Status Codes

Return Value

Description

400 Bad Request

Request error.

401 Unauthorized

Authorization failed.

403 Forbidden

No operation permissions.

404 Not Found

No resources found.

500 Internal Server Error

Internal server error.

503 Service Unavailable

Service unavailable.