Skip to content

rest: Draft API for candidate devices.#499

Closed
acolomb wants to merge 15 commits intosyncthing:mainfrom
acolomb:rest-api-for-candidate-devices
Closed

rest: Draft API for candidate devices.#499
acolomb wants to merge 15 commits intosyncthing:mainfrom
acolomb:rest-api-for-candidate-devices

Conversation

@acolomb
Copy link
Copy Markdown
Member

@acolomb acolomb commented Mar 19, 2020

Add endpoints GET /rest/system/candidate{devices,folders} to serve the collected
information from ClusterConfig messages about devices with which we
share a folder only indirectly.

As discussed in syncthing/syncthing#5758 and on the forum.

So far this is only an RFC for the API endpoint design, no implementation in the main repository is available yet.

Add an endpoint GET /rest/system/candidates to serve the collected
information from ClusterConfig messages about devices with which we
share a folder only indirectly.

Needs either a folder or device ID as parameter, listing the candidate
devices for the folder, or the candidate folders for an already known
device.
acolomb added 2 commits April 1, 2020 23:41
Mirror the current draft implementation.  Add a new subsection in the
Development TOC, with a very short description.

Add FIXME about the version when this endpoint was added, TBD.
Provide the information in two different structures, as may be needed
by the API user.  GET /rest/cluster/candidatedevices shows known and
unknown devices which are candidates to share a locally known folder,
which may be limited by giving only a specific folder ID.  The top
level structure enumerates device IDs and associated metadata,
including the common folder IDs.

The GET /rest/cluster/candidatefolders is basically an inverted view,
grouping by common folder IDs on the top level.  It mentions only
known candidate devices and may be limited to a specific device ID.

Also switch to returning objects with the device / folder ID as
attribute name instead of flat arrays with the ID as a separate
attribute inside.
@calmh calmh closed this Jun 15, 2020
@calmh calmh reopened this Jun 15, 2020
@calmh calmh changed the base branch from master to main June 15, 2020 20:26
@st-review
Copy link
Copy Markdown

🤖 beep boop

I'm going to close this pull request as it has been idle for more than 90 days.

This is not a rejection, merely a removal from the list of active pull requests that is periodically reviewed by humans. The pull request can be reopened when there is new activity, and merged once any remaining issues are resolved.

@st-review st-review closed this Sep 14, 2020
Move introducing device ID to a property name within the introducedBy
object, instead of a separate deviceID property within each enumerated
item.

Extend candidate device information for already locally known devices
to also include introducing device and timestamp.
Instead of just aggregating the known common folders, include them in
the introducedBy listing.  This eases the decision whether to trust
the suggestion, by explicitly stating who claimed that the candidate
device already has each folder.

Additionally, include the folder label each introducer gave to the
supposedly common folder, as an additional hint about the sharing
intention.
Illustrate how the same candidate device / folder combination might be
described from different introducing devices.
List each introducing device per candidate device ID.  Include time of
introduction and the introducer's folder label.  Add the extra device
as listed in the candidatedevices endpoint example.
@st-review
Copy link
Copy Markdown

🤖 beep boop

I'm going to close this pull request as it has been idle for more than 90 days.

This is not a rejection, merely a removal from the list of active pull requests that is periodically reviewed by humans. The pull request can be reopened when there is new activity, and merged once any remaining issues are resolved.

@st-review st-review closed this Apr 12, 2021
@syncthing syncthing locked and limited conversation to collaborators Apr 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants