機械翻訳について

インベントリ・ソースの更新

post

/api/v2/inventory_sources/{id}/update/

このリソースに対してGETリクエストを行って、グループをそのインベントリ・ソースから更新できるかどうかを判断します。 レスポンスには次のフィールドが含まれます。

  • can_update: このインベントリ・ソースを更新できるかどうかを示すフラグ(ブール、読取り専用)

インベントリ・ソースを更新するには、このリソースに対してPOSTリクエストを行います。 成功した場合、レスポンス・ステータス・コードは202になります。 インベントリ・ソースが定義されていないか、更新できない場合は、405ステータス・コードが返されます。

リクエスト

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

レスポンス

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

201レスポンス

202レスポンス

本文
レスポンスの例(application/json)
{
    "canceled_on":null,
    "created":"2018-02-01T08:00:00.000000Z",
    "credential":null,
    "custom_virtualenv":null,
    "description":"",
    "elapsed":0,
    "enabled_value":"",
    "enabled_var":"",
    "event_processing_finished":false,
    "execution_node":"",
    "failed":false,
    "finished":null,
    "host_filter":"",
    "id":1,
    "inventory":1,
    "inventory_source":1,
    "inventory_update":1,
    "job_args":"",
    "job_cwd":"",
    "job_env":{
    },
    "job_explanation":"",
    "launch_type":"manual",
    "license_error":false,
    "modified":"2018-02-01T08:00:00.000000Z",
    "name":"test-inv - single-inv-src",
    "org_host_limit_error":false,
    "overwrite":false,
    "overwrite_vars":false,
    "related":{
        "cancel":"/api/v2/inventory_updates/1/cancel/",
        "credentials":"/api/v2/inventory_updates/1/credentials/",
        "events":"/api/v2/inventory_updates/1/events/",
        "inventory":"/api/v2/inventories/1/",
        "inventory_source":"/api/v2/inventory_sources/1/",
        "notifications":"/api/v2/inventory_updates/1/notifications/",
        "stdout":"/api/v2/inventory_updates/1/stdout/",
        "unified_job_template":"/api/v2/inventory_sources/1/"
    },
    "result_traceback":"",
    "source":"ec2",
    "source_path":"",
    "source_project":null,
    "source_project_update":null,
    "source_script":null,
    "source_vars":"",
    "started":null,
    "status":"pending",
    "summary_fields":{
        "credentials":[
        ],
        "inventory":{
            "description":"",
            "has_active_failures":false,
            "has_inventory_sources":true,
            "hosts_with_active_failures":0,
            "id":1,
            "inventory_sources_with_failures":0,
            "kind":"",
            "name":"test-inv",
            "organization_id":1,
            "total_groups":0,
            "total_hosts":0,
            "total_inventory_sources":1
        },
        "inventory_source":{
            "source":"ec2",
            "status":"pending"
        },
        "organization":{
            "description":"test-org-desc",
            "id":1,
            "name":"test-org"
        },
        "unified_job_template":{
            "description":"",
            "id":1,
            "name":"single-inv-src",
            "unified_job_type":"inventory_update"
        },
        "user_capabilities":{
            "delete":false,
            "start":false
        }
    },
    "timeout":0,
    "type":"inventory_update",
    "unified_job_template":1,
    "url":"/api/v2/inventory_updates/1/",
    "verbosity":1
}

403レスポンス

本文
レスポンスの例(application/json)
{
    "detail":"You do not have permission to perform this action."
}
先頭に戻る