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

Initial detail of HTTP API #56

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Initial detail of HTTP API #56

wants to merge 3 commits into from

Conversation

andyleiserson
Copy link
Collaborator

No description provided.

api.bs Outdated Show resolved Hide resolved
api.bs Outdated
<a method for=PrivateAttribution>saveImpression()</a> API.

<pre class=example id=ex-save-impression-header>
Save-Impression: conversionSite=advertiser.example;histogramIndex=2;\

Choose a reason for hiding this comment

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

Is it intentional that this is a single-key dictionary (conversionSite) with parameters for histogramIndex, filterData, and lifetimeDays?

Not suggesting it's wrong, but just making sure the intention wasn't for each of those last three to themselves be a top-level key, in which case the ; separator should be replaced with a space. Making them top-level keys is arguably more flexible, as they can themselves gain parameters over time, but it depends on what future changes, if any, we want this header to support. It's unclear to me if there's a benefit to making this a dictionary (rather than a single item) if there will only ever be one top-level key.

Related, would it make sense to allow multiple impressions to be registered in a single HTTP response? If so, maybe this should be a top-level list instead.

Finally, per https://httpwg.org/specs/rfc9651#rfc.section.3.2:

Member keys cannot contain uppercase characters.

So these might be more conventionally spelled like conversion-site. This also applies to parameters.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks @apasel422 for reviewing. I've tentatively changed it to commas (i.e. a top-level dictionary) so the definition is at least valid, but depending on the multiple impressions question and the necessary filterData expressiveness, we might want something else. I also added the multiple impressions question as a topic for the meeting.

Copy link
Collaborator

Choose a reason for hiding this comment

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

A top-level dictionary means that we will only permit a single impression to be saved. It is possible to add some structure to parameters like list=(this is a list of seven items) but the syntax is a bit unnatural, but it might be that those limitations will encourage good design... or at least creative design.

@andyleiserson andyleiserson linked an issue Dec 16, 2024 that may be closed by this pull request
Comment on lines +898 to +900
Implementations parsing the header must accept any valid
[=structured header/item=] or [=structured header/inner list=].
If the filter data is not understood, no impression is saved.

Choose a reason for hiding this comment

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

Are these sentences in conflict?

And what are the implications of the first sentence for how filter-data matching works?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, it doesn't make a lot of sense as written. I was trying to allow for extensibility of the filter data in the future, but not saving an impression sounds a lot like rejecting the filter data.

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.

Saving impressions using an HTTP-based API
3 participants