GET
/
api
/
auth
/
api-keys
列出当前可管理的 API Key
curl --request GET \
  --url https://wfapi.yuhe.space/api/auth/api-keys \
  --cookie workflow_auth_session=
{
  "errCode": 123,
  "errMessage": "<string>",
  "data": {
    "items": [
      {
        "id": "<string>",
        "userId": "<string>",
        "name": "<string>",
        "prefix": "<string>",
        "source": "<string>",
        "scopes": [
          "<string>"
        ],
        "createdAt": "2023-11-07T05:31:56Z",
        "createdByUserId": "<string>",
        "expiresAt": "2023-11-07T05:31:56Z",
        "revokedAt": "2023-11-07T05:31:56Z",
        "lastUsedAt": "2023-11-07T05:31:56Z",
        "lastUsedIp": "<string>",
        "userAgent": "<string>"
      }
    ]
  }
}

Authorizations

workflow_auth_session
string
cookie
required

通过密码登录或管理员密钥登录建立的 httpOnly 浏览器会话。

Response

普通用户默认查看自己的 API Key;管理员或带 api_keys.manage_all 的 principal 可查看全部。

errCode
integer
required
errMessage
string
required
Allowed value: ""
data
object
required