Help Center/ Application Performance Management/ API Reference(2.0)/ APIs/ TRANSACTION/ Querying a Region's Environments on Which URLs Are Added for Tracing
Updated on 2023-08-02 GMT+08:00

Querying a Region's Environments on Which URLs Are Added for Tracing

Function

This API is used to query a region's environments on which URLs are added for tracing.

URI

POST /v1/apm2/openapi/transaction/business-env

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token obtained from IAM.

x-business-id

Yes

Long

Application ID.

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

business_id

Yes

Long

Application ID.

region

Yes

String

Region name.

start_time

No

String

Start time.

end_time

No

String

End time.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

env_entry_list

Array of EnvEntry objects

Environment list.

Table 4 EnvEntry

Parameter

Type

Description

env_id

Long

Environment ID.

env_name

String

Environment name.

Example Requests

Query the list of the ap-southeast-3 region's environments on which URLs are added for tracing. The application ID is 6.

/v1/apm2/openapi/transaction/business-env

{
  "region" : "xx-xxx-xxx",
  "business_id" : 6,
  "start_time" : "-20m",
  "end_time" : "now"
}

Example Responses

Status code: 200

OK: The request is successful.

{
  "env_entry_list" : [ {
    "env_id" : 48,
    "env_name" : "apm-api:xx-xxx-xxx"
  }, {
    "env_id" : 51,
    "env_name" : "config-web:xx-xxx-xxx"
  }, {
    "env_id" : 52,
    "env_name" : "lubanops-web:xx-xxx-xxx"
  }, {
    "env_id" : 295,
    "env_name" : "lubanops-api:xx-xxx-xxx"
  } ]
}

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.