调用ListDataServiceAuthorizedApis获取获得授权的API信息列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ProjectId |
integer |
是 |
工作空间的 ID。可通过 ListProjects 接口返回的 PageResult.ProjectList[].ProjectId 字段获取。 |
10000 |
| PageNumber |
integer |
否 |
页码,从 1 开始,默认值为 1。 |
1 |
| PageSize |
integer |
否 |
每页显示的条数,默认为 10 条,最大 50 条。 |
10 |
| TenantId |
integer |
否 |
该字段已废弃。租户 ID。 |
10001 |
| ApiNameKeyword |
string |
否 |
API 名称的关键词,通过过滤获取 API 名称包含该关键词的 API。 |
我的API名称 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| HttpStatusCode |
integer |
HTTP 状态码。 |
200 |
| RequestId |
string |
请求 ID,一次请求的唯一标识。 |
0000-ABCD-EFG**** |
| ErrorMessage |
string |
错误信息 |
The specified parameters are invalid. |
| Success |
boolean |
调用是否成功。 |
true |
| ErrorCode |
string |
错误码。 |
1031203110005 |
| Data |
object |
获得授权的 API 信息。 |
|
| PageNumber |
integer |
页码,和请求中的 PageNumber 一致。 |
1 |
| PageSize |
integer |
每页显示的条数,默认为 10 条,最大 100 条。 |
10 |
| TotalCount |
integer |
总记录数。 |
100 |
| ApiAuthorizedList |
array<object> |
获得授权的 API 列表。 |
|
|
object |
|||
| ApiId |
integer |
API 的 ID。 |
10002 |
| ApiStatus |
integer |
API 的状态,可选枚举值包括 0(未发布)和 1(已发布)。 |
0 |
| GrantOperatorId |
string |
授权者的阿里云 ID。 |
23456 |
| ProjectId |
integer |
工作空间的 ID。 |
10000 |
| CreatorId |
string |
API 负责人阿里云 ID |
12345 |
| GrantEndTime |
string |
API 的授权到期时间,格式为 yyyy-MM-dd'T'HH:mm:ssZ(示例时区为 +0800)。 |
2020-06-24T00:21:01+0800 |
| ModifiedTime |
string |
API 的最近更新时间,格式为 yyyy-MM-dd'T'HH:mm:ssZ(示例时区为 +0800)。 |
2020-06-23T00:21:01+0800 |
| GroupId |
string |
分组 ID。 |
abcde123456789 |
| GrantCreatedTime |
string |
API 的授权时间,格式为 yyyy-MM-dd'T'HH:mm:ssZ(示例时区为 +0800)。 |
2020-06-23T00:21:01+0800 |
| CreatedTime |
string |
API 的创建时间,格式为 yyyy-MM-dd'T'HH:mm:ssZ(示例时区为 +0800)。 |
2020-06-23T00:21:01+0800 |
| ApiName |
string |
API 的名称。 |
我的API名称 |
| TenantId |
integer |
租户 ID。 |
10001 |
| ApiPath |
string |
API 的路径。 |
/test/1 |
示例
正常返回示例
JSON格式
{
"HttpStatusCode": 200,
"RequestId": "0000-ABCD-EFG****",
"ErrorMessage": "The specified parameters are invalid.",
"Success": true,
"ErrorCode": "1031203110005",
"Data": {
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 100,
"ApiAuthorizedList": [
{
"ApiId": 10002,
"ApiStatus": 0,
"GrantOperatorId": "23456",
"ProjectId": 10000,
"CreatorId": "12345",
"GrantEndTime": "2020-06-24T00:21:01+0800",
"ModifiedTime": "2020-06-23T00:21:01+0800",
"GroupId": "abcde123456789",
"GrantCreatedTime": "2020-06-23T00:21:01+0800",
"CreatedTime": "2020-06-23T00:21:01+0800",
"ApiName": "我的API名称",
"TenantId": 10001,
"ApiPath": "/test/1"
}
]
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 500 | InternalError.System | An internal system error occurred. Try again later. | |
| 500 | InternalError.UserId.Missing | An internal system error occurred. Try again later. | |
| 403 | Forbidden.Access | Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. | 没有权限,请授权 |
| 429 | Throttling.Api | The request for this resource has exceeded your available limit. | |
| 429 | Throttling.System | The DataWorks system is busy. Try again later. | |
| 429 | Throttling.User | Your request is too frequent. Try again later. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。