Updated on 2022-04-14 GMT+08:00

Object Model

This section describes the API and backend service object models.

  • Operation Type indicates the operation that can be performed on a field.

    C: create; U: update; R: read

  • Mandatory indicates whether a field with the Operation Type of C is mandatory.
Table 1 API object model

Parameter

Type

Description

Operation Type

Mandatory

id

String

API ID

R

-

name

String

API name

CRU

Yes

group_id

String

ID of the API group to which the API belongs

CR

Yes

type

Integer

Type of the API, which can be:

  • 1: public

CRU

Yes

status

Integer

Status of the API, which can be:

  • 1: enabled
  • 2: disabled
  • 3: deleted

Default value: 1

This parameter is not used currently.

R

-

version

String

Version of the API

CRU

No

req_protocol

String

Request protocol, which can be:

  • HTTP
  • HTTPS
  • BOTH: The API can be accessed through both HTTP and HTTPS.

Default value: HTTPS

CRU

No

req_method

String

Request method, which can be:

  • GET
  • POST
  • PUT
  • DELETE
  • HEAD
  • PATCH
  • OPTIONS
  • ANY

CRU

Yes

req_uri

String

Access address (URI) of the API, excluding the domain name, port number, and request protocol

CRU

Yes

auth_type

String

Security authentication mode, which can be:

  • NONE
  • APP
  • IAM
  • AUTHORIZER

CRU

Yes

authorizer_id

String

ID of the frontend custom authorizer

CRU

No

match_mode

String

Route matching mode, which can be:

  • SWA: prefix match
  • NORMAL: exact match

CRU

Yes

arrange_necessary

Integer

Indicates whether orchestration is required. The value can be:

  • 1: yes
  • 2: no

Default value: 2

R

-

backend_type

String

Backend type, which can be:

  • HTTP (web)
  • FUNCTION
  • MOCK

CRU

Yes

register_time

Timestamp

Time when the API is registered

R

-

update_time

Timestamp

Time when the API was last modified

R

-

remark

String

Description of the API

CRU

No

tag

String

API tag

CRU

No

cors

String

Indicates whether cross-origin resource sharing (CORS) is supported

  • TRUE: supported
  • FALSE: not supported

Default value: FALSE

CRU

No

response_id

String

ID of the custom response

CRU

No

Table 2 Web backend object model

Parameter

Type

Description

Operation Type

Mandatory

id

String

Web backend ID

R

-

status

Integer

Status of the web backend, which can be:

  • 1: enabled
  • 2: disabled
  • 3: deleted

Default value: 1

This parameter is not used currently.

R

-

version

String

Version of the web backend

CRU

No

url_domain

String

Backend endpoint

CRU

Yes

req_protocol

String

Request protocol, which can be:

  • HTTP
  • HTTPS

CRU

Yes

req_method

String

Request method, which can be:

  • GET
  • POST
  • PUT
  • DELETE
  • HEAD
  • PATCH
  • OPTIONS
  • ANY

CRU

Yes

req_uri

String

Access address (URI) of the web backend

CRU

Yes

timeout

Integer

Timeout duration in milliseconds. Range: 1–60,000.

CRU

Yes

front_api_id

String

API ID

R

-

register_time

Timestamp

Time when the web backend is registered

R

-

update_time

Timestamp

Time when the web backend was last modified

R

-

remark

String

Description of the web backend

CRU

No

vpc_status

Integer

Indicates whether to use a VPC channel. The value can be:

  • 1: yes
  • 2: no

CRU

No. No VPC channel is used by default.

vpc_info

String

VPC channel information

CRU

No

This parameter is required only when vpc_status is set to 1.

authorizer_id

String

ID of the backend custom authorizer

CRU

No

Table 3 Mock backend object model

Parameter

Type

Description

Operation Type

Mandatory

id

String

Mock backend ID

R

-

front_api_id

String

API ID

R

-

status

Integer

Status of the Mock backend, which can be:

  • 1: enabled
  • 2: disabled
  • 3: deleted

Default value: 1

This parameter is not used currently.

R

-

version

String

Version of the Mock backend

CRU

No

result_content

String

Mock response

CRU

No

register_time

Timestamp

Time when the Mock backend is registered

R

-

update_time

Timestamp

Time when the Mock backend was last modified

R

-

remark

String

Description of the Mock backend

CRU

No

Table 4 Request parameter object model

Parameter

Type

Description

Operation Type

Mandatory

id

String

Parameter ID

R

-

front_api_id

String

API ID

R

-

name

String

Parameter name

CRU

Yes

type

String

Parameter type, which can be:

  • string
  • number

CRU

Yes

location

String

Parameter location, which can be:

  • PATH
  • QUERY
  • HEADER
  • FORMDATA

CRU

Yes

default_value

String

Default value

CRU

No

sample_value

String

Example value

CRU

No

required

Integer

Whether the parameter is mandatory

  • 1: yes
  • 2: no

CRU

Yes

valid_enable

Integer

Whether validity check is enabled

  • 1: yes
  • 2: no

CRU

Yes

remark

String

Parameter description

CRU

No

enumerations

String

Enumerated value

CRU

No

min_num

String

Minimum value

CRU

No

max_num

String

Maximum value

CRU

No

min_size

Integer

Minimum length

CRU

No

max_size

Integer

Maximum length

CRU

No

regular

String

Regular verification rule (currently not supported)

CRU

No

json_schema

String

JSON verification rule (currently not supported)

CRU

No

Table 5 Backend parameter object model

Parameter

Type

Description

Operation Type

Mandatory

id

String

Parameter ID

R

-

front_api_id

String

API ID

R

-

req_param_id

String

ID of the request parameter to which the backend parameter is mapped

R

-

name

String

Parameter name

CRU

Yes

location

String

Parameter location, which can be:

  • PATH
  • QUERY
  • HEADER
  • FORMDATA

CRU

Yes

origin

String

Parameter type, which can be:

  • REQUEST
  • CONSTANT
  • SYSTEM

CRU

Yes

value

String

Parameter value

  • If origin is set to REQUEST, the value is the name of the request parameter.
  • If origin is set to SYSTEM, the value is the name of the gateway parameter.
  • If origin is set to CONSTANT, the value is the real value of the backend parameter.

CRU

No

remark

String

Parameter description

CRU

No

policy_id

String

ID of the associated policy condition

CRU

No

Table 6 Web backend policy object model

Parameter

Type

Description

Operation Type

Mandatory

id

String

Backend ID

R

-

front_api_id

String

API ID

R

-

name

String

Backend name

CRU

Yes

url_domain

String

Backend endpoint

CRU

Yes

req_protocol

String

Request protocol, which can be:

  • HTTP
  • HTTPS

CRU

Yes

req_method

String

Request method, which can be:

  • GET
  • POST
  • PUT
  • DELETE
  • HEAD
  • PATCH
  • OPTIONS
  • ANY

CRU

Yes

req_uri

String

Access address (URI) of the web backend

CRU

Yes

timeout

Integer

Timeout duration in milliseconds. Range: 1–60,000.

CRU

No

vpc_status

Integer

Indicates whether to use a VPC channel. The value can be:

  • 1: yes
  • 2: no

CRU

No. No VPC channel is used by default.

vpc_info

String

VPC channel information

CRU

No

This parameter is required only when vpc_status is set to 1.

effect_mode

String

Effective mode of the backend policy

  • ALL
  • ANY

CRU

Yes

Table 7 Mock backend policy object model

Parameter

Type

Description

Operation Type

Mandatory

id

String

Backend ID

R

-

front_api_id

String

API ID

R

-

name

String

Backend name

CRU

Yes

result_content

String

Mock response

CRU

No

effect_mode

String

Effective mode of the backend policy

  • ALL
  • ANY

CRU

Yes

Table 8 FunctionGraph policy backend object model

Parameter

Type

Description

Operation Type

Mandatory

id

String

Backend ID

R

-

front_api_id

String

API ID

R

-

name

String

Backend name

CRU

Yes

version

String

Function version

CRU

No

function_urn

String

Function URN

CRU

Yes

invocation_type

String

Invocation mode, which can be async or sync

CRU

Yes

timeout

Integer

Timeout duration in milliseconds. Range: 1–60,000.

CRU

Yes

effect_mode

String

Effective mode of the backend policy

  • ALL
  • ANY

CRU

Yes

Table 9 Backend policy condition object model

Parameter

Type

Description

Operation Type

Mandatory

id

String

Backend policy condition ID

R

-

condition_type

String

Condition type. Options:

  • exact: Exact match
  • enum: Enumeration
  • pattern: Regular expression

CRU

No

condition_value

String

Condition value

CRU

Yes

condition_origin

String

Condition source. Options:

  • param: Input parameter
  • source: Source IP address

CRU

Yes

req_param_id

String

Input parameter ID

R

-

policy_backend_id

String

Backend policy ID

CRU

Yes

Table 10 Authentication mode parameter object model

Parameter

Type

Description

Operation Type

Mandatory

app_code_auth_type

String

Indicates whether AppCode authentication is enabled. This parameter is valid only when auth_type is set to App. The default value is DISABLE.

  • DISABLE: AppCode authentication is disabled.
  • HEADER: AppCode authentication is enabled and the AppCode is located in the header.

CRU

-