Media Documents

Important: You must update your integration by January 6, 2019.

We have launched a new Developer Portal to enhance our offering to community developers. In order to maintain service, please read our migration guide.

If you are using our StarCraft II API, please note that this API is being updated to faster, more stable endpoints and will be available later in October. Please continue using the Legacy API hosted at Mashery for the time being. Learn more about this change on our forums.

Media documents is a pattern that will hopefully help with the discoverability of related web assets for request API resources. Web resources that can be expected to be linked to in media documents include web rendered images such as player character renders seen on the World of Warcraft Armory Profiles on worldofwarcraft.com, as well as in-game assets such as spell or item icons.

Using the below example, you will notice the media property present on the Mythic Keystone Affic Document. This media document links to a Generic Media Document, which when consumed contains references to related web resources that are associated with the parent document.

Mythic Keystone Affix Document

{
    "_links": {
        "self": {
            "href": "https://us.api.battle.net/data/wow/keystone-affix/:id"
        }
    },
    "id": 7,
    "name": "Bolstering",
    "description": "When any non-boss enemy dies, its death cry empowers nearby allies, increasing their maximum health and damage by 20%.",
    "media": {
        "key": {
            "href": "https://us.api.battle.net/data/wow/media/keystone-affix/:id"
        },
        "id": 7
    }
}

Generic Media Document

{
    "_links": {
        "self": {
            "href": "https://us.api.battle.net/data/wow/media/keystone-affix/:id"
        }
    },
    "assets": [
        {
            "key": "icon",
            "value": "https://render-us.worldofwarcraft.com/icons/56/ability_warrior_battleshout.jpg"
        }
    ]
}

When consuming assets linked to in media documents, we strongly encourage consumers to store copies of these resources on their own servers/otherwise, rather than hotlinking directly to the resources.