Access Tokens - List
列出给定帐户 ID 的访问令牌。它可以使用 OData 查询参数,例如$select、$filter、$orderby、$top和$skip。 默认页面大小为 10。 使用 nextLink 进行响应以提取列表中的更多对象。 需要授权的是 EntraID 提供的 Bearer JWT 访问令牌。
GET {endpoint}/accounts/{accountId}/access-tokens?api-version=2024-12-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
account
|
path | True |
string maxLength: 64pattern: [A-Za-z0-9]+(_[A-Za-z0-9]+)*(-[A-Za-z0-9]+)+ |
帐户 ID。 |
endpoint
|
path | True |
string |
支持的 Azure Playwright 服务 API 终结点(协议和主机名,例如:https://{region}.api.playwright.microsoft.com)。 |
api-version
|
query | True |
string minLength: 1 |
用于此操作的 API 版本。 |
请求头
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
x-ms-client-request-id |
string (uuid) |
请求的不透明、全局唯一的客户端生成的字符串标识符。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
请求已成功。 标头 x-ms-client-request-id: string |
|
Other Status Codes |
意外的错误响应。 标头 x-ms-error-code: string |
安全性
OAuth2Auth
类型:
oauth2
流向:
accessCode
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
令牌 URL:
https://login.microsoftonline.com/common/v2.0/oauth2/token
作用域
名称 | 说明 |
---|---|
https://playwright.microsoft.com/.default |
示例
AccessTokens_List
示例请求
GET {endpoint}/accounts/sampleAccountId_00000000-0000-0000-0000-000000000000/access-tokens?api-version=2024-12-01
示例响应
{
"value": [
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "sampleAccessToken",
"jwtToken": "sampleJwtToken",
"createdAt": "2021-09-28T12:32:33Z",
"expiryAt": "2022-09-28T12:32:33Z",
"state": "Active"
}
],
"nextLink": null
}
定义
名称 | 说明 |
---|---|
Access |
链接到帐户的访问令牌的模型。 |
Access |
访问令牌状态。 |
Azure. |
错误对象。 |
Azure. |
包含错误详细信息的响应。 |
Azure. |
包含有关错误的更具体信息的对象。 根据Microsoft一个 API 指南 - https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors。 |
Paged |
AccessToken 项的分页集合 |
AccessToken
链接到帐户的访问令牌的模型。
名称 | 类型 | 说明 |
---|---|---|
createdAt |
string (date-time) |
access-token createdAt utcDateTime。 |
expiryAt |
string (date-time) |
访问令牌 expiryAt utcDateTime。 |
id |
string (uuid) maxLength: 64pattern: [A-Za-z0-9]+(-[A-Za-z0-9]+)+ |
访问令牌 ID。 |
jwtToken |
string |
JWT 格式的访问令牌值。 |
name |
string minLength: 3maxLength: 64 pattern: ^[a-zA-Z]{1}[a-zA-Z0-9]{2,63}$ |
访问令牌名称。 |
state |
访问令牌状态 - 活动 |过期。 |
AccessTokenState
访问令牌状态。
值 | 说明 |
---|---|
Active |
访问令牌处于活动状态。 |
Expired |
访问令牌已过期。 |
Azure.Core.Foundations.Error
错误对象。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
服务器定义的错误代码集之一。 |
details |
导致此报告错误的特定错误的详细信息数组。 |
|
innererror |
包含与当前对象有关错误的更具体信息的对象。 |
|
message |
string |
错误的人工可读表示形式。 |
target |
string |
错误的目标。 |
Azure.Core.Foundations.ErrorResponse
包含错误详细信息的响应。
名称 | 类型 | 说明 |
---|---|---|
error |
错误对象。 |
Azure.Core.Foundations.InnerError
包含有关错误的更具体信息的对象。 根据Microsoft一个 API 指南 - https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
服务器定义的错误代码集之一。 |
innererror |
内部错误。 |
PagedAccessToken
AccessToken 项的分页集合
名称 | 类型 | 说明 |
---|---|---|
nextLink |
string (uri) |
指向下一页项的链接 |
value |
此页上的 AccessToken 项 |