icpc / ccs-specs

Contest Control System specifications
https://ccs-specs.icpc.io
10 stars 10 forks source link

Capabilities and Account endpoint #81

Closed deboer-tim closed 2 years ago

deboer-tim commented 2 years ago

I looked at several REST APIs, and the pattern is often /users (for all users), /users/x for a specific user, and /user to get the current user. In more than one case /users/x and /user had different properties.

Following this same pattern, I'm proposing /account to get the currently logged in account. The properties are identical to /accounts where they overlap (id, username, team/people id), but it does not include all of the same properties (e.g. password, IP) and has a couple new ones: capabilities, and a list of types that tells you which types and properties for each you may see. The types list is shared with the notification format.

I've added a section to describe what capabilities are, but not attempt to define any of them. I'd like to focus on the accounts endpoint and capabilities description first, then use separate PR(s) to define the capabilities.

deboer-tim commented 2 years ago

As discussed on the call, we'll split this into /account and /access. It was easier to start a new branch, so I'm cancelling this PR/branch, PR #82 adds /account, and I'll create another for /access.