microsoft / PlanetaryComputer

Issues, discussions, and information about the Microsoft Planetary Computer
https://planetarycomputer.microsoft.com/
MIT License
185 stars 9 forks source link

Items paging links broken #360

Closed captaincoordinates closed 5 months ago

captaincoordinates commented 5 months ago

At some point today items paging links appear to have been broken. It was working fine for me several hours ago, but now this sentinel-2-l2a items link returns the following links array (note the missing /api/stac/v1 in the "next" link):

[
    {
      "rel": "collection",
      "type": "application/json",
      "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/sentinel-2-l2a"
    },
    {
      "rel": "parent",
      "type": "application/json",
      "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/sentinel-2-l2a"
    },
    {
      "rel": "root",
      "type": "application/json",
      "href": "https://planetarycomputer.microsoft.com/api/stac/v1/"
    },
    {
      "rel": "self",
      "type": "application/geo+json",
      "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/sentinel-2-l2a/items"
    },
    {
      "rel": "next",
      "type": "application/geo+json",
      "method": "GET",
      "href": "https://planetarycomputer.microsoft.com/collections/sentinel-2-l2a/items?token=next:sentinel-2-l2a:S2B_MSIL2A_20240613T142719_R053_T21QYB_20240613T180205"
    }
  ]
TomAugspurger commented 5 months ago

Thanks for the report. We'll take a look.

TomAugspurger commented 5 months ago

This is going to take a longer to fix than I expected, but we should have it fixed tomorrow. It's not ideal, but in the meantime, you might try manually patching the next link to include the api/stac/v1/ prefix :/

mmcfarland commented 5 months ago

This should be resolved now, the next link includes the full expected URL path. Thanks for the reproducible example 👍