diff --git a/docs/projects/centurion_erp/development/views.md b/docs/projects/centurion_erp/development/views.md index 8eba149b..d700578e 100644 --- a/docs/projects/centurion_erp/development/views.md +++ b/docs/projects/centurion_erp/development/views.md @@ -8,9 +8,6 @@ about: https://gitlab.com/nofusscomputing/infrastructure/configuration-managemen Viewsets are used by Centurion ERP for each of the API views. -!!! info - Centurion release v1.3.0 added a feature lock to **ALL** Views and the current API. From this release, there is a new API at endpoint `api/v2`. As such we will only be using DRF `ViewSets`. This is required as the UI is being separated from the Centurion Codebase to its own repository. This means that Centurion will become an API only codebase. Release 2.0.0 will remove the current UI and api from Centurion. [See #](https://github.com/nofusscomputing/centurion_erp/issues/343) for details. - ## Requirements diff --git a/docs/projects/centurion_erp/user/api.md b/docs/projects/centurion_erp/user/api.md index c95adcf5..c989d7e5 100644 --- a/docs/projects/centurion_erp/user/api.md +++ b/docs/projects/centurion_erp/user/api.md @@ -6,7 +6,7 @@ template: project.html about: https://gitlab.com/nofusscomputing/infrastructure/configuration-management/centurion_erp --- -An api is available for this application and can be viewed at endpoint `/api/`. Documentation specific to each of the endpoints can be found within the swagger UI at endpoint `api/swagger/`. +An api is available for this application and can be viewed at endpoint `/api/`. Documentation specific to each of the endpoints can be found within the swagger UI at endpoint `/api/v2/docs`. ## Features @@ -15,6 +15,8 @@ An api is available for this application and can be viewed at endpoint `/api/`. - Swagger UI +All models can be found and accessed via the API. To locate a model click on it's module name then on page load you will see the model name in the list. Clicking on the model will enable you to work with it. + ## Device Inventory @@ -23,31 +25,4 @@ You can [inventory](itam/device.md#inventory) your devices and upload them to th ## Swagger UI -The swagger UI is included within this application and can be found at endpoint `/api/swagger` on your server. This UI has been used to document the API. - - -## Organizations - -- url `/api/organization`, `HTTP/GET` view organizations -- url `/api/organization`, `HTTP/POST` create an organization -- url `/api/organization/`, `HTTP/GET` view an organization -- url `/api/organization/`, `HTTP/PATCH` edit an organization -- url `/api/organization/`, `HTTP/DELETE` delete an organization - - -## Teams - -- url `/api/organization//team`, `HTTP/GET` view teams within org -- url `/api/organization//team`, `HTTP/POST` create team in org -- url `/api/organization//team/`, `HTTP/GET` view a team in org -- url `/api/organization//team/`, `HTTP/PATCH` edit team in org -- url `/api/organization//team/`, `HTTP/DELETE` delete team in org - - -### Team Permissions - -- url `/api/organization//team//permissions`, `HTTP/POST` = replace permissions with those in body -- url `/api/organization//team//permissions`, `HTTP/PATCH` = amend permissions to include those in body -- url `/api/organization//team//permissions`, `HTTP/DELETE` = delete ALL permissions - -HTTP/POST or HTTP/PATCH with list of permission in format `._`. i.e for adding a itam device permission would be `itam.add_device`. if the method is post only the permissions in the post request will remain, the others will be deleted. If method is patch, those in request body will be added. +The swagger UI is included within this application and can be found at endpoint `/api/v2/docs` on your server. This UI has been used to document the API.