Skip to content

Conversation

@stefanhengl
Copy link
Member

This updates the list of supported query parameters and adds a section about how to access conversations via read tokens.

@vercel
Copy link

vercel bot commented Nov 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
sourcegraph-docs Ready Ready Preview Comment Nov 3, 2025 10:56am

@stefanhengl stefanhengl force-pushed the stefan-splf-1444-make-deep-search-api-accept-uuids-from-web-client branch from f32376c to 0c0ac56 Compare November 3, 2025 10:54
@stefanhengl stefanhengl requested a review from a team November 3, 2025 10:54
@stefanhengl stefanhengl marked this pull request as ready for review November 3, 2025 10:55
-H 'X-Requested-With: my-client 1.0.0'
```

## Accessing conversations via read tokens
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could omit this section, because we already document the query parameter in a previous section. However, it might be worth emphasizing this point because it connects the Web UI with the API.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this section is really important and we should probably double down on how this is an alternative to the numeric IDs we never show to the user...
cc @mmanela

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In our API, the questions have numeric IDs and refer to their conversations, which also have integer IDs. If we want to switch to UUIDs, we should switch questions, too. Supporting both, ID and UUID is of course possible, but I don't think it's necessary and it is quite messy in the code and in the documentation.

Using UUID as IDs can also hurt db performance and it doesn't provide an intrinsic order either, which implies other API changes; for example, we have to remove support for id as sort parameter.

I am not against UUID. After all Amp uses them too. I just want to point out that they are often not for free.

If we want to switch to UUIDs for everything I think we should introduce a v2. This gives us the chance to remove ids completely and provide a clean API.

However I don't think that this user request really warrants a new API version. It's quite a specific request and we support it already ;-)

Alternative:

Switch to IDs for everything, which implies adding a flag to the DB that the thread has been shared. The only reason that we have UUIDs in the first place is because all threads are public once a customer enables sharing.

Con: Customers have already created UUID links, so we have to support UUIDs for a while.

Copy link
Contributor

@janhartman janhartman Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your argument makes sense, I underestimated the complexity here. I agree that this is a specific ask and it's OK if we don't push this further

@stefanhengl stefanhengl merged commit cab9036 into main Nov 4, 2025
7 checks passed
@stefanhengl stefanhengl deleted the stefan-splf-1444-make-deep-search-api-accept-uuids-from-web-client branch November 4, 2025 12:15
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 this pull request may close these issues.

3 participants