创建令牌 | 大装置帮助中心
跳到主要内容

创建令牌

POST /v2/services/{service}/tokens

请求头(Request Header)

参考认证(authentication)

请求参数(Request Parameters)

名称类型必须位置默认值取值范围描述
servicestringpath--The service id.

请求体(Request Body)

名称类型必须默认值取值范围描述
namestring--名称
display_namestring--别名
keystring--秘钥
creator_namestring--创建者
update_timestring--更新时间
create_timestring--创建时间

请求示例(Request Example)

curl --location 'https://ams.sensecoreapi.tech/studio/ams/data/rp/v2/services/testllama7b/tokens' \
--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": "token1"
}'

响应(Response)

名称类型描述
namestring名称
display_namestring别名
keystring秘钥
creator_namestring创建者
update_timestring更新时间
create_timestring创建时间

响应示例(Response Example)

{
"name": "tokenbala10",
"display_name": "token1",
"key": "eyJhbGciOiJFUzI1NiIsImtpZCI6ImIzNWUyNjk5LWZjNzUtNGYwYS1hMDIwLWM3NmFmYTMyZjEyMyIsInR5cCI6IkpXVCJ9.eyJleHAiOjIwMjA5OTQ5MjQsImlhdCI6MTcwNTM3NTcyNCwiaXNzIjoiaHR0cHM6Ly9pYW0taW50ZXJuYWwuc2Vuc2Vjb3JlYXBpLnRlY2gvIiwianRpIjoiNmM1Y2UxYTgtYTc5OS00OWVkLTlhZjUtOTgyOGRmYjlhNTBhIiwicmVzb3VyY2VfaWQiOiJjOWY4MzRiMi1iMTI2LTExZWUtOTgxMi1mMjZiMTRlMzM0MTUiLCJzdWIiOiJhYjU3YzE3OTc2NGI1YmM1NWFhOWU1N2ZhMTJhZDkwMiIsInVyaSI6Im1hYXNyb290LmFtcy1lbmRwb2ludC5jbi1zaC0wMS5zZW5zZWNvcmVhcGkudGVjaC90ZXN0bGxhbWE3YiJ9.4z7qUk6iqJBu8FkD1pKMok_IG7bdRrf9JYJsLBEXtaXi4lAw3_h0J48ge32PTzaKJQaZOU3_ERMST85-zX4Atw",
"creator_name": "jcao08",
"update_time": "2024-01-16T03:28:44.755204564Z",
"create_time": "2024-01-16T03:28:44.755204230Z"
}