Authorized applications
This topic lists the APIs for authorized applications and describes their request and response parameters.
Create an authorized application
Use sofa.apigateway.authapp.create to create an authorized application.
Request parameters
Name | Type | Required | Example | Description |
param | AuthAppInfoVO | Yes | - | parameter |
tenant_id | STRING | Yes | TSCPDICNT | The tenant identity. |
workspace_id | STRING | Yes | default | The workspace identity. |
Response parameters
Name | Type | Example | Description |
data | AuthAppInfoVO | - | data |
Code examples
Request example
{
"param":{
"auth_app_type":"INNER",
"sub_app_id":"qcbA92upcnVlaYiF",
"authentication_type":"SECRET",
"encrypt_type":"NONE",
"sub_workspace_id":"antdemo",
"sub_tenant_id":"JADDGOCN",
},
"tenant_id":"JADDGOCN",
"workspace_id":"antdemo"
}Response example
{
"data":{
"auth_app_type":"OUTER",
"encrypt_type":"NONE",
"app_type":"STANDARD",
"sub_app_id":"qcbA92upcnVlaYiF",
"auth_app_info_id":"MQr68JtMFFFzLJe0",
"sub_app_info":{
"tenant_id":"JADDGOCN",
"gmt_create":"2020-03-27 10:47:01",
"workspace_id":"antdemo",
"app_name":"app6",
"gmt_modified":"2020-03-27 10:47:01",
"app_id":"qcbA92upcnVlaYiF",
"operator":""
},
"sub_tenant_id":"JADDGOCN",
"authentication_type":"SECRET",
"sub_workspace_id":"antdemo",
"operator":""
},
"result_code":"OK"
}Delete an authorized application
Use sofa.apigateway.authapp.delete to delete an authorized application.
Request parameters
Name | Type | Required | Example | Description |
auth_app_info_id | STRING | Yes | 8Amfi67dmE9wpY46 | The authorized application information identity. |
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 examples
Request Example
{
"auth_app_info_id":"OzygEdYzwFLRruxg",
"tenant_id":"JADDGOCN",
"workspace_id":"antdemo"
}Sample response
{
"data":true,
"result_code":"OK"
}Update an authorized application
You can use sofa.apigateway.authapp.update to update authorized application information.
Request parameters
Name | Type | Required | Example | Description |
auth_app_info_id | STRING | Yes | 8Amfi67dmE9wpY46 | The authorized application information identity. |
tenant_id | STRING | Yes | TSCPDICNT | The tenant identity. |
workspace_id | STRING | Yes | default | The workspace identity. |
Response parameters
Name | Type | Example | Description |
data | AuthAppInfoVO | - | data |
Code examples
Request Example
{
"param":{
"auth_app_type":"OUTER",
"sub_app_id":"qcbA92upcnVlaYiF",
"authentication_type":"SECRET",
"encrypt_type":"ECC",
"sub_workspace_id":"antdemo",
"sub_tenant_id":"JADDGOCN",
"auth_app_info_id":"MQr68JtMFFFzLJe0",
},
"tenant_id":"JADDGOCN",
"workspace_id":"antdemo"
}Response Example
{
"data":true,
"result_code":"OK"
}Query an authorized application by ID
Use sofa.apigateway.authapp.get to query the authorization object for a specified authorized application.
Request parameters
Name | Type | Required | Example | Description |
auth_app_info_id | STRING | Yes | 8Amfi67dmE9wpY46 | The authorized application information identity. |
tenant_id | STRING | Yes | TSCPDICNT | The tenant identity. |
workspace_id | STRING | Yes | default | The workspace identity. |
Response parameters
Name | Type | Example | Description |
data | AuthAppInfoVO | - | data |
Sample code
Example request
{
"auth_app_info_id":"MQr68JtMFFFzLJe0",
"tenant_id":"JADDGOCN",
"workspace_id":"antdemo"
}Response example
{
"data":{
"gmt_create":"2020-03-27 15:33:18",
"auth_app_type":"OUTER",
"encrypt_type":"ECC",
"app_type":"STANDARD",
"sub_app_id":"qcbA92upcnVlaYiF",
"auth_app_info_id":"MQr68JtMFFFzLJe0",
"sub_app_info":{
"tenant_id":"JADDGOCN",
"gmt_create":"2020-03-27 10:47:01",
"workspace_id":"antdemo",
"app_name":"app6",
"gmt_modified":"2020-03-27 10:47:01",
"app_id":"qcbA92upcnVlaYiF",
"operator":""
},
"sub_tenant_id":"JADDGOCN",
"gmt_modified":"2020-03-27 15:39:29",
"authentication_type":"SECRET",
"sub_workspace_id":"antdemo",
"operator":""
},
"result_code":"OK"
}Query a paginated list of authorized applications
You can use sofa.apigateway.authapp.list to query a paginated list of authorized applications.
Request parameters
Name | Type | Required | Example | Description |
param | AuthAppInfoQueryVO | 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 | AuthAppInfoPagedListVO | - | The data. |
Code examples
Sample request
{
"param":{
"page_info":{
"page_index":1,
"page_size":10
},
"query":{}
},
"tenant_id":"JADDGOCN",
"workspace_id":"antdemo"
}Example response
{
"data":{
"page_info":{
"total":4,
"page_index":1,
"page_size":10
},
"list":[
{
"subTenantId":"JADDGOCN",
"gmtModified":"2020-03-27 15:39:29",
"appType":"STANDARD",
"subAppInfo":{
"gmtModified":"2020-03-27 10:47:01",
"appName":"app6",
"appId":"qcbA92upcnVlaYiF",
"tenantId":"JADDGOCN",
"gmtCreate":"2020-03-27 10:47:01",
"operator":"",
"workspaceId":"antdemo"
},
"authAppInfoId":"MQr68JtMFFFzLJe0",
"authAppType":"OUTER",
"authenticationType":"SECRET",
"gmtCreate":"2020-03-27 15:33:18",
"subWorkspaceId":"antdemo",
"encryptType":"ECC",
"operator":"",
"subAppId":"qcbA92upcnVlaYiF"
},
{
"subTenantId":"JADDGOCN",
"gmtModified":"2020-03-25 16:40:11",
"appType":"STANDARD",
"subAppInfo":{
"gmtModified":"2020-03-25 16:39:51",
"appName":"app2",
"appId":"zQf1Pk34kku03wxP",
"tenantId":"JADDGOCN",
"gmtCreate":"2020-03-25 16:39:51",
"operator":"",
"workspaceId":"antdemo"
},
"authAppInfoId":"oxLIMO8MKn7x6nxy",
"authAppType":"OUTER",
"authenticationType":"SECRET",
"gmtCreate":"2020-03-25 16:40:11",
"subWorkspaceId":"antdemo",
"encryptType":"NONE",
"operator":"",
"subAppId":"zQf1Pk34kku03wxP"
}
]
},
"result_code":"OK"
}Query a list of authorized applications
You can use sofa.apigateway.authapp.all to query all authorized applications.
Request parameters
Name | Type | Required | Example | Description |
param | AuthAppInfoQueryVO | No | - | Parameter |
tenant_id | STRING | Yes | TSCPDICNT | The tenant identity. |
workspace_id | STRING | Yes | default | Workspace identifier |
Response parameters
Name | Type | Example | Description |
data | ARRAY[AuthAppInfoVO] | - | data |
Code examples
Example request
{
"param":{
"page_info":{
"page_index":1,
"page_size":10
},
"query":{}
},
"tenant_id":"JADDGOCN",
"workspace_id":"antdemo"
}Response example
{
"data":{
"page_info":{
"total":2,
"page_index":1,
"page_size":10
},
"list":[
{
"subTenantId":"JADDGOCN",
"gmtModified":"2020-03-27 15:39:29",
"appType":"STANDARD",
"subAppInfo":{
"gmtModified":"2020-03-27 10:47:01",
"appName":"app6",
"appId":"qcbA92upcnVlaYiF",
"tenantId":"JADDGOCN",
"gmtCreate":"2020-03-27 10:47:01",
"operator":"",
"workspaceId":"antdemo"
},
"authAppInfoId":"MQr68JtMFFFzLJe0",
"authAppType":"OUTER",
"authenticationType":"SECRET",
"gmtCreate":"2020-03-27 15:33:18",
"subWorkspaceId":"antdemo",
"encryptType":"ECC",
"operator":"",
"subAppId":"qcbA92upcnVlaYiF"
},
{
"subTenantId":"JADDGOCN",
"gmtModified":"2020-03-25 16:40:11",
"appType":"STANDARD",
"subAppInfo":{
"gmtModified":"2020-03-25 16:39:51",
"appName":"app2",
"appId":"zQf1Pk34kku03wxP",
"tenantId":"JADDGOCN",
"gmtCreate":"2020-03-25 16:39:51",
"operator":"",
"workspaceId":"antdemo"
},
"authAppInfoId":"oxLIMO8MKn7x6nxy",
"authAppType":"OUTER",
"authenticationType":"SECRET",
"gmtCreate":"2020-03-25 16:40:11",
"subWorkspaceId":"antdemo",
"encryptType":"NONE",
"operator":"",
"subAppId":"zQf1Pk34kku03wxP"
}
]
},
"result_code":"OK"
}Query a paginated list of APIs by authorized application ID
You can use sofa.apigateway.authapp.api.list to query a paginated list of APIs authorized for a specific application.
Request parameters
Name | Type | Required | Example | Description |
auth_app_info_id | STRING | Yes | 8Amfi67dmE9wpY46 | API Authorization |
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 examples
Sample request
{
"param":{
"page_info":{
"page_index":1,
"page_size":10
},
"query":{}
},
"auth_app_info_id":"MQr68JtMFFFzLJe0",
"tenant_id":"JADDGOCN",
"workspace_id":"antdemo"
}Example response
{
"data":{
"page_info":{
"total":1,
"page_index":1,
"page_size":10
},
"list":[
{
"charset":"UTF-8",
"apiName":"api-test2",
"gmtModified":"2020-03-27 15:51:48",
"sysId":"A3QV9pym9CaVKdLV0gIcQMsGNIplTZwd",
"routerType":"PATH",
"upstreamProtocol":"HTTP",
"timeout":3000,
"operator":"",
"path":"/openapi/apigateway/test/api1",
"apiGroupId":"fifhwqgcsmqo9ycl",
"appType":"STANDARD",
"contentType":"application/json",
"apiId":"IjiuBaYgvZLz2ODOvRWiQT3OGCqSbDYu",
"workspaceId":"antdemo",
"method":"GET",
"authAppCount":1,
"upstreamPath":"/openapi/apigateway/test/api1",
"gmtCreate":"2020-03-27 14:12:43",
"onlineVersion":{
"versionId":"3VdYOmSsKAD07DuvX6EHvsnheXONfF80",
"gmtModified":"2020-03-27 14:58:34",
"versionNo":"20200327141243487-B0XAffhP",
"gmtOnline":"2020-03-27 14:58:34",
"gmtCreate":"2020-03-27 14:12:43",
"gmtEdit":"2020-03-27 14:17:30",
"apiId":"IjiuBaYgvZLz2ODOvRWiQT3OGCqSbDYu"
},
"downstreamProtocol":"HTTP",
"domainName":"fifhwqgcsmqo9ycl.apigateway.inc.alipay.net",
"apiGroupName":"apigroup2",
"tenantId":"JADDGOCN",
"upstreamType":"SYSTEM_CLUSTER",
"apiStatus":"OPENED"
}
]
},
"result_code":"OK"
}Query a list of APIs by authorized application ID
Use sofa.apigateway.authapp.api.all to query a list of all APIs for a specific authorized application.
Request parameters
Name | Type | Required | Example | Description |
auth_app_info_id | STRING | Yes | 8Amfi67dmE9wpY46 | The authorized application 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 examples
Example request
{
"param":{
"page_info":{
"page_index":1,
"page_size":10
},
"query":{}
},
"auth_app_info_id":"MQr68JtMFFFzLJe0",
"tenant_id":"JADDGOCN",
"workspace_id":"antdemo"
}Response example
{
"data":{
"page_info":{
"total":1,
"page_index":1,
"page_size":10
},
"list":[
{
"charset":"UTF-8",
"apiName":"api-test2",
"gmtModified":"2020-03-27 15:51:48",
"sysId":"A3QV9pym9CaVKdLV0gIcQMsGNIplTZwd",
"routerType":"PATH",
"upstreamProtocol":"HTTP",
"timeout":3000,
"operator":"",
"path":"/openapi/apigateway/test/api1",
"apiGroupId":"fifhwqgcsmqo9ycl",
"appType":"STANDARD",
"contentType":"application/json",
"apiId":"IjiuBaYgvZLz2ODOvRWiQT3OGCqSbDYu",
"workspaceId":"antdemo",
"method":"GET",
"authAppCount":1,
"upstreamPath":"/openapi/apigateway/test/api1",
"gmtCreate":"2020-03-27 14:12:43",
"onlineVersion":{
"versionId":"3VdYOmSsKAD07DuvX6EHvsnheXONfF80",
"gmtModified":"2020-03-27 14:58:34",
"versionNo":"20200327141243487-B0XAffhP",
"gmtOnline":"2020-03-27 14:58:34",
"gmtCreate":"2020-03-27 14:12:43",
"gmtEdit":"2020-03-27 14:17:30",
"apiId":"IjiuBaYgvZLz2ODOvRWiQT3OGCqSbDYu"
},
"downstreamProtocol":"HTTP",
"domainName":"fifhwqgcsmqo9ycl.apigateway.inc.alipay.net",
"apiGroupName":"apigroup2",
"tenantId":"JADDGOCN",
"upstreamType":"SYSTEM_CLUSTER",
"apiStatus":"OPENED"
}
]
},
"result_code":"OK"
}