-
Notifications
You must be signed in to change notification settings - Fork 67
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
Update OONIRun spec #278
Update OONIRun spec #278
Conversation
backends/bk-005-ooni-run-v2.md
Outdated
|
||
"description": "", | ||
"oonirun_id": "", // `string` OONI Run link identifier. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency can we do a s/oonirun_id/ooni_run_link_id
in the backend and frontend?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we passing the ooni_run_link_id
as part of the create operation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The oonirun_id variable has been renamed in ooni/backend@a376270 and related commits.
When support for translations + URL updates have been added to the OONI Run links we implemented them as appending new records to the database table in order:
- to keep history of previous versions in case users want to fetch an older version instead of the latest one
- to allow incremental improvements of translations
This is implemented in Add translation support for OONI Run v2 backend#699 - also see https://docs.google.com/document/d/1tsik0DZLOgYHh01RsLWWXp3ZHhHB_C07j8dcaMbGB9M/edit
On the database side rather than updating an existing OONI Run we are creating either a new version or a new translations, hence every action can be done with the/api/_/ooni_run/create
path.
To add more items related to an already existing OONI Run link the Web UI passesooni_run_link_id
.
When absent the API generates a newooni_run_link_id
value.
|
||
} | ||
``` | ||
|
||
## 4.2 UPDATE an existing OONI Run link |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happened to updates for OONI Run links? I believe it is supported, so why was the update text removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See previous reply.
backends/bk-005-ooni-run-v2.md
Outdated
@@ -344,14 +358,20 @@ authentication should be handled. | |||
When you `CREATE` a new OONI RUN link, the client sends a HTTP `POST` | |||
request conforming to the following: | |||
|
|||
`POST /api/v1/ooni_run` | |||
`POST /api/_/ooni_run/create` with optional `id` argument |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this "with optional id
argument" mean? Where is this argument passed and what does it do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See previous reply.
- "only_latest": <boolean> // Return only the latest version of each OONI Run link | ||
- "include_archived": <boolean> // Include archived links | ||
- "only_mine": <boolean> // Show only links owned by the current user | ||
- "ids": <string> // Comma-separated OONI Run link ID numbers to filter for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How are these "arguments" passed? Does this mean these are URL parameters? If that is the case, then we should clarify that's what we mean specify how they are passed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are described in https://api.ooni.io/apidocs/#/default/get_api___ooni_run_list - I'll update the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some changes need to be done for clarity. The UPDATE method sections is missing. We should, for consistency, change the name of oonirun_id
to ooni_run_link_id
so it's consistent with what we use elsewhere.
|
||
"v": 1 // Response format version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this appears in many parts of the spec, we probably should make a table at the beginning of the doc explaining this v
option and include a list of current version (which now starts from 1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a paragraph explaining it.
ac70eb1
to
781970e
Compare
This is superseeded by #292 |
Updated based on the current implementation.
ooni/backend#678
ooni/backend#699
ooni/backend#702