BlueTracker

Bluetracker
Volver al Bluetracker

Character Media Query result structure different per character

API Discussion

Can someone explain to me why the call to character media query results in different json formats depending on which character form the same guild is queried? This is a breaking issue.

Good Result

{
  "_links": { "self": { "href": ".../profile/wow/character/feathermoon/hooka/character-media?namespace=profile-us" } },
  "character": {
    "key": { "href": ".../profile/wow/character/feathermoon/hooka?namespace=profile-us" },
    "name": "Hooka",
    "id": 139454303,
    "realm": {
      "key": { "href": ".../data/wow/realm/118?namespace=dynamic-us" },
      "name": "Feathermoon",
      "id": 118,
      "slug": "feathermoon"
    }
  },
  "avatar_url": ".../character/feathermoon/95/139454303-avatar.jpg",
  "bust_url": ".../character/feathermoon/95/139454303-inset.jpg",
  "render_url": ".../character/feathermoon/95/139454303-main.jpg"
}

** Bad Result**

(Notice the assets property instead of the _url properties)

{
  "_links": { "self": { "href": ".../profile/wow/character/feathermoon/vajraven/character-media?namespace=profile-us" } },
  "character": {
    "key": { "href": ".../profile/wow/character/feathermoon/vajraven?namespace=profile-us" },
    "name": "Vajraven",
    "id": 5280949,
    "realm": {
      "key": { "href": ".../data/wow/realm/118?namespace=dynamic-us" },
      "name": "Feathermoon",
      "id": 118,
      "slug": "feathermoon"
    }
  },
  "assets": [
    {
      "key": "avatar",
      "value": ".../character/feathermoon/181/5280949-avatar.jpg"
    },
    {
      "key": "inset",
      "value": ".../character/feathermoon/181/5280949-inset.jpg"
    },
    {
      "key": "main",
      "value": ".../character/feathermoon/181/5280949-main.jpg"
    },
    {
      "key": "main-raw",
      "value": ".../character/feathermoon/181/5280949-main-raw.png"
    }
  ]
}
Maguthul
19-11-2020 17:25:20

Hi Grimiz,

As suggested by Schiller this is an intended change, and it is expected that some responses will have a different structure than others. Character API documents are re-published on character logout, so characters that have not logged out since the change will have the previous schema.

In the HTTP response, you should see a header as so: Battlenet-Schema-Revision, which denotes the version of the schema returned. For this particular document, the current schema revision is 5.

Battlenet-Schema-Revision: 5
Fuente

Completar Registro

Política de cookie (EU)

BlueTracker

Back to Top

Acceder

O con nombre de usuario:

¿Olvidaste tu contraseña?

¿No tienes una cuenta? Registrarse

¿Olvidaste tu contraseña?

Introduce los datos de tu cuenta y te enviaremos un enlace para restablecer tu contraseña.

Your password reset link appears to be invalid or expired.

Acceder

Privacy Policy

Add to Collection

No Collections

Here you'll find all collections you've created before.