成员归因用量(owner/admin):license 绑定归因;无照/service 键流量入未归因桶(memberUserId=null);分币桶恒不跨币加总
GET
/v1/org-usage/by-member
const url = 'https://api.tansr.com/v1/org-usage/by-member';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.tansr.com/v1/org-usage/by-member \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”x-tansr-org
string
Org 作用域声明(org 公开 id);服务端校验成员资格与角色,非成员恒 404、角色不够 403
Query Parameters
Section titled “Query Parameters”from
string
to
string
Responses
Section titled “Responses”归因用量行
Media typeapplication/json
object
Examplegenerated
{ "data": [ { "memberUserId": "example", "currency": "example", "requests": 1, "inTokens": 1, "outTokens": 1, "cost": "example" } ]}本文是否有帮助?
感谢反馈,我们会持续改进这篇文章。