Updated on 2023-08-02 GMT+08:00

Obtaining the Trend Graph

Function

This API is used to obtain the trend graph.

URI

POST /v1/apm2/openapi/view/metric/trend

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

x-business-id

Yes

Long

Application ID.

X-Auth-Token

Yes

String

User token obtained from IAM.

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

view_config

Yes

TrendView object

View configuration information.

instance_id

No

Long

Instance ID.

monitor_item_id

Yes

Long

Monitoring item ID.

env_id

Yes

Long

Environment ID.

start_time

Yes

String

Start time.

end_time

Yes

String

End time.

Table 3 TrendView

Parameter

Mandatory

Type

Description

view_type

Yes

String

View type.

Enumeration values:

  • trend
  • sumtable
  • rawtable

collector_name

Yes

String

Collector name.

metric_set

Yes

String

Name of the metric set corresponding to the view.

title

Yes

String

Title to be displayed.

table_direction

No

String

Direction of the table heading. Options: H (default): horizontal. V: vertical.

Enumeration values:

  • H
  • V

group_by

No

String

Group.

filter

No

String

Filter list model.

field_item_list

Yes

Array of FieldItem objects

Field list models to be displayed.

span

Yes

Boolean

Span.

span_field

Yes

String

Attribute of the span field.

order_by

No

String

Sorting order.

latest

No

String

Whether to display only the latest data.

Table 4 FieldItem

Parameter

Mandatory

Type

Description

function

Yes

String

Expression.

as

Yes

String

As.

default_value

No

String

Default value.

trace

No

Boolean

Trace or not.

precision

No

Integer

Percentage.

unit

No

String

Unit.

visible

Yes

Boolean

Visible or not.

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

line_list

Array of FrontLine objects

Trend graph data list.

latest_data_Time

Long

Last date and time.

Table 6 FrontLine

Parameter

Type

Description

point_list

Array of FrontPoint objects

Data point set.

title

String

Title.

unit

String

Unit.

precision

Integer

Percentage.

data_type

String

Date.

visible

Boolean

Visible or not.

Table 7 FrontPoint

Parameter

Type

Description

time

Long

Time.

value

Object

Value.

Example Requests

None

Example Responses

None

Status Codes

Status Code

Description

200

OK: The request is successful.

401

Unauthorized: No permissions.

403

Forbidden: Access forbidden.

404

Not Found: The requested resource is not found.

Error Codes

See Error Codes.