Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Items paging links broken #360

Closed
captaincoordinates opened this issue Jun 13, 2024 · 3 comments · Fixed by microsoft/planetary-computer-apis#221
Closed

Items paging links broken #360

captaincoordinates opened this issue Jun 13, 2024 · 3 comments · Fixed by microsoft/planetary-computer-apis#221

Comments

@captaincoordinates
Copy link

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
Copy link

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

@TomAugspurger
Copy link

TomAugspurger commented Jun 14, 2024

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
Copy link
Member

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

mmcfarland added a commit to microsoft/planetary-computer-apis that referenced this issue Jun 14, 2024
Sets the root path in uvicorn to match that set via FastAPI. This is
required with updates to starlette, which were included previously.

Fixes microsoft/PlanetaryComputer#360
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants