Agent: Difference between revisions

From wowdev
Jump to navigation Jump to search
(Created page with "Agent is the application that the Battle.net launcher uses to handle anything installation related. It starts together with the Battle.net client but is also known to idle in...")
(No difference)

Revision as of 13:43, 20 May 2019

Agent is the application that the Battle.net launcher uses to handle anything installation related. It starts together with the Battle.net client but is also known to idle in the background.

Products

Agent uses different product names than TACT does. For example, wowt is wow_ptr. A list of these products can be found in the Battle.net catalog (todo: expand on catalog).

HTTP server methods

Upon starting, Agent tries to bind itself to port 1120 on startup. If this fails, it tries on 6881, if that fails 6882, 6883 etc. When using the below methods, use the User-Agent 'phoenix-agent/1.0'. First request the /agent method to get an Authorization token you'll need to include in future requests (in the Authorization header).

This list is by no means exhaustive and entire methods might be missing or methods might be missing GET/POST or /[product] sub-methods.

agent/

GET

Gets authorization information.

Example response:

{
       "pid" : 1234.000000,
       "user_id" : "-- REDACTED --",
       "user_name" : "-- REDACTED --",
       "state" : 1004.000000,
       "version" : "2.17.2.6700",
       "region" : "eu",
       "type" : "retail",
       "opt_in_feedback" : true,
       "session" : "-- REDACTED --",
       "authorization" : "-- REDACTED --"
}

game/

GET

Gets a list of currently installed/installing products known to Agent.

Example response:

{
        "agent" : {
                "link" : "/game/agent"
        },
        "battle.net" : {
                "link" : "/game/battle.net"
        },
        "wow_classic_beta" : {
                "link" : "/game/wow_classic_beta"
        },
        "wow_enus" : {
                "link" : "/game/wow_enus"
        }
}

game/[product]

GET

Example response:

This response is collapsed by default to reduce page length. Click expand on the right to expand.

{
       "background_download_available" : false,
       "background_download_complete" : true,
       "binary_launch_path" : "",
       "binary_launch_path64" : "",
       "download_complete" : true,
       "install_dir" : "C:/Program Files (x86)/World of Warcraft",
       "installed" : true,
       "installed_locales" : [
               "enUS"
       ],
       "launch_arguments" : [],
       "patch_application_complete" : true,
       "product" : "wow_classic_beta",
       "account_country" : "NLD",
       "geo_ip_country" : "NL",
       "selected_locale" : "enUS",
       "selected_asset_locale" : "enUS",
       "update_progress" : 1.000000,
       "binaries" : {
               "game" : {
                       "regex" : "",
                       "relative_path" : "_classic_beta_/WoWB.exe",
                       "switcher" : false,
                       "launch_arguments" : []
               }
       },
       "display_locales" : [
               "enUS",
               "deDE",
               "esES",
               "esMX",
               "frFR",
               "ruRU",
               "koKR",
               "ptBR",
               "zhTW",
               "zhCN"
       ],
       "update_method" : "ngdp",
       "required_os_version" : "6.1.0.0",
       "supports_multibox" : true,
       "supports_32bit" : false,
       "version_cooldown" : 0.000000,
       "opaque_product_specific" : {
               "uses_web_credentials" : "true"
       },
       "product_family" : "wow",
       "shared_container_info" : {
               "uids" : [
                       "wow_enus",
                       "wow_classic_beta"
               ],
               "subpath" : "_classic_beta_"
       },
       "region" : "eu",
       "branch" : "",
       "local_version" : "1.13.2.30406",
       "active_config_key" : "91f468f7aa61452dff81ace065f74685",
       "current_version" : 30406.000000,
       "playable" : true,
       "regional_version_info" : {
               "us" : {
                       "config_key" : "91f468f7aa61452dff81ace065f74685",
                       "display_version" : "1.13.2.30406",
                       "playable" : true
               },
               "eu" : {
                       "config_key" : "91f468f7aa61452dff81ace065f74685",
                       "display_version" : "1.13.2.30406",
                       "selected" : true,
                       "playable" : true
               },
               "cn" : {
                       "config_key" : "91f468f7aa61452dff81ace065f74685",
                       "display_version" : "1.13.2.30406",
                       "playable" : true
               },
               "kr" : {
                       "config_key" : "91f468f7aa61452dff81ace065f74685",
                       "display_version" : "1.13.2.30406",
                       "playable" : true
               },
               "tw" : {
                       "config_key" : "91f468f7aa61452dff81ace065f74685",
                       "display_version" : "1.13.2.30406",
                       "playable" : true
               },
               "sg" : {
                       "config_key" : "91f468f7aa61452dff81ace065f74685",
                       "display_version" : "1.13.2.30406",
                       "playable" : true
               },
               "xx" : {
                       "config_key" : "91f468f7aa61452dff81ace065f74685",
                       "display_version" : "1.13.2.30406",
                       "playable" : true
               },
               "beta" : {
                       "config_key" : "91f468f7aa61452dff81ace065f74685",
                       "display_version" : "1.13.2.30406",
                       "playable" : true
               }
       }
}

install/

POST

Requests the addition of a new product to the known product list. Does not actually start the install yet.

Example request:

{
	"instructions_dataset" : [
		"torrent",
		"win",
		"wow_classic_beta",
		"enus"
	],
	"instructions_patch_url" : "http://eu.patch.battle.net:1119/wow_classic_beta",
	"instructions_product" : "NGDP",
	"monitor_pid" : 12345.000000,
	"priority" : {
		"insert_at_head" : false,
		"value" : 900.000000
	},
	"uid" : "wow_classic_beta"
}

install/[product]

GET

Gets the current status of the installation (if one is currently on-going, returns 404 otherwise).

Example response:

This response is collapsed by default to reduce page length. Click expand on the right to expand.

{
	"installed" : true,
	"progress" : 0.788332,
	"playable_progress" : 0.788332,
	"download_complete" : false,
	"patch_application_complete" : false,
	"state" : 1003.000000,
	"download_rate" : 6336703.523654,
	"paused" : false,
	"download_total" : [
		151679743.000000,
		5467787030.000000,
		1076909397.000000
	],
	"download_current" : [
		151679743.000000,
		4879705322.000000,
		241012436.000000
	],
	"thresholds" : [
		0.027161,
		0.839922
	],
	"download_remaining" : 1423978669.000000,
	"info_download_bytes" : 5277158968.000000,
	"info_written_bytes" : 5275355295.000000,
	"info_failed_bytes" : 0.000000,
	"info_expected_bytes" : 6696374732.000000,
	"info_expected_org_bytes" : 6696376170.000000,
	"needs_rebase" : false,
	"ignore_disc" : false,
	"using_media" : false,
	"extended_status" : {
		"current" : 0.000000,
		"total" : 0.000000,
		"state" : 0.000000,
		"remaining" : 0.000000,
		"unit_type" : "count"
	},
	"product_family" : "wow",
	"shared_container_info" : {
		"uids" : [
			"wow_enus",
			"wow_classic_beta"
		],
		"subpath" : "_classic_beta_"
	},
	"region" : "eu",
	"branch" : "",
	"local_version" : "1.13.2.30406",
	"active_config_key" : "91f468f7aa61452dff81ace065f74685",
	"current_version" : 30406.000000,
	"playable" : true,
	"regional_version_info" : {
		"us" : {
			"config_key" : "91f468f7aa61452dff81ace065f74685",
			"display_version" : "1.13.2.30406",
			"playable" : true
		},
		"eu" : {
			"config_key" : "91f468f7aa61452dff81ace065f74685",
			"display_version" : "1.13.2.30406",
			"selected" : true,
			"playable" : true
		},
		"cn" : {
			"config_key" : "91f468f7aa61452dff81ace065f74685",
			"display_version" : "1.13.2.30406",
			"playable" : true
		},
		"kr" : {
			"config_key" : "91f468f7aa61452dff81ace065f74685",
			"display_version" : "1.13.2.30406",
			"playable" : true
		},
		"tw" : {
			"config_key" : "91f468f7aa61452dff81ace065f74685",
			"display_version" : "1.13.2.30406",
			"playable" : true
		},
		"sg" : {
			"config_key" : "91f468f7aa61452dff81ace065f74685",
			"display_version" : "1.13.2.30406",
			"playable" : true
		},
		"xx" : {
			"config_key" : "91f468f7aa61452dff81ace065f74685",
			"display_version" : "1.13.2.30406",
			"playable" : true
		},
		"beta" : {
			"config_key" : "91f468f7aa61452dff81ace065f74685",
			"display_version" : "1.13.2.30406",
			"playable" : true
		}
	}
}

POST

Queues the installation of a product. The finalized key is optional and is only sent after the user confirms the Install dialog in the Battle.net app.

Example request:

{
	"account_country" : "---",
	"finalized" : true,
	"game_dir" : "C:\\Program Files (x86)\\World of Warcraft",
	"geo_ip_country" : "--",
	"language" : [
		"enUS"
	],
	"selected_asset_locale" : "enUS",
	"selected_locale" : "enUS",
	"shortcut" : "all",
	"tome_torrent" : ""
}

update/[product]

POST

Starts an update.

Example request:

{
    "priority": {
        "insert_at_head": true,
        "value": 699.0
    },
    "uid": "wow_classic_beta"
}

uninstall/

POST

Uninstalls a product.

Example request:

{
    "run_compaction": true,
    "uid": "wow_classic_beta"
}

/admin

To do!

/download

To do!

/agent/download

To do!

/backfill

To do!

/repair

To do!

/register

To do!

/gamesession

To do!

/spawned

To do!

/version

To do!

/option

To do!

/priorities

To do!

/createshortcut

To do!

/hardware

To do!

/size_estimate

To do!