Create new API root aliases to help consolidate endpoints
The profile API is used to help replace a couple of previously Drupal-run services, which had different strictness around paths of endpoints. As part of the Java initiative, we attempt to be strict around APIs and appropriately namespace calls to better manage URLs and routes. To this end, we will create a new root for profile calls and shift the current endpoints to legacy aliases of the namespaced calls.
The previous endpoints will be denoted as legacy/deprecated within the API specs for the project. They should not be used for new implementations, though there is no immediate plan to remove those endpoints as there are a lot of distributed and legacy calls that cannot easily be updated. At some point in the future, we can look at proxy passing to the new URLs, but we cannot rewrite them as not all clients support rewrites.
As the logic would be pretty distributed with this change set, we should make sure that we duplicate as little code as possible to make this easy to maintain and reduce risk of strange regressions across the 2 sets of calls. Below is a list of an initial recommended call structure that we can work with to standardize this API
Endpoint | Description |
---|---|
/profile/user | Query users for user with meta information, such as email, github handle, or drupal node ID |
/profile/user/{userid} | Retrieve a specific users information if available |
/profile/user/{userid}/{metatype} | Allows for access of user metadata, such as eca, mailing-lists, and projects |
/profile/user/{userid}/user-delete-request | Queue a user for deletion by propagating calls to downstream services. |
/profile/webhook | (Not currently implemented) Allow for certain web services to remotely and securely request user data |
/github/profile | Legacy alias - Lookup a user via their Github handle |
/account/profile | Legacy alias - Query users for a user with meta information, such as email and drupal node ID |
/account/profile/{userid} | Legacy alias - Retrieve a specific users information if available |
/account/profile/{userid}/{metatype} | Legacy alias - Allows for access of user metadata, such as eca, mailing-lists, and projects |
/account/profile/{userid}/user-delete-request | Legacy alias - Queue a user for deletion by propagating calls to downstream services. |