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

Allow the filter JSON to be passed inline in the /sync request #224

Merged
merged 3 commits into from
Dec 9, 2015
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion api/client-server/sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ paths:
name: filter
type: string
description: |-
The ID of a filter created using the filter API.
The ID of a filter created using the filter API or a filter JSON
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the JSON be URL-encoded? Or something else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should be passed like any other query parameter, encoded as UTF-8 and URL encoded.

Copy link
Contributor

Choose a reason for hiding this comment

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

We do very explicitly state that all strings must be UTF-8 encoded in the API Standards section. As far as I know, this is the first place where a query parameter is anything other than a string or an int.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is saying that it is passed a string sufficient? c3a1318

object. The server will detect whether it is an ID or a JSON object
by whether the first character is a ``"{"`` open brace. Passing the
JSON inline is best suited to one off requests. Creating a filter
using the filter API is recommended for clients that reuse the same
filter multiple times, for example in long poll requests.
x-example: "66696p746572"
- in: query
name: since
Expand Down