This section explains the different API route. Descriptions are not currently up-to-date.
# Auth
A swagger documentation can be consulted at [http://localhost:3000/api/doc/](http://localhost:3000/api/doc/)
-`api/auth/signin`: It is used for local and dev authentification. It is linked to two different password into the database.
# Auth
-`api/auth/signin`: It is used for local and dev authentification. It is linked to two different password into the database.
-`api/auth/token` : It is used for generate one token. Only for internal process. This route is not call from another apps.
-`api/auth/token` : It is used for generate one token. Only for internal process. This route is not call from another apps.
-`api/auth/token/check`: It is used for check one token. It is called from cozy-stack service of the usager.
-`api/auth/token/check`: It is used for check one token. It is called from cozy-stack service of the usager.
-`api/auth/token`: It is used for generate one token. Only for internal process. This route is not call from another apps.
-`api/auth/token`: It is used for generate one token. Only for internal process. This route is not call from another apps.
-`api/auth/login`: It is used for Sign&Go authentification. Linked to AuthStrategy.
-`api/auth/login`: It is used for Sign&Go authentification. Linked to AuthStrategy.
-`login/callback`: Get the authentification from Sign&Go process.
-`login/callback`: Get the authentification from Sign&Go process.
# Beneficiary
# Beneficiary
-`/api/beneficiaire`: Get all usager known from Postgre database.
-`/api/beneficiaire`: Get all usager known from Postgre database.
-`/api/beneficiaire/create'`: This rotue is used in order to store Usager domain and his trigger proccess from Cozy. This route is protected by a COZY_SECRET env variable token. This token is generated by us. If you change it, you need to inform Cozy team because this token is store in their side also.
-`/api/beneficiaire/create'`: This rotue is used in order to store Usager domain and his trigger proccess from Cozy. This route is protected by a COZY_SECRET env variable token. This token is generated by us. If you change it, you need to inform Cozy team because this token is store in their side also.
-`/api/beneficiaire/remove'`: This rotue is used in order to remove Usager domain and his trigger proccess. Only availabe by POST. This route is not accessible from any part of TS FRONT application. Protected rout by the same token of create route.
-`/api/beneficiaire/remove'`: This rotue is used in order to remove Usager domain and his trigger proccess. Only availabe by POST. This route is not accessible from any part of TS FRONT application. Protected rout by the same token of create route.
## Add one benificiary by Postman
## Add one benificiary by Postman
- Create a POST request
- Create a POST request
- Entry the URL: http://localhost:3020/api/beneficiaire/create or https://pilote-agent-rec.grandlyon.com/api/beneficiaire/create
- Entry the URL: http://localhost:3020/api/beneficiaire/create or https://pilote-agent-rec.grandlyon.com/api/beneficiaire/create
- Push in Authorizathion/ Bearer Token => the token use by "process.env.COZY_SECRET"
- Push in Authorizathion/ Bearer Token => the token use by "process.env.COZY_SECRET"