グループ内のユーザー向けに新しいトークンを作成する
POST /accounts/{account_id}/core/v1/groups/{group_id}/users/{user_id}/tokens
作成されるToken APIリソースの希望値を指定します。
パラメータ
| Name | を入力します | 入力 | 必須 | 説明 |
|---|---|---|---|---|
account_id |
string |
path(パス) |
True |
包含するアカウントリソースのID
|
group_id |
string |
path(パス) |
True |
包含するグループリソースのID |
user_id |
string |
path(パス) |
True |
含まれるユーザーリソースのID |
要求の本文
作成されるToken APIリソースの希望値を指定します。
| Name | を入力します | 必須 | 説明 |
|---|---|---|---|
を入力します |
string |
True |
リソースのメディアタイプ。定義された値は次のとおりです:
|
バージョン |
string |
True |
リソースのバージョン。定義された値は次のとおりです:
|
名前 |
string |
True |
トークン名を含むJSON文字列。定義された値は次のとおりです:
|
メタデータ |
False |
リソースに関連付けられた、クライアントおよびサービス指定のメタデータ。定義された値は次のとおりです:
|
リクエスト例
{
"type": "application/astra-token",
"version": "1.0",
"name": "Snapshot Script"
}
応答
Status: 201, Returns the newly created token resource in the JSON response body.
| Name | を入力します | 必須 | 説明 |
|---|---|---|---|
を入力します |
string |
True |
リソースのメディアタイプ。定義された値は次のとおりです:
|
バージョン |
string |
True |
リソースのバージョン。定義された値は次のとおりです:
|
ID |
string |
True |
リソースのグローバル一意識別子。定義された値は次のとおりです:
|
名前 |
string |
True |
トークン名を含むJSON文字列。定義された値は次のとおりです:
|
ユーザーID |
string |
True |
トークンが関連付けられているユーザのUUIDを含むJSON文字列。定義されている値は次のとおりです:
|
トークン |
string |
True |
base64エンコードされたシステム生成APIトークンを含むJSON文字列。定義された値は次のとおりです:
|
メタデータ |
True |
リソースに関連付けられた、クライアントおよびサービス指定のメタデータ。定義された値は次のとおりです:
|
回答例
{
"type": "application/astra-token",
"version": "1.0",
"id": "822fab12-c224-5d1f-8118-5fb5d2def8b9",
"name": "Snapshot Script",
"userID": "09f8933c-ad74-4f4e-8ef5-1ffaa0fb8e9b",
"token": "QSBKV1QgVG9rZW4gd291bGQgZ28gaGVyZS4=",
"metadata": {
"labels": [],
"creationTimestamp": "2022-10-06T20:58:16.305662Z",
"modificationTimestamp": "2022-10-06T20:58:16.305662Z",
"createdBy": "8f84cf09-8036-51e4-b579-bd30cb07b269"
}
}
応答
Status: 401, Unauthorized
| Name | を入力します | 必須 | 説明 |
|---|---|---|---|
を入力します |
string |
True |
|
タイトル |
string |
True |
|
詳細 |
string |
True |
|
ステータス |
string |
True |
|
correlationID |
string |
False |
回答例
{
"type": "https://astra.netapp.io/problems/3",
"title": "Missing bearer token",
"detail": "The request is missing the required bearer token.",
"status": "401"
}
応答
Status: 400, Bad request
| Name | を入力します | 必須 | 説明 |
|---|---|---|---|
を入力します |
string |
True |
|
タイトル |
string |
True |
|
詳細 |
string |
True |
|
ステータス |
string |
True |
|
correlationID |
string |
False |
|
invalidFields |
配列["invalidFields"] |
False |
無効なリクエストボディフィールドのリスト |
回答例
{
"type": "https://astra.netapp.io/problems/5",
"title": "Invalid query parameters",
"detail": "The supplied query parameters are invalid.",
"status": "400"
}
応答
Status: 409, Conflict
| Name | を入力します | 必須 | 説明 |
|---|---|---|---|
を入力します |
string |
True |
|
タイトル |
string |
True |
|
詳細 |
string |
True |
|
ステータス |
string |
True |
|
correlationID |
string |
False |
|
invalidFields |
配列["invalidFields"] |
False |
無効なリクエストボディフィールドのリスト |
回答例
{
"type": "https://astra.netapp.io/problems/10",
"title": "JSON resource conflict",
"detail": "The request body JSON contains a field that conflicts with an idempotent value.",
"status": "409"
}
応答
Status: 403, Forbidden
| Name | を入力します | 必須 | 説明 |
|---|---|---|---|
を入力します |
string |
True |
|
タイトル |
string |
True |
|
詳細 |
string |
True |
|
ステータス |
string |
True |
|
correlationID |
string |
False |
回答例
{
"type": "https://astra.netapp.io/problems/11",
"title": "Operation not permitted",
"detail": "The requested operation isn't permitted.",
"status": "403"
}
エラー
Status: 404, Not found
| Name | を入力します | 必須 | 説明 |
|---|---|---|---|
を入力します |
string |
True |
|
タイトル |
string |
True |
|
詳細 |
string |
True |
|
ステータス |
string |
True |
|
correlationID |
string |
False |
エラー応答の例
{
"type": "https://astra.netapp.io/problems/2",
"title": "Collection not found",
"detail": "The collection specified in the request URI wasn't found.",
"status": "404"
}
用語の意味
定義を参照
type_astra_label
| Name | を入力します | 必須 | 説明 |
|---|---|---|---|
名前 |
string |
True |
|
Value |
string |
True |
type_astra_metadata_update
リソースに関連付けられた、クライアントおよびサービス指定のメタデータ。定義された値は次のとおりです:
-
Astra メタデータスキーマに準拠します。作成時に指定しない場合、ラベルのないメタデータオブジェクトが作成されます。更新時に指定されていない場合、メタデータオブジェクトのラベル、creationTimestamp および createdBy は、変更なしで保持されます。
| Name | を入力します | 必須 | 説明 |
|---|---|---|---|
ラベル |
False |
||
作成タイムスタンプ |
string |
False |
|
modificationTimestamp |
string |
False |
|
作成者 |
string |
False |
|
modifiedBy |
string |
False |
invalidParams
| Name | を入力します | 必須 | 説明 |
|---|---|---|---|
名前 |
string |
True |
無効なクエリパラメータの名前 |
理由 |
string |
True |
クエリパラメータが無効な理由 |
invalidFields
| Name | を入力します | 必須 | 説明 |
|---|---|---|---|
名前 |
string |
True |
無効なリクエストボディフィールドの名前 |
理由 |
string |
True |
リクエスト本文フィールドが無効な理由 |