microsoft / microsoft/planetary-computer-apis

Possibly incorrect `self` link on `collections/<collection-id>/items` page

Open
#124 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
129
Forks
33
Avg merge
2d 20h
Merged PRs (30d)
1

Description

Spotted by @geospatial-jeff, the "self" link at https://planetarycomputer.microsoft.com/api/stac/v1/collections/sentinel-2-l2a/items?limit=1 links to the collection "https://planetarycomputer.microsoft.com/api/stac/v1/collections/sentinel-2-l2a".

❯ curl --silent 'https://planetarycomputer.microsoft.com/api/stac/v1/collections/sentinel-2-l2a/items?limit=1' | jq .links[3]
{
  "rel": "self",
  "type": "application/json",
  "href": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/sentinel-2-l2a"
}

Should that instead be the URL itself, like https://planetarycomputer.microsoft.com/api/stac/v1/collections/sentinel-2-l2a/items?limit=1?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the curl request for the collection items endpoint and inspect the returned links. Find the API entry point that builds this response, then verify the self href preserves the full request URL, including its query string, and add or update a regression test if the project has coverage for this endpoint.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.