Skip to content

WIP - Send Postman Correct ID When Getting Collection #4129

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

Conversation

martinlocklear
Copy link
Contributor

So this was a doozy (and I only found it by rampaging around renaming things into something that seemed more consistent for me - see nearby commits).

Postman has two identifiers for most objects in most contexts:

  • id: This is a unique identifier for the object, and is (at least) shaped like a UUID
  • uid: Same as ID, except that the creating users's ID is concatenated as a prefix. - IMPORTANT NOTE - This is NOT a UUID

Notably, the collections APIs all ask for the collection id as the URL path parameter specifying the collection you want to grab info for, not the uid. This could be an ambiguity in the API docs (maybe it accepts both? Maybe it sometimes accepts both?), but it's not clear to me right now.

The naming of our variables here aren't very clear unless you're deep in the thick of it (and maybe not even clear then). What happened here (it looks like) is that someone mistook a uid for something that made sense to stuff into a "UUID"-suffixed variable.

Description:

Explain the purpose of the PR.

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

So this was a doozy (and I only found it by rampaging around renaming things into something
that seemed more consistent for me - see nearby commits).

Postman has two identifiers for most objects in most contexts:
 - `id`: This is a unique identifier for the object, and is (at least) shaped like a UUID
 - `uid`:  Same as ID, except that the creating users's ID is concatenated as a prefix.
       - IMPORTANT NOTE - This is NOT a UUID

Notably, the collections APIs all ask for the collection _id_ as the URL path parameter specifying
the collection you want to grab info for, _not_ the uid.  This could be an ambiguity in the API
docs (maybe it accepts both?  Maybe it _sometimes_ accepts both?), but it's not clear to me right now.

The naming of our variables here aren't very clear unless you're deep in the thick of it (and maybe
not even clear then).  What happened here (it looks like) is that someone mistook a `uid` for something
that made sense to stuff into a "UUID"-suffixed variable.
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.

1 participant