資格証明の取得
get
/api/v2/credentials/{id}/
このリソースに対してGETリクエストを行って、次のフィールドを含む単一の資格証明レコードを取得します。
id
: この資格証明のデータベースID。(整数)type
: この資格証明のデータ型。(選択)url
: この資格証明のURL。(文字列)related
: 関連リソースのURLを含むデータ構造。(オブジェクト)summary_fields
: 関連リソースの名前/説明を含むデータ構造。 一部のオブジェクトの出力は、パフォーマンス上の理由によって制限される場合があります。(オブジェクト)created
: この資格証明が作成されたときのタイムスタンプ。(日時)modified
: この資格証明が最後に変更されたときのタイムスタンプ。(日時)name
: この資格証明の名前。(文字列)description
: この資格証明のオプションの説明。(文字列)organization
: (id)credential_type
: 作成する資格証明のタイプを指定します。 各タイプの詳細は、Ansible Towerのドキュメントを参照してください。(id)managed_by_tower
: (ブール)inputs
: JSONまたはYAML構文を使用して入力を入力します。 構文例は、Ansible Towerのドキュメントを参照してください。(json)kind
: (フィールド)cloud
: (フィールド)kubernetes
: (フィールド)
リクエスト
サポートされているメディア・タイプ
- application/json
パス・パラメータ
問合せパラメータ
- search(オプション): 文字列
検索条件。
レスポンス
サポートされているメディア・タイプ
- application/json
200レスポンス
レスポンスの例(application/json)
{
"cloud":false,
"created":"2018-02-01T08:00:00.000000Z",
"credential_type":1,
"description":"",
"id":1,
"inputs":{
"username":"someusername"
},
"kind":"ssh",
"kubernetes":false,
"managed_by_tower":false,
"modified":"2018-02-01T08:00:00.000000Z",
"name":"Some name",
"organization":1,
"related":{
"access_list":"/api/v2/credentials/1/access_list/",
"activity_stream":"/api/v2/credentials/1/activity_stream/",
"copy":"/api/v2/credentials/1/copy/",
"credential_type":"/api/v2/credential_types/1/",
"input_sources":"/api/v2/credentials/1/input_sources/",
"object_roles":"/api/v2/credentials/1/object_roles/",
"organization":"/api/v2/organizations/1/",
"owner_teams":"/api/v2/credentials/1/owner_teams/",
"owner_users":"/api/v2/credentials/1/owner_users/"
},
"summary_fields":{
"credential_type":{
"description":"",
"id":1,
"name":"Machine"
},
"object_roles":{
"admin_role":{
"description":"Can manage all aspects of the credential",
"id":15,
"name":"Admin"
},
"read_role":{
"description":"May view settings for the credential",
"id":17,
"name":"Read"
},
"use_role":{
"description":"Can use the credential in a job template",
"id":16,
"name":"Use"
}
},
"organization":{
"description":"test-org-desc",
"id":1,
"name":"test-org"
},
"owners":[
{
"description":"test-org-desc",
"id":1,
"name":"test-org",
"type":"organization",
"url":"/api/v2/organizations/1/"
}
],
"user_capabilities":{
"copy":false,
"delete":true,
"edit":true,
"use":true
}
},
"type":"credential",
"url":"/api/v2/credentials/1/"
}