生成用于签名日志实时流请求的令牌 | 大装置帮助中心
跳到主要内容

生成用于签名日志实时流请求的令牌

接口描述

POST

/monitor/ts/data/v1/subscriptions/:subscription_name/resourceGroups/:resource_group_name/zones/:zone/telemetryStations/:telemetry_station_name/logLivestream/token

生成用于签名日志实时流请求的令牌

请求头(Request Header)

参考认证(authentication)

请求参数(Request Parameters)

名称类型必须位置默认值取值范围描述
subscription_namestringpath--订阅
resource_group_namestringpath--资源组
zonestringpath--可用区
telemetry_station_namestringpath--监控空间

请求体(Request Body)

名称类型描述
resource_typestring资源类型
resource_idstring资源ID
filters[]Filter过滤器

其中,Filter如下:

名称类型描述
keystring筛选键,例如gpu
values[]string筛选值,例如[0,1,2]

请求示例(Request Example)

curl -XPOST 'https://monitor.sensecoreapi.tech/monitor/ts/data/v1/subscriptions/224bae0c-a98f-41f5-b5d3-9f54aa98455f/resourceGroups/default/zones/cn-sh-01z/telemetryStations/ts-code1030-224bae0c/logLivestream/token' \
-H 'Content-Type: application/json' \
-d '{
"resource_type": "resource_type.compute.workspace.v1.instance",
"resource_id": "a831a4aa-6811-11ee-bc1e-e612694d9db2",
"filters":
[
{
"key": "acp.lepton.sensetime.com/job-name",
"val": "pt-wm0dduu9"
},
{
"key": "pod",
"val": "pt-wm0dduu9-worker-0"
}
]
}'

响应(Response)

名称类型描述
tokenstring令牌
endpointstring端点
expire_timestring过期时间

响应示例(Response Example)

{
"token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzZW5zZWNvcmUudGVsZW1ldHJ5LmxvZ3N0cmVhbS5hdXRoIiwic3ViIjoic2Vuc2Vjb3JlLnRlbGVtZXRyeS5sb2dzdHJlYW0uYXV0aCIsImF1ZCI6WyJzZW5zZWNvcmUudGVsZW1ldHJ5LmxvZ3N0cmVhbS5wcm94eSJdLCJleHAiOjE3MTI3MzU1MDQsIm5iZiI6MTcxMjcyMDIwNCwiaWF0IjoxNzEyNzIxMTA0LCJqdGkiOiIwZWVmMzQ0ZC02Y2Q4LTRjZTEtYWM2Yi0xMjBlMTYwZWQ2NTEiLCJSZXNvdXJjZVR5cGUiOiJyZXNvdXJjZV90eXBlLmNvbXB1dGUud29ya3NwYWNlLnYxLmluc3RhbmNlIiwiUmVzb3VyY2VJRCI6ImE4MzFhNGFhLTY4MTEtMTFlZS1iYzFlLWU2MTI2OTRkOWRiMiIsIkVuZHBvaW50IjoibW9uaXRvci1kYXRhLmNuLXNoLTAxYy5zZW5zZWNvcmVhcGkudGVjaCIsIlpvbmUiOiJtb25pdG9yLWRhdGEuY24tc2gtMDFjLnNlbnNlY29yZWFwaS50ZWNoIiwiTmFtZXNwYWNlIjoibnMtY29kZTEwMzAtOTk4ZjhmN2QiLCJQb2QiOiJwdC13bTBkZHV1OS13b3JrZXItMCIsIkNvbnRhaW5lciI6InB5dG9yY2giLCJGaWx0ZXJzIjp7ImFjcC5sZXB0b24uc2Vuc2V0aW1lLmNvbS9qb2ItbmFtZSI6InB0LXdtMGRkdXU5IiwicG9kIjoicHQtd20wZGR1dTktd29ya2VyLTAifX0.ozWEPNjsBJmPE-KALLosiqeB6r3lnurHoF0vuBNjs9u_jPbswh9UlsYW4ywdrpFIWTKYnlXMnokhTagPA4-4wg",
"endpoint": "monitor-data.cn-sh-01c.sensecoreapi.tech",
"expire_time": "2024-04-10T07:51:44.227382964Z"
}