Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Commit

Permalink
fix: Add more endpoints from TM admin
Browse files Browse the repository at this point in the history
  • Loading branch information
rsavoye committed Dec 18, 2023
1 parent 3e282f4 commit 6d95eac
Showing 1 changed file with 26 additions and 17 deletions.
43 changes: 26 additions & 17 deletions docs/endpoints.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
# REST API Endpoints

This is a comparison between the endpoint of Tasking Manager and the
Field Mapping Tasking Manager. The goal of the TM Admin project is to
support these endpoints. There is also not an obvious 1-1 relationship
between endpoints the support class in TM Adamin. Endpoints are higher
level than the code in TM Admin.

For the common functions like querying the database by ID or name,
these are in a base class, so shared.

# Users

Endpoints for managing User profiles.

| Tasking Manager | FMTM|TM Admin|
|-----------------|-----|--------|
|Get paged list of all usernames|Get Users|UsersDB.getAll()|
|Registers users without OpenStreetMap account||
|Registers users without OpenStreetMap account||UsersDB.createTable()|
|Updates user info||UsersDB.updateTable()|
|Resends the verification email token to the logged in user||
|Get paged lists of users matching OpenStreetMap username filter||
|Get user information by OpenStreetMap username|UsersDB.getByName()|
|Get stats about users registered within a period of time||
|Get user information by OpenStreetMap username||UsersDB.getByName()|
|Get stats about users registered within a period of time||UsersDB.getByWhere()|
|Get user information by id|Get User by ID|UsersDB.getByID()|
|Allows user to enable or disable expert mode||UsersDB.updateExpert()|
|Allows PMs to set a user's mapping level||UsersDB.updateMappingLevel()|
|Allows PMs to set a user's role||UsersDB.updateRole()
|Get a list of tasks a user has interacted with||
|Allows user to enable or disable expert mode||
|Allows PMs to set a user's mapping level||
|Allows PMs to set a user's role|Create User role|
|Get details from OpenStreetMap for a specified username||
|Resends the verification email token to the logged in user||
|Get recommended projects for a user||
|Get details from OpenStreetMap for a specified username||
|Get detailed stats about a user by OpenStreetMap username||
|Get paged lists of users matching OpenStreetMap username filter||
||Get User Roles|

# Organizations
Expand All @@ -31,7 +40,7 @@ Endpoints for managing Organization profiles.
|-----------------|-----|--------|
| List all organisations|Get Organization|OrganizationsDB.getAll()|
| Creates a new organisation|Create Organization|OrganizationsDB.createTable()|
| Deletes an organisation|Delete Organizations|||
| Deletes an organisation|Delete Organizations|OrganizationsDB.deleteByID|
| Retrieves an organisation|Get Organization Detail|OrganizationsDB.getByID()|
| Updates an organisation|Update Organization|OrganizationsDB.updateTable()|
| Return statistics about projects and active tasks of an organisation||
Expand All @@ -50,13 +59,13 @@ Endpoints for managing projects.
|Get popular projects||projectsDB.getByWhere()|
|Get similar projects||projectsDB.getByWhere()|
|Gets projects user has mapped||projectsDB.getByWhere()|
|Deletes a Tasking-Manager project|Delete Project|
|Deletes a Tasking-Manager project|Delete Project|projectsDB.deleteByID()|
|Get a specified project including it's area|Get Project Details|projectsDB.getByID()|
|Updates a Tasking-Manager project|Update Project|projectsDB.updataTable()|
|Set a project as featured||projectsDB.updateTable()|
|Set a project as featured||projectsDB.updateColumn()|
|Send message to all contributors of a project||
|Unset a project as featured||projectsDB.updateTable()|
|Transfers a project to a new user||projectsDB.updateTable()|
|Unset a project as featured||projectsDB.updateColumn()|
|Transfers a project to a new user||projectsDB.updateColumn()|
|Get all user activity on a project||projectsDB.getByWhere()|
|Get latest user activity on all of project task||projectsDB.getByWhere()|
|Get all user contributions on a project||projectsDB.getByWhere()|
Expand Down Expand Up @@ -100,11 +109,11 @@ Endpoints for managing tasks in a project.
|Get all tasks for a project as JSON|Read Tasks|tasksDB.getAll()|
|Extends duration of locked tasks||tasksDB.getByWhere()|
|Invalidate all validated tasks on a project|||
|Locks a task for mapping||tasksDB.updateTable()|
|Lock tasks for validation||tasksDB.updateTable()|
|Locks a task for mapping||tasksDB.updateColumn()|
|Lock tasks for validation||tasksDB.updateColumn()|
|Map all tasks on a project||
|Set all bad imagery tasks as ready for mapping||tasksDB.updateTable()|
|Reset all tasks on project back to ready, preserving history||tasksDB.updateTable()|
|Reset all tasks on project back to ready, preserving history|||
|Revert tasks by a specific user in a project||
|Split a task||
|Unlock a task that is locked for mapping resetting it to its last status||tasksDB.updateTable()|
Expand Down

0 comments on commit 6d95eac

Please sign in to comment.