创建令牌
POST /v2/services/{service}/tokens
请求头(Request Header)
请求参数(Request Parameters)
名称 | 类型 | 必须 | 位置 | 默认值 | 取值范围 | 描述 |
---|---|---|---|---|---|---|
service | string | 是 | path | - | - | The service id. |
请求体(Request Body)
名称 | 类型 | 必须 | 默认值 | 取值范围 | 描述 |
---|---|---|---|---|---|
name | string | 是 | - | - | 名称 |
display_name | string | 是 | - | - | 别名 |
key | string | 否 | - | - | 秘钥 |
creator_name | string | 否 | - | - | 创建者 |
update_time | string | 否 | - | - | 更新时间 |
create_time | string | 否 | - | - | 创建时间 |
请求示例(Request Example)
curl --location 'https://ams.sensecoreapi.tech/studio/ams/data/rp/v2/services/testllama7b/tokens' \
--header 'authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6InB1YmxpYzpoeWRyYS5qd3QuYWNjZXNzLXRva2VuIiwidHlwIjoiSldUIn0.eyJhdWQiOltdLCJjbGllbnRfaWQiOiI0ZTQxNDg1NC03MjAwLTUwOWYtYjk2MC1mOGIwZGJiYmYzMzEiLCJleHAiOjE3MDUzODYyMzEsImV4dCI6eyJhbGxfYXoiOmZhbHNlLCJhel9saXN0IjpbImNuLXNoLTAxYSIsImNuLXNoLTAxYiIsImNuLXNoLTAxeiJdLCJpc19kZWRpY2F0ZWRfdGVuYW50IjpmYWxzZSwicHJwX2xpc3QiOlsiY24tc2gtMDFhLXBycDAxIiwiY24tc2gtMDFiLXBycDAxIl0sInRlbmFudF9jZXJ0aWZ5X3N0YXR1cyI6dHJ1ZSwidGVuYW50X2NlcnRpZnlfdHlwZSI6ImVudGVycHJpc2UiLCJ0ZW5hbnRfY29kZSI6Im1hYXNyb290IiwidGVuYW50X2lkIjoiYjRmNjFmNGMtOGE2YS00ZmRiLWI0YzEtZjNiOWE0YWE0YjI0IiwidXNlcl9pZCI6ImNhNzFlZDFkLTliMjYtNDllNS1iZTk2LWIyZGE0NDlkNWE5NCIsInVzZXJfdHlwZSI6Im5vcm1hbCIsInVzZXJuYW1lIjoiam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name": "token1"
}'
响应(Response)
名称 | 类型 | 描述 |
---|---|---|
name | string | 名称 |
display_name | string | 别名 |
key | string | 秘钥 |
creator_name | string | 创建者 |
update_time | string | 更新时间 |
create_time | string | 创建时间 |
响应示例(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"
}