更新令牌
PATCH /v2/services/{service}/tokens/{token}
请求头(Request Header)
请求参数(Request Parameters)
名称 | 类型 | 必须 | 位置 | 默认值 | 取值范围 | 描述 |
---|---|---|---|---|---|---|
service | string | 是 | path | - | - | The service id. |
token | string | 是 | path | - | - | The token id. |
请求体(Request Body)
名称 | 类型 | 必须 | 默认值 | 取值范围 | 描述 |
---|---|---|---|---|---|
name | string | 否 | - | - | 名称 |
display_name | string | 是 | - | - | 别名 |
请求示例(Request Example)
curl --location --request PATCH 'https://ams.sensecoreapi.tech/studio/ams/data/rp/v2/services/testllama7b/tokens/tokenbala10' \
--header 'authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6InB1YmxpYzpoeWRyYS5qd3QuYWNjZXNzLXRva2VuIiwidHlwIjoiSldUIn0.eyJhdWQiOltdLCJjbGllbnRfaWQiOiI0ZTQxNDg1NC03MjAwLTUwOWYtYjk2MC1mOGIwZGJiYmYzMzEiLCJleHAiOjE3MDUzODYyMzEsImV4dCI6eyJhbGxfYXoiOmZhbHNlLCJhel9saXN0IjpbImNuLXNoLTAxYSIsImNuLXNoLTAxYiIsImNuLXNoLTAxeiJdLCJpc19kZWRpY2F0ZWRfdGVuYW50IjpmYWxzZSwicHJwX2xpc3QiOlsiY24tc2gtMDFhLXBycDAxIiwiY24tc2gtMDFiLXBycDAxIl0sInRlbmFudF9jZXJ0aWZ5X3N0YXR1cyI6dHJ1ZSwidGVuYW50X2NlcnRpZnlfdHlwZSI6ImVudGVycHJpc2UiLCJ0ZW5hbnRfY29kZSI6Im1hYXNyb290IiwidGVuYW50X2lkIjoiYjRmNjFmNGMtOGE2YS00ZmRiLWI0YzEtZjNiOWE0YWE0YjI0IiwidXNlcl9pZCI6ImNhNzFlZDFkLTliMjYtNDllNS1iZTk2LWIyZGE0NDlkNWE5NCIsInVzZXJfdHlwZSI6Im5vcm1hbCIsInVzZXJuYW1lIjoiamNhbzA4In0sImlhdCI6MTcwNTM3NTQzMSwiaXNzIjoiaHR0cHM6Ly9zaWduaW4uc2Vuc2Vjb3JlLnRlY2gvIiwianRpIjoiZmRjNjZlNjktNmNmYy00MDU5LWJjMTItYTBmODJiMjQxYjE5IiwibmJmIjoxNzA1Mzc1NDMxLCJzY3AiOlsib3BlbmlkIiwib2ZmbGluZSIsIm9mZmxpbmVfYWNjZXNzIl0sInN1YiI6ImpjYW8wODpiNGY2MWY0Yy04YTZhLTRmZGItYjRjMS1mM2I5YTRhYTRiMjQ6Y2E3MWVkMWQtOWIyNi00OWU1LWJlOTYtYjJkYTQ0OWQ1YTk0In0.ETwXlKKODAO5V85zUlaTEy9gp81dkQboF3p423yXXpPLYqup88CwmDI4VhHTsECkMS8w-HaSSae0oKwdF5wdfNazsUx3QeGBiXY7WcOH12cWh2yGaBO7oF75OG2n5PY3aBd4TSF7M7Y36oFjXF2zHIG8oGfvzBTa0IsKaZSrRhx2X9oP3XEWwIcIotIxl-ZC5UWyy5qyfBRsEhyn-P_j7Bl8z4Gkh3VTcDZXbPNG7n7TwymZQrmBIOpKXNmqSrkj3rYn28y9leWlSmmEOKL3i0bBfgaZ-suDxl-Uk9HXOqHEr7FdtAQsrs9jgdqVuvw2Mfef48N8twB_16p-7pu2y84lSJHt1jEDeHgTRjnvmm8tO2AP_u04eUv3a936B8gZpON9uomIK5otu0P0UDZIsyLDe-bvUr4kM9E0zvTQBLqm_UyWeGgiXuZrQPUrYVqx7yPtwEuzPf4rWjP4pmEZyr7hHKNPS-MeAJmG3eIyNm0iQAfCwSjkk-muWDPt2FmLN1i5_jUn5qKWhk9je_yqLEAkwWYMwQGAcw3qdzSITnVQif7pLE3bfDUfrkqgcG4UKSq2-NN_8qhfovSDWy8gbf9i9toKrJxZxRK-5xHtYvkUYVwvQUc6rUYmVJK6AmiVYGNeNp0_UsoWgH3vZE-X37abysZZ-sybODupv9URhNM' \
--header 'Content-Type: application/json' \
--data '{
"name": "tokenbala10",
"display_name": "token3newdisplay"
}'
响应(Response)
名称 | 类型 | 描述 |
---|---|---|
name | string | 名称 |
display_name | string | 别名 |
key | string | 秘钥 |
creator_name | string | 创建者 |
update_time | string | 更新时间 |
create_time | string | 创建时间 |
响应示例(Response Example)
{
"name": "tokenbala10",
"display_name": "token3newdisplay",
"key": "eyJhb*****X4Atw",
"creator_name": "jcao08",
"update_time": "2024-01-16T03:32:07.200587Z",
"create_time": "2024-01-16T03:28:44.755204Z"
}