API groups

Updated at:
Copy as MD

This topic lists all OpenAPI operations for API groups, along with their request and response parameters.

Create an API group

Use sofa.apigateway.apigroup.create to create an API group.

Request parameters

Name

Type

Required

Example

Description

param

ApiGroupVO

Yes

Parameter

tenant_id

STRING

Yes

TSCPDICNT

tenant_id

workspace_id

STRING

Yes

default

workspace_id

Response parameters

Name

Type

Example

Description

data

ApiGroupVO

Data

Code samples

Request sample

{
"param":{
"group_name":"apigroup2"
},
"tenant_id":"JADDGOCN",
"workspace_id":"antdemo"
}

Response sample

{
    "data":{
        "api_group_id":"gjrjknp1s4alzubn",
        "tenant_id":"JADDGOCN",
        "workspace_id":"antdemo",
        "domain_name":"gjrjknp1s4alzubn.apigateway.inc.alipay.net",
        "group_name":"apigroup2",
        "operator":""
    },
    "result_code":"OK"
}

Delete an API group

Use sofa.apigateway.apigroup.delete to delete an API group.

Request parameters

Name

Type

Required

Example

Description

api_group_id

STRING

Yes

saffccca

api_group_id

tenant_id

STRING

Yes

TSCPDICNT

The tenant identity.

workspace_id

STRING

Yes

default

The workspace identity.

Response parameters

Name

Type

Example

Description

data

BOOLEAN

true, false

data

Code samples

Request sample

{
"api_group_id":"evrtxymrpxkep6bc",
"tenant_id":"JADDGOCN",
"workspace_id":"antdemo"
}

Response sample

{
"data":true,
"result_code":"OK"
}

Update an API group

Use sofa.apigateway.apigroup.update to update the configuration of an API group.

Request parameters

Name

Type

Required

Example

Description

param

ApiGroupVO

No

parameter

tenant_id

STRING

Yes

TSCPDICNT

tenant_id

workspace_id

STRING

Yes

default

workspace_id

Response parameters

Name

Type

Example

Description

data

BOOLEAN

true, false

Data

Code samples

Request sample

{
    "param":{
        "group_name":"apigroup3",
        "api_group_id":"gjrjknp1s4alzubn",
        "description":"abcd"
    },
    "tenant_id":"JADDGOCN",
    "workspace_id":"antdemo"
}

Response sample

{
"data":true,
"result_code":"OK"
}

Query an API group by ID

Use sofa.apigateway.apigroup.get to retrieve the details of a specific API group by its ID.

Request parameters

Name

Type

Required

Example

Description

api_group_id

STRING

Yes

sdf12ccccss

api_group_id

tenant_id

STRING

Yes

TSCPDICNT

The tenant identity.

workspace_id

STRING

Yes

default

Workspace identity

Response parameters

Name

Type

Example

Description

data

ApiGroupVO

-

Data

Code samples

Request sample

{
"api_group_id":"fifhwqgcsmqo9ycl",
"tenant_id":"JADDGOCN",
"workspace_id":"antdemo"
}

Response sample

{
    "data":{
        "api_group_id":"fifhwqgcsmqo9ycl",
        "tenant_id":"JADDGOCN",
        "gmt_create":"2020-03-27 01:51:36",
        "workspace_id":"antdemo",
        "domain_name":"fifhwqgcsmqo9ycl.apigateway.inc.alipay.net",
        "group_name":"apigroup2",
        "gmt_modified":"2020-03-27 01:51:36",
        "operator":""
    },
    "result_code":"OK"
}

Query a list of API groups

Use sofa.apigateway.apigroup.all to query a list of all API groups.

Request parameters

Name

Type

Required

Example

Description

param

ApiGroupQueryVO

No

-

parameter

tenant_id

STRING

Yes

TSCPDICNT

tenant_id

workspace_id

STRING

Yes

default

workspace_id

Response parameters

Name

Type

Example

Description

data

ARRAY[ApiGroupVO]

-

data

Code samples

Request sample

{
    "param":{
        "page_info":{
            "order_infos":[

            ],
            "page_index":1,
            "page_size":10
        }
    },
    "tenant_id":"JADDGOCN",
    "workspace_id":"antdemo"
}

Response sample

{
    "data":[
        {
            "groupName":"apigroup3",
            "gmtModified":"2020-03-27 01:58:40",
            "apiGroupId":"gjrjknp1s4alzubn",
            "domainName":"gjrjknp1s4alzubn.apigateway.inc.alipay.net",
            "tenantId":"JADDGOCN",
            "description":"abcd",
            "gmtCreate":"2020-03-27 01:53:20",
            "operator":"",
            "workspaceId":"antdemo"
        },
        {
            "groupName":"apigroup2",
            "gmtModified":"2020-03-27 01:51:36",
            "apiGroupId":"fifhwqgcsmqo9ycl",
            "domainName":"fifhwqgcsmqo9ycl.apigateway.inc.alipay.net",
            "tenantId":"JADDGOCN",
            "gmtCreate":"2020-03-27 01:51:36",
            "operator":"",
            "workspaceId":"antdemo"
        },
        {
            "groupName":"apigroup1",
            "gmtModified":"2020-03-27 01:05:46",
            "apiGroupId":"vfaqppj02kv30tx2",
            "domainName":"vfaqppj02kv30tx2.apigateway.inc.alipay.net",
            "tenantId":"JADDGOCN",
            "apiCount":3,
            "gmtCreate":"2020-03-25 16:55:03",
            "operator":"",
            "workspaceId":"antdemo"
        },
        {
            "groupName":"test_aalq",
            "gmtModified":"2020-03-26 11:58:29",
            "apiGroupId":"dumebnn9gbnyy02y",
            "domainName":"dumebnn9gbnyy02y.apigateway.inc.alipay.net",
            "tenantId":"JADDGOCN",
            "apiCount":3,
            "gmtCreate":"2020-03-25 15:06:03",
            "operator":"",
            "workspaceId":"antdemo"
        }
    ],
    "result_code":"OK"
}

Query a paginated list of API groups

Use sofa.apigateway.apigroup.list to query a paginated list of API groups.

Request parameters

Name

Type

Required

Example

Description

param

ApiGroupQueryVO

No

parameter

tenant_id

STRING

Yes

TSCPDICNT

tenant_id

workspace_id

STRING

Yes

default

workspace_id

Response parameters

Name

Type

Example

Description

data

ApiGroupPagedListVO

-

data

Code samples

Request sample

{
    "param":{
        "page_info":{
            "order_infos":[

            ],
            "page_index":1,
            "page_size":10
        }
    },
    "tenant_id":"JADDGOCN",
    "workspace_id":"antdemo"
}

Response sample

{
    "data":{
        "page_info":{
            "total":2,
            "page_index":1,
            "page_size":10
        },
        "list":[
            {
                "groupName":"apigroup3",
                "gmtModified":"2020-03-27 01:58:40",
                "apiGroupId":"gjrjknp1s4alzubn",
                "domainName":"gjrjknp1s4alzubn.apigateway.inc.alipay.net",
                "tenantId":"JADDGOCN",
                "description":"abcd",
                "gmtCreate":"2020-03-27 01:53:20",
                "operator":"",
                "workspaceId":"antdemo"
            },
            {
                "groupName":"apigroup2",
                "gmtModified":"2020-03-27 01:51:36",
                "apiGroupId":"fifhwqgcsmqo9ycl",
                "domainName":"fifhwqgcsmqo9ycl.apigateway.inc.alipay.net",
                "tenantId":"JADDGOCN",
                "gmtCreate":"2020-03-27 01:51:36",
                "operator":"",
                "workspaceId":"antdemo"
            }
        ]
    },
    "result_code":"OK"
}

Query a list of APIs by API group ID

Use sofa.apigateway.apigroup.api.all to query a list of all APIs in a specific API group by its ID.

Request parameters

Name

Type

Required

Example

Description

api_group_id

STRING

Yes

api_group_id1

The API group identity.

param

ApiInfoQueryVO

No

-

parameter

tenant_id

STRING

Yes

TSCPDICNT

The tenant identity.

workspace_id

STRING

Yes

default

The workspace identity.

Response parameters

Name

Type

Example

Description

data

ARRAY[ApiInfoVO]

-

Data

Code samples

Request sample

{
    "param":{
        "page_info":{
            "page_index":1,
            "page_size":10
        }
    },
    "api_group_id":"fifhwqgcsmqo9ycl",
    "tenant_id":"JADDGOCN",
    "workspace_id":"antdemo"
}

Response sample

{
    "data":{
        "page_info":{
            "total":1,
            "page_index":1,
            "page_size":10
        },
        "list":[
            {
                "charset":"UTF-8",
                "apiName":"api-test2",
                "gmtModified":"2020-03-27 14:58:34",
                "method":"GET",
                "sysId":"A3QV9pym9CaVKdLV0gIcQMsGNIplTZwd",
                "upstreamPath":"/openapi/apigateway/test/api1",
                "routerType":"PATH",
                "upstreamProtocol":"HTTP",
                "gmtCreate":"2020-03-27 14:12:43",
                "timeout":3000,
                "operator":"",
                "path":"/openapi/apigateway/test/api1",
                "apiGroupId":"fifhwqgcsmqo9ycl",
                "appType":"STANDARD",
                "downstreamProtocol":"HTTP",
                "domainName":"fifhwqgcsmqo9ycl.apigateway.inc.alipay.net",
                "apiGroupName":"apigroup2",
                "tenantId":"JADDGOCN",
                "contentType":"application/json",
                "upstreamType":"SYSTEM_CLUSTER",
                "apiId":"IjiuBaYgvZLz2ODOvRWiQT3OGCqSbDYu",
                "apiStatus":"OPENED",
                "workspaceId":"antdemo"
            }
        ]
    },
    "result_code":"OK"
}

Query a paginated list of APIs by API group ID

Use sofa.apigateway.apigroup.api.list to query a paginated list of APIs in a specific API group by its ID.

Request parameters

Name

Type

Required

Example

Description

api_group_id

STRING

Yes

api_group_id1

The API group identity.

param

ApiInfoQueryVO

No

-

Parameter

tenant_id

STRING

Yes

TSCPDICNT

The tenant identity.

workspace_id

STRING

Yes

default

The workspace identity.

Response parameters

Name

Type

Example

Description

data

ApiInfoPagedListVO

-

Data

Code samples

Request sample

{
    "param":{
        "page_info":{
            "page_index":1,
            "page_size":10
        }
    },
    "api_group_id":"fifhwqgcsmqo9ycl",
    "tenant_id":"JADDGOCN",
    "workspace_id":"antdemo"
}

Response sample

{
    "data":{
        "page_info":{
            "total":1,
            "page_index":1,
            "page_size":10
        },
        "list":[
            {
                "charset":"UTF-8",
                "apiName":"api-test2",
                "gmtModified":"2020-03-27 14:58:34",
                "method":"GET",
                "sysId":"A3QV9pym9CaVKdLV0gIcQMsGNIplTZwd",
                "upstreamPath":"/openapi/apigateway/test/api1",
                "routerType":"PATH",
                "upstreamProtocol":"HTTP",
                "gmtCreate":"2020-03-27 14:12:43",
                "timeout":3000,
                "operator":"",
                "path":"/openapi/apigateway/test/api1",
                "apiGroupId":"fifhwqgcsmqo9ycl",
                "appType":"STANDARD",
                "downstreamProtocol":"HTTP",
                "domainName":"fifhwqgcsmqo9ycl.apigateway.inc.alipay.net",
                "apiGroupName":"apigroup2",
                "tenantId":"JADDGOCN",
                "contentType":"application/json",
                "upstreamType":"SYSTEM_CLUSTER",
                "apiId":"IjiuBaYgvZLz2ODOvRWiQT3OGCqSbDYu",
                "apiStatus":"OPENED",
                "workspaceId":"antdemo"
            }
        ]
    },
    "result_code":"OK"
}