機械翻訳について

インベントリの取得

get

/api/v2/inventories/{id}/

このリソースに対してGETリクエストを行って、次のフィールドを含む単一のインベントリ・レコードを取得します。

  • id: このインベントリのデータベースID。(整数)
  • type: このインベントリのデータ型。(選択)
  • url: このインベントリのURL。(文字列)
  • related: 関連リソースのURLを含むデータ構造。(オブジェクト)
  • summary_fields: 関連リソースの名前/説明を含むデータ構造。 一部のオブジェクトの出力は、パフォーマンス上の理由によって制限される場合があります。(オブジェクト)
  • created: このインベントリが作成されたときのタイムスタンプ。(日時)
  • modified: このインベントリが最後に変更されたときのタイムスタンプ。(日時)
  • name: このインベントリの名前。(文字列)
  • description: このインベントリのオプションの説明。(文字列)
  • organization: このインベントリを含む組織。(id)
  • kind: 表されているインベントリの種類。(選択)
    • "": ホストに、このインベントリへの直接リンクがあります。
    • smart: host_filterプロパティを使用して生成されたインベントリのホスト。
  • host_filter: このインベントリのホストに適用されるフィルタ。(文字列)
  • variables: JSONまたはYAML形式のインベントリ変数。(json)
  • has_active_failures: このフィールドは非推奨であり、今後のリリースで削除される予定です。 このインベントリのホストが失敗したかどうかを示すフラグ。(ブール)
  • total_hosts: このフィールドは非推奨であり、今後のリリースで削除される予定です。 このインベントリのホストの合計数。(整数)
  • hosts_with_active_failures: このフィールドは非推奨であり、今後のリリースで削除される予定です。 アクティブなエラーのあるこのインベントリのホスト数。(整数)
  • total_groups: このフィールドは非推奨であり、今後のリリースで削除される予定です。 このインベントリのグループの合計数。(整数)
  • has_inventory_sources: このフィールドは非推奨であり、今後のリリースで削除される予定です。 このインベントリに外部のインベントリ・ソースがあるかどうかを示すフラグ。(ブール)
  • total_inventory_sources: このインベントリ内に構成されている外部のインベントリ・ソースの合計数。(整数)
  • inventory_sources_with_failures: エラーのあるこのインベントリの外部のインベントリ・ソースの数。(整数)
  • insights_credential: このインベントリに属するホストがRed Hat Insights APIにアクセスするときに使用する資格証明。(id)
  • pending_deletion: インベントリが削除中であることを示すフラグ。(ブール)

リクエスト

サポートされているメディア・タイプ
パス・パラメータ
問合せパラメータ
先頭に戻る

レスポンス

サポートされているメディア・タイプ

200レスポンス

本文
レスポンスの例(application/json)
{
    "created":"2018-02-01T08:00:00.000000Z",
    "description":"",
    "has_active_failures":false,
    "has_inventory_sources":true,
    "host_filter":null,
    "hosts_with_active_failures":0,
    "id":1,
    "insights_credential":null,
    "inventory_sources_with_failures":0,
    "kind":"",
    "modified":"2018-02-01T08:00:00.000000Z",
    "name":"test-inv",
    "organization":1,
    "pending_deletion":false,
    "related":{
        "access_list":"/api/v2/inventories/1/access_list/",
        "activity_stream":"/api/v2/inventories/1/activity_stream/",
        "ad_hoc_commands":"/api/v2/inventories/1/ad_hoc_commands/",
        "copy":"/api/v2/inventories/1/copy/",
        "groups":"/api/v2/inventories/1/groups/",
        "hosts":"/api/v2/inventories/1/hosts/",
        "instance_groups":"/api/v2/inventories/1/instance_groups/",
        "inventory_sources":"/api/v2/inventories/1/inventory_sources/",
        "job_templates":"/api/v2/inventories/1/job_templates/",
        "object_roles":"/api/v2/inventories/1/object_roles/",
        "organization":"/api/v2/organizations/1/",
        "root_groups":"/api/v2/inventories/1/root_groups/",
        "script":"/api/v2/inventories/1/script/",
        "tree":"/api/v2/inventories/1/tree/",
        "update_inventory_sources":"/api/v2/inventories/1/update_inventory_sources/",
        "variable_data":"/api/v2/inventories/1/variable_data/"
    },
    "summary_fields":{
        "object_roles":{
            "adhoc_role":{
                "description":"May run ad hoc commands on the inventory",
                "id":17,
                "name":"Ad Hoc"
            },
            "admin_role":{
                "description":"Can manage all aspects of the inventory",
                "id":15,
                "name":"Admin"
            },
            "read_role":{
                "description":"May view settings for the inventory",
                "id":19,
                "name":"Read"
            },
            "update_role":{
                "description":"May update the inventory",
                "id":16,
                "name":"Update"
            },
            "use_role":{
                "description":"Can use the inventory in a job template",
                "id":18,
                "name":"Use"
            }
        },
        "organization":{
            "description":"test-org-desc",
            "id":1,
            "name":"test-org"
        },
        "user_capabilities":{
            "adhoc":true,
            "copy":true,
            "delete":true,
            "edit":true
        }
    },
    "total_groups":0,
    "total_hosts":0,
    "total_inventory_sources":1,
    "type":"inventory",
    "url":"/api/v2/inventories/1/",
    "variables":""
}
先頭に戻る