chore(api): clean up/remove api v1 from docs

ref: #873 closes #343
This commit is contained in:
2025-07-23 10:12:12 +09:30
parent 5eb0931495
commit 36303ec28f
2 changed files with 4 additions and 32 deletions

View File

@ -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

View File

@ -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/<organization id>`, `HTTP/GET` view an organization
- url `/api/organization/<organization id>`, `HTTP/PATCH` edit an organization
- url `/api/organization/<organization id>`, `HTTP/DELETE` delete an organization
## Teams
- url `/api/organization/<organization id>/team`, `HTTP/GET` view teams within org
- url `/api/organization/<organization id>/team`, `HTTP/POST` create team in org
- url `/api/organization/<organization id>/team/<team id>`, `HTTP/GET` view a team in org
- url `/api/organization/<organization id>/team/<team id>`, `HTTP/PATCH` edit team in org
- url `/api/organization/<organization id>/team/<team id>`, `HTTP/DELETE` delete team in org
### Team Permissions
- url `/api/organization/<organization id>/team/<team id>/permissions`, `HTTP/POST` = replace permissions with those in body
- url `/api/organization/<organization id>/team/<team id>/permissions`, `HTTP/PATCH` = amend permissions to include those in body
- url `/api/organization/<organization id>/team/<team id>/permissions`, `HTTP/DELETE` = delete ALL permissions
HTTP/POST or HTTP/PATCH with list of permission in format `<module name>.<permission>_<model>`. 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.