Updated on 2022-09-15 GMT+08:00

Querying Metric Details

Function

This API is used to query the details of a metric based on the ID.

URI

GET /v2/{project_id}/design/biz-metrics/{id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

id

Yes

String

Entity ID

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

latest

No

Boolean

Whether to query the latest data

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

id

Long

ID

name

String

Metric name. The value can contain letters, digits, underscores (_), hyphens (-), and parentheses ().

Maximum: 500

code

String

Metric code

name_alias

String

Metric name. The value can contain letters, digits, underscores (_), hyphens (-), and parentheses ().

Maximum: 500

biz_type

String

Business types

Enumeration values:

  • ATOMIC_INDEX

  • DERIVATIVE_INDEX

  • DIMENSION

  • DIMENSION_ATTRIBUTE

  • DIMENSION_HIERARCHIES

  • CONDITION_GROUP

  • TIME_CONDITION

  • COMMON_CONDITION

  • FACT_LOGIC_TABLE

  • TABLE_MODEL

  • DIMENSION_LOGIC_TABLE

  • STANDARD_ELEMENT

  • AGGREGATION_LOGIC_TABLE

  • TAG

  • CODE_TABLE

  • TABLE_MODEL_ATTRIBUTE

  • FACT_DIMENSION

  • FACT_ATTRIBUTE

  • FACT_MEASURE

  • SUMMARY_DIMENSION_ATTRIBUTE

  • SUMMARY_TIME

  • DIMENSION_TABLE_ATTRIBUTE

  • QUALITY_RULE

  • BIZ_METRIC

  • COMPOUND_METRIC

  • INFO_ARCH

  • DEGENERATE_DIMENSION

  • TABLE_MODEL_LOGIC

status

String

Business statuses

Enumeration values:

  • DRAFT

  • PUBLISH_DEVELOPING

  • PUBLISHED

  • OFFLINE_DEVELOPING

  • OFFLINE

  • REJECT

biz_catalog_id

Long

Business catalog ID

biz_catalog_path

String

Business catalog path

create_by

String

Creator

update_by

String

User who updated the business metric

data_origin

String

Data source

Maximum: 1000

unit

String

Unit

Maximum: 50

time_filters

String

Statistical period

Maximum: 500

dimensions

String

Statistical dimensions

Maximum: 1000

general_filters

String

Statistical standards and modifiers (general filters)

interval_type

String

Update frequency

Default: DAY

Enumeration values:

  • MINUTE

  • HOUR

  • DAY

  • WEEK

  • MONTH

  • YEAR

  • REAL_TIME

  • HALF_HOUR

  • QUART

  • DOUBLE_WEEK

  • HALF_YEAR

  • HALF_DAY

apply_scenario

String

Application scenario

Maximum: 255

technical_metric

Long

Technical metric associated with the business metric

technical_metric_name

String

Name of the technical metric associated with the business metric

technical_metric_type

String

Business types

Enumeration values:

  • ATOMIC_INDEX

  • DERIVATIVE_INDEX

  • DIMENSION

  • DIMENSION_ATTRIBUTE

  • DIMENSION_HIERARCHIES

  • CONDITION_GROUP

  • TIME_CONDITION

  • COMMON_CONDITION

  • FACT_LOGIC_TABLE

  • TABLE_MODEL

  • DIMENSION_LOGIC_TABLE

  • STANDARD_ELEMENT

  • AGGREGATION_LOGIC_TABLE

  • TAG

  • CODE_TABLE

  • TABLE_MODEL_ATTRIBUTE

  • FACT_DIMENSION

  • FACT_ATTRIBUTE

  • FACT_MEASURE

  • SUMMARY_DIMENSION_ATTRIBUTE

  • SUMMARY_TIME

  • DIMENSION_TABLE_ATTRIBUTE

  • QUALITY_RULE

  • BIZ_METRIC

  • COMPOUND_METRIC

  • INFO_ARCH

  • DEGENERATE_DIMENSION

  • TABLE_MODEL_LOGIC

measure

String

Measurement object

Maximum: 255

owner

String

Owner who is responsible for explaining the metric

Maximum: 600

owner_department

String

Metric management department. The value can contain letters, digits, underscores (_), hyphens (-), parentheses (), and spaces.

Maximum: 600

destination

String

Purpose

guid

String

GUID after asset synchronization

definition

String

Metric definition

expression

String

Calculation formula

remark

String

Remarks

approval_info

ApprovalVO object

Approval information

new_biz

BizVersionManageVO object

Business version management

create_time

String

Creation time

update_time

String

Update time

l1

String

Chinese name of the subject area group

l2

String

Chinese name of the subject area

l3

String

Chinese name of the business object

biz_metric

String

Business metric synchronization status

Enumeration values:

  • NO_NEED

  • CREATE_SUCCESS

  • CREATE_FAILED

  • UPDATE_SUCCESS

  • UPDATE_FAILED

  • SUMMARY_SUCCESS

  • SUMMARY_FAILED

  • RUNNING

  • OFFLINE

summary_status

String

Synchronization statistics status

Enumeration values:

  • NO_NEED

  • CREATE_SUCCESS

  • CREATE_FAILED

  • UPDATE_SUCCESS

  • UPDATE_FAILED

  • SUMMARY_SUCCESS

  • SUMMARY_FAILED

  • RUNNING

  • OFFLINE

Table 4 ApprovalVO

Parameter

Type

Description

id

Long

ID

tenant_id

String

tenant id

name_ch

String

Approval name in Chinese

name_en

String

Approval name in English

biz_id

Long

Business ID

biz_type

String

Business types

Enumeration values:

  • ATOMIC_INDEX

  • DERIVATIVE_INDEX

  • DIMENSION

  • DIMENSION_ATTRIBUTE

  • DIMENSION_HIERARCHIES

  • CONDITION_GROUP

  • TIME_CONDITION

  • COMMON_CONDITION

  • FACT_LOGIC_TABLE

  • TABLE_MODEL

  • DIMENSION_LOGIC_TABLE

  • STANDARD_ELEMENT

  • AGGREGATION_LOGIC_TABLE

  • TAG

  • CODE_TABLE

  • TABLE_MODEL_ATTRIBUTE

  • FACT_DIMENSION

  • FACT_ATTRIBUTE

  • FACT_MEASURE

  • SUMMARY_DIMENSION_ATTRIBUTE

  • SUMMARY_TIME

  • DIMENSION_TABLE_ATTRIBUTE

  • QUALITY_RULE

  • BIZ_METRIC

  • COMPOUND_METRIC

  • INFO_ARCH

  • DEGENERATE_DIMENSION

  • TABLE_MODEL_LOGIC

biz_info

String

Business information

biz_info_obj

Object

Business information object

biz_version

Integer

Business version

biz_status

String

Business statuses

Enumeration values:

  • DRAFT

  • PUBLISH_DEVELOPING

  • PUBLISHED

  • OFFLINE_DEVELOPING

  • OFFLINE

  • REJECT

approval_status

String

Approval statuses

Enumeration values:

  • DEVELOPING

  • APPROVED

  • REJECT

  • WITHDREW

approval_type

String

Approval types

Enumeration values:

  • PUBLISH

  • OFFLINE

submit_time

String

Submission time

create_by

String

Creator

l1

String

Subject area group

l2

String

Subject area

l3

String

Business object

approval_time

String

Approval time

approver

String

Approver

email

String

Approver email address

msg

String

Approval message

directory_path

String

Directory tree

Table 5 BizVersionManageVO

Parameter

Type

Description

id

Long

ID information

biz_type

String

Business types

Enumeration values:

  • ATOMIC_INDEX

  • DERIVATIVE_INDEX

  • DIMENSION

  • DIMENSION_ATTRIBUTE

  • DIMENSION_HIERARCHIES

  • CONDITION_GROUP

  • TIME_CONDITION

  • COMMON_CONDITION

  • FACT_LOGIC_TABLE

  • TABLE_MODEL

  • DIMENSION_LOGIC_TABLE

  • STANDARD_ELEMENT

  • AGGREGATION_LOGIC_TABLE

  • TAG

  • CODE_TABLE

  • TABLE_MODEL_ATTRIBUTE

  • FACT_DIMENSION

  • FACT_ATTRIBUTE

  • FACT_MEASURE

  • SUMMARY_DIMENSION_ATTRIBUTE

  • SUMMARY_TIME

  • DIMENSION_TABLE_ATTRIBUTE

  • QUALITY_RULE

  • BIZ_METRIC

  • COMPOUND_METRIC

  • INFO_ARCH

  • DEGENERATE_DIMENSION

  • TABLE_MODEL_LOGIC

biz_id

Long

Business ID

biz_info

String

Business object information

status

String

Business statuses

Enumeration values:

  • DRAFT

  • PUBLISH_DEVELOPING

  • PUBLISHED

  • OFFLINE_DEVELOPING

  • OFFLINE

  • REJECT

biz_version

Integer

Business version

create_time

String

Creation time

update_time

String

Update time

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code, for example, DS.000 which indicates that the request was successfully processed.

error_msg

String

Error message

data

Object

Returned data

Status code: 401

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code, for example, DS.000 which indicates that the request was successfully processed.

error_msg

String

Error message

data

Object

Returned data

Status code: 403

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code, for example, DS.000 which indicates that the request was successfully processed.

error_msg

String

Error message

data

Object

Returned data

Example Requests

None

Example Responses

Status code: 200

The operation succeeds. BizMetricVO is returned.

{
  "id" : "902866491765080064",
  "name" : "Total amount",
  "code" : "ZB000001",
  "name_alias" : "",
  "biz_type" : null,
  "status" : "PUBLISHED",
  "biz_catalog_id" : "887366192090767360",
  "biz_catalog_path" : null,
  "create_by" : "abc",
  "update_by" : "abc",
  "data_origin" : "",
  "unit" : "",
  "time_filters" : "Day",
  "dimensions" : "test",
  "general_filters" : "",
  "interval_type" : "REAL_TIME",
  "apply_scenario" : "",
  "technical_metric" : "873265992019640320",
  "technical_metric_name" : "Total amount 1 (vendor)",
  "technical_metric_type" : "DERIVATIVE_INDEX",
  "measure" : "",
  "owner" : "abc",
  "owner_department" : "Data management department",
  "destination" : "Taxi company revenue statistics",
  "guid" : "2c993087-2aff-43f7-9252-178ce52e7e7c",
  "definition" : "Taxi company revenue",
  "expression" : "Sum (total amount)",
  "remark" : "",
  "approval_info" : {
    "id" : "933768706708971520",
    "tenant_id" : null,
    "name_ch" : null,
    "name_en" : null,
    "biz_id" : "902866491765080064",
    "biz_type" : null,
    "biz_info" : null,
    "biz_info_obj" : null,
    "biz_version" : 0,
    "biz_status" : "PUBLISHED",
    "approval_status" : "APPROVED",
    "approval_type" : null,
    "submit_time" : "2022-01-20T17:03:28+08:00",
    "create_by" : null,
    "l1" : null,
    "l2" : null,
    "l3" : null,
    "approval_time" : "2022-01-20T17:03:28+08:00",
    "approver" : "abc",
    "email" : null,
    "msg" : "Fast Approval OK.",
    "directory_path" : null
  },
  "new_biz" : null,
  "create_time" : "2021-10-27T10:29:06+08:00",
  "update_time" : "2022-01-20T17:03:28+08:00",
  "l1" : "L1",
  "l2" : null,
  "l3" : null,
  "biz_metric" : "UPDATE_SUCCESS",
  "summary_status" : "SUMMARY_SUCCESS"
}

Status Codes

Status Code

Description

200

The operation succeeds. BizMetricVO is returned.

400

BadRequest

401

Unauthorized

403

Forbidden