Agent: Difference between revisions
MaxtorCoder (talk | contribs) |
MaxtorCoder (talk | contribs) (→GET) |
||
Line 388: | Line 388: | ||
Example Response: | Example Response: | ||
{ | { | ||
"response_uri": "/version/ | "response_uri": "/version/wow_ptr_[locale]" | ||
} | } | ||
Revision as of 15:49, 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/[product]
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
GET
Returns Repair uri
Example Response:
{ "response_uri":"/repair/wow_ptr_enus", "result_uri":"/game/wow_ptr_enus" }
POST
Requests Repair of a Product
Example Request:
{ "priority":{ "insert_at_head":false, "value":1000.000000 }, "uid":"wow_ptr_[locale]" }
/repair/[product]
To do!ᵘ
/register
To do!ᵘ
/gamesession
GET
Gets running Game Sessions
Example Response:
{ "battle.net": { "1": { "request_id" : 0.000000, "pid" : 12948.000000, "pid_path" : "C:/Program Files (x86)/Battle.net/Battle.net.exe", "binary_type" : "game" } } }
/spawned
To do!ᵘ
/version
GET
Returns /version/[product]
Example Response:
{ "response_uri": "/version/wow_ptr_[locale]" }
POST
Gets /version/[product]
Example Request:
{ "uid": "wow_ptr_[locale]" }
/version/[product]
GET
Returns versions file in JSON format
Example Response:
{ "state":1007.000000, "region":"us", "branch":"", "local_version":"8.2.0.30430", "active_config_key":"54b3dc4ced90d45071f72a05fecfd063", "current_version":30430.000000, "playable":true, "regional_version_info":{ "us":{ "config_key":"54b3dc4ced90d45071f72a05fecfd063", "display_version":"8.2.0.30430", "selected":true, "playable":true }, "eu":{ "config_key":"54b3dc4ced90d45071f72a05fecfd063", "display_version":"8.2.0.30430", "playable":true }, "cn":{ "config_key":"54b3dc4ced90d45071f72a05fecfd063", "display_version":"8.2.0.30430", "playable":true }, "kr":{ "config_key":"54b3dc4ced90d45071f72a05fecfd063", "display_version":"8.2.0.30430", "playable":true }, "tw":{ "config_key":"54b3dc4ced90d45071f72a05fecfd063", "display_version":"8.2.0.30430", "playable":true }, "sg":{ "config_key":"54b3dc4ced90d45071f72a05fecfd063", "display_version":"8.2.0.30430", "playable":true }, "xx":{ "config_key":"54b3dc4ced90d45071f72a05fecfd063", "display_version":"8.2.0.30430", "playable":true } } }
/option
To do!ᵘ
/priorities
To do!ᵘ
/createshortcut
To do!ᵘ
/hardware
GET
Gets Hardware Info
Example Response:
{ "64bit" : true, "os" : "Windows 10", "os_version_number" : "10.0.0.17763", "graphics_devices" : [ { "name" : "NVIDIA GeForce RTX 2070", "vendor_id" : 4318.000000, "video_memory" : 3221225472.000000 }, { "name" : "Microsoft Basic Render Driver", "vendor_id" : 5140.000000, "video_memory" : 0.000000 } ] }
/size_estimate
To do!ᵘ